diff --git a/apps/portal/src/app/nebula/api-reference/page.mdx b/apps/portal/src/app/nebula/api-reference/page.mdx index 2b23cc03ba6..6db07703876 100644 --- a/apps/portal/src/app/nebula/api-reference/page.mdx +++ b/apps/portal/src/app/nebula/api-reference/page.mdx @@ -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) @@ -57,15 +57,16 @@ 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 } } ``` @@ -73,6 +74,7 @@ Control what blockchain data informs AI responses through context filtering: 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 @@ -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" } } ``` @@ -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", @@ -405,8 +402,7 @@ const data = await response.json(); const result = await handleNebulaResponse(data); ``` -#### Execute Command - +### Execute ```bash