Method
constructAgentConversationMessagesForLLM POST
Copy POST

Returns conversation history in a format for LLM calls.

Arguments:

REQUIRED KEY TYPE DESCRIPTION
No deploymentConversationId str Unique ID of the conversation. One of deployment_conversation_id or external_session_id must be provided.
No externalSessionId str External session ID of the conversation.
No includeDocumentContents bool If true, include contents from uploaded documents in the generated messages.
Note: The arguments for the API methods follow camelCase but for Python SDK underscore_case is followed.

Response:

KEY TYPE DESCRIPTION
success Boolean true if the call succeeded, false if there was an error
result AgentConversation
KEY TYPE Description
messages AgentConversationMessage list of messages in the conversation with agent.
KEY TYPE Description
documentContents dict Dict of document name to document text in case of any document present.
isUser bool Whether the message is from the user.
text str The message's text.

Exceptions:

TYPE WHEN
DataNotFoundError

deploymentConversationId is not found.

DataNotFoundError

externalSessionId is not found.

Language: