Converse
Converse
Converse with an AI Agent
POST
/
converse
Copy
curl --request POST \
--url https://api.datagrid.com/v1/converse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "<string>",
"config": {
"system_prompt": "<string>",
"agent_model": "magpie-1",
"llm_model": "gemini-1.5-flash-001",
"knowledge_ids": [
"<string>"
],
"agent_tools": [
"data_analysis"
]
},
"agent_id": "<string>",
"conversation_id": "<string>",
"stream": false,
"generate_citations": false
}'
Copy
{
"object": "conversation.message",
"content": [
{
"text": "<string>"
}
],
"agent_id": "<string>",
"conversation_id": "<string>",
"citations": [
{
"citation": "<string>",
"knowledges": [
{
"type": "image",
"knowledge_id": "<string>",
"confirmations": [
"<string>"
]
}
]
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200 - application/json
Converse response
The response is of type object
.
Copy
curl --request POST \
--url https://api.datagrid.com/v1/converse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "<string>",
"config": {
"system_prompt": "<string>",
"agent_model": "magpie-1",
"llm_model": "gemini-1.5-flash-001",
"knowledge_ids": [
"<string>"
],
"agent_tools": [
"data_analysis"
]
},
"agent_id": "<string>",
"conversation_id": "<string>",
"stream": false,
"generate_citations": false
}'
Copy
{
"object": "conversation.message",
"content": [
{
"text": "<string>"
}
],
"agent_id": "<string>",
"conversation_id": "<string>",
"citations": [
{
"citation": "<string>",
"knowledges": [
{
"type": "image",
"knowledge_id": "<string>",
"confirmations": [
"<string>"
]
}
]
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.