Chat with Target Context Endpoint
Provides multi-turn conversational capabilities with Puppilot, allowing a target context (e.g., a vet-owner chat) and the history of the ongoing chat with Puppilot to be included. This endpoint is used for engaging in a continuous dialogue where the agent remembers previous parts of the conversation (via conversation_id) and can reference a specific external context (via target_context). Requires Bearer authentication.
Overview
This endpoint allows for multi-turn conversational interactions with Puppilot. It is designed for continuous dialogue where Puppilot can reference:
- A Target Context: This is an external piece of information you provide, such as a transcript of a conversation between a pet owner and a veterinarian. Puppilot can use this context to inform its responses.
- Chat History: The backend automatically maintains the history of your conversation with Puppilot using a unique
conversation_id
. This allows for natural, connected dialogue across multiple requests.
Authentication is required for this endpoint. You must include a Bearer token (obtained via the authentication endpoint) in the Authorization
header of your request. Additionally, you must include the header X-API-Version: 0.2.0
in your requests.
Request Body
message
(string, required): The latest message or query from the user.target_context
(string, optional): A string containing the target contextual information that Puppilot should be aware of. For example, this could be a detailed case history or a prior conversation transcript.conversation_id
(string, optional): For the first request, omit this field and the API will generate a newconversation_id
. Include this in subsequent requests to maintain conversation context.
Example Request (First Request)
Example Request (Subsequent Request)
Response (200 OK)
output
(string): Puppilot’s response to the user’s message, taking into account the providedtarget_context
and chat history.conversation_id
(string): The unique identifier for this conversation. Use thisconversation_id
in all subsequent requests to maintain conversation context.
Example Response (200 OK)
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
API versioning is required. Include the header X-API-Version
with current version value in all requests.
"0.2.0"
Body
Response
Successful response from the chat agent.
The response is of type object
.