ai-hub
ai-assistants
Retrieve Context from AI Assistant
Retrieves the most relevant context chunks from an AI assistant's knowledge base for a given message.<br/><br/>This endpoint performs a semantic search over the assistant's indexed documents and returns the most relevant text segments (top k chunks). You can specify how many chunks to return and optionally enable re-ranking for more accurate results.<br/><br/>The "use shared history" feature allowing an AI assistant to utilize the agent's conversation history, is only available if used together with Infobip AI agents.
post/ai/1/aiassistants/{assistantId}/retrieve-context
Request
- Base URLhttps://api.infobip.com (the document declares no server; this is the origin it was published from)
- Auth
- OAuth 2Client credentialsToken URL: https://api.infobip.com/auth/1/oauth2/token
- or API key in header Authorization
- or API key in header Authorization
- or HTTP basic
Path parameters
assistantIdstring required
Unique identifier of the AI assistant from which to retrieve context.
Request body
Example request
{
"message": "How to send SMS?",
"k": 5,
"reRankK": 10,
"sessionId": "session-12345"
}Response
Context retrieved successfully
Changes
No recorded changes to this operation across all 1 revision of this API.