diff --git a/api/assistant/create-assistant-message-v2.mdx b/api/assistant/create-assistant-message-v2.mdx index 06c7bf7a2..abf710da5 100644 --- a/api/assistant/create-assistant-message-v2.mdx +++ b/api/assistant/create-assistant-message-v2.mdx @@ -49,6 +49,7 @@ function MyComponent({ domain }) { body: { fp: "anonymous", retrievalPageSize: 5, + currentPath: "/guides/getting-started", context: [ { type: "code", @@ -96,6 +97,7 @@ function MyComponent({ domain }) { **Optional configuration:** +- `body.currentPath` - The path of the page the user is currently viewing (e.g., `/guides/getting-started`). When provided, the assistant uses this context to provide more relevant answers. - `body.context` - Array of contextual information to provide to the assistant. Each context object contains: - `type` - Either `'code'` or `'textSelection'`. - `value` - The code snippet or selected text content. diff --git a/api/assistant/create-assistant-message.mdx b/api/assistant/create-assistant-message.mdx index d679dd584..204a96818 100644 --- a/api/assistant/create-assistant-message.mdx +++ b/api/assistant/create-assistant-message.mdx @@ -35,6 +35,7 @@ function MyComponent({ domain }) { body: { fp: 'anonymous', retrievalPageSize: 5, + currentPath: '/guides/getting-started', context: [ { type: 'code', @@ -71,6 +72,7 @@ function MyComponent({ domain }) { - `body.retrievalPageSize` - Number of search results to use (recommended: 5). **Optional configuration:** +- `body.currentPath` - The path of the page the user is currently viewing (e.g., `/guides/getting-started`). When provided, the assistant uses this context to provide more relevant answers. - `body.context` - Array of contextual information to provide to the assistant. Each context object contains: - `type` - Either `'code'` or `'textSelection'`. - `value` - The code snippet or selected text content. diff --git a/discovery-openapi.json b/discovery-openapi.json index 0dd00212b..aeef37ff6 100644 --- a/discovery-openapi.json +++ b/discovery-openapi.json @@ -394,6 +394,10 @@ } }, "description": "Optional filter criteria for the search." + }, + "currentPath": { + "type": "string", + "description": "The path of the page the user is currently viewing. When provided, the assistant includes this context in its system prompt, allowing it to provide more relevant answers based on the user's location in the documentation. Maximum 200 characters." } } } @@ -678,6 +682,10 @@ ] }, "description": "Optional array of contextual information to provide to the assistant." + }, + "currentPath": { + "type": "string", + "description": "The path of the page the user is currently viewing. When provided, the assistant includes this context in its system prompt, allowing it to provide more relevant answers based on the user's location in the documentation. Maximum 200 characters." } } }