Skip to content

Commit

Permalink
added wallet_addresses to context filter
Browse files Browse the repository at this point in the history
  • Loading branch information
eabdelmoneim committed Dec 16, 2024
1 parent 66ed359 commit 96213d3
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions apps/portal/src/app/nebula/api-reference/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Nebula provides a conversational interface to interact with blockchain data and
- [Base URL](#base-url)
- [Authentication](#authentication)
- [Sessions](#sessions)
- [Context Filtering](#context-filtering)
- [Context Filters](#context-filtering)
- [Execute Configuration](#execute-configuration)
- [Response Handling](#response-handling)
- [API Endpoints](#api-endpoints)
Expand Down Expand Up @@ -57,22 +57,24 @@ Sessions maintain conversation threads with the AI and can be:

Sessions persist your conversation history and custom configurations for blockchain data and thirdweb tools interactions.

## Context Filtering
## Context Filters

Control what blockchain data informs AI responses through context filtering:

```json
{
"context_filter": {
"chain_ids": [1], // Ethereum mainnet
"contract_addresses": ["0x..."] // Target contract address
"chain_ids": [1], // comma delimited list of chain ID's
"contract_addresses": ["0x..."], // Comma delimited list of contract addresses
"wallet_addresses": ["0x..."] // Comma delimited list of wallet addresses
}
}
```

Benefits:
- Filter by blockchain networks using chain IDs
- Target specific contract addresses
- Target specific wallet addresses
- Control context scope for relevant responses
- Optimize token usage and response relevance

Expand Down Expand Up @@ -108,13 +110,7 @@ When `stream: false`, the API returns a single JSON response:
"result": {
"message": "The last 5 blocks on polygon are...",
"session_id": "abc",
"message_id": "1234",
"created_at": "2024-01-01T00:00:00Z",
"usage": {
"prompt_tokens": 10,
"completion_tokens": 15,
"total_tokens": 25
}
"message_id": "1234"
}
}
```
Expand Down Expand Up @@ -224,7 +220,8 @@ POST /chat
"stream": true,
"context_filter": {
"chain_ids": [137],
"contract_addresses": ["0x.."]
"contract_addresses": ["0x..."],
"wallet_addresses": ["0x..."]
},
"execute_config": {
"mode": "client",
Expand Down

0 comments on commit 96213d3

Please sign in to comment.