curl --request POST \
--url https://cloud.onyx.app/api/chat/send-message-simple-api \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"chunks_above": 123,
"chunks_below": 123,
"full_doc": false,
"chat_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"persona_id": 123,
"message": "<string>",
"retrieval_options": {
"chunks_above": 123,
"chunks_below": 123,
"full_doc": false,
"run_search": "always",
"real_time": true,
"filters": {
"source_type": [
"ingestion_api"
],
"document_set": [
"<string>"
],
"time_cutoff": "2023-11-07T05:31:56Z",
"tags": [
{
"tag_key": "<string>",
"tag_value": "<string>"
}
],
"kg_entities": [
"<string>"
],
"kg_relationships": [
"<string>"
],
"kg_terms": [
"<string>"
],
"kg_sources": [
"<string>"
],
"kg_chunk_id_zero_only": true
},
"enable_auto_detect_filters": true,
"offset": 123,
"limit": 123,
"dedupe_docs": false
},
"query_override": "<string>",
"search_doc_ids": [
123
],
"structured_response_format": {},
"use_agentic_search": false
}'
{
"answer": "<string>",
"answer_citationless": "<string>",
"top_documents": [
{
"document_id": "<string>",
"chunk_ind": 123,
"semantic_identifier": "<string>",
"link": "<string>",
"blurb": "<string>",
"source_type": "ingestion_api",
"boost": 123,
"hidden": true,
"metadata": {},
"score": 0,
"is_relevant": true,
"relevance_explanation": "<string>",
"match_highlights": [
"<string>"
],
"updated_at": "2023-11-07T05:31:56Z",
"primary_owners": [
"<string>"
],
"secondary_owners": [
"<string>"
],
"is_internet": false,
"db_doc_id": 123
}
],
"error_msg": "<string>",
"message_id": 123,
"llm_selected_doc_indices": [
123
],
"final_context_doc_indices": [
123
],
"cited_documents": {},
"llm_chunks_indices": [
123
],
"agent_sub_questions": {},
"agent_answers": {},
"agent_sub_queries": {},
"agent_refined_answer_improvement": true,
"chat_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
This is a Non-Streaming version that only gives back a minimal set of information
curl --request POST \
--url https://cloud.onyx.app/api/chat/send-message-simple-api \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"chunks_above": 123,
"chunks_below": 123,
"full_doc": false,
"chat_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"persona_id": 123,
"message": "<string>",
"retrieval_options": {
"chunks_above": 123,
"chunks_below": 123,
"full_doc": false,
"run_search": "always",
"real_time": true,
"filters": {
"source_type": [
"ingestion_api"
],
"document_set": [
"<string>"
],
"time_cutoff": "2023-11-07T05:31:56Z",
"tags": [
{
"tag_key": "<string>",
"tag_value": "<string>"
}
],
"kg_entities": [
"<string>"
],
"kg_relationships": [
"<string>"
],
"kg_terms": [
"<string>"
],
"kg_sources": [
"<string>"
],
"kg_chunk_id_zero_only": true
},
"enable_auto_detect_filters": true,
"offset": 123,
"limit": 123,
"dedupe_docs": false
},
"query_override": "<string>",
"search_doc_ids": [
123
],
"structured_response_format": {},
"use_agentic_search": false
}'
{
"answer": "<string>",
"answer_citationless": "<string>",
"top_documents": [
{
"document_id": "<string>",
"chunk_ind": 123,
"semantic_identifier": "<string>",
"link": "<string>",
"blurb": "<string>",
"source_type": "ingestion_api",
"boost": 123,
"hidden": true,
"metadata": {},
"score": 0,
"is_relevant": true,
"relevance_explanation": "<string>",
"match_highlights": [
"<string>"
],
"updated_at": "2023-11-07T05:31:56Z",
"primary_owners": [
"<string>"
],
"secondary_owners": [
"<string>"
],
"is_internet": false,
"db_doc_id": 123
}
],
"error_msg": "<string>",
"message_id": 123,
"llm_selected_doc_indices": [
123
],
"final_context_doc_indices": [
123
],
"cited_documents": {},
"llm_chunks_indices": [
123
],
"agent_sub_questions": {},
"agent_answers": {},
"agent_sub_queries": {},
"agent_refined_answer_improvement": true,
"chat_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
If a chat_session_id is not provided, a persona_id must be provided to automatically create a new chat session Note, for simplicity this option only allows for a single linear chain of messages
Successful Response
The response is of type object
.
Was this page helpful?