Query sessions

Get Query Sessions

get

Get all Query Sessions

Authorizations
Responses
200
OK
get
GET /api/workspace/query_sessions HTTP/1.1
Host: sapphire.contextdata.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

No content

Create Query Session

post

Create a new Query Session

Authorizations
Body
session_namestringRequired

Provide a unique name to identify your session

vector_store_identifierstringRequired

Vector Store (Target Connection) identifier. Get the UUID from the '/target_connections' endpoint

vector_store_columnstringRequired

Specify the column/field in the target vector store connection

embedding_model_identifierstringRequired

Embedding model identifier. Get the UUID from the '/embedding_models' endpoint

system_messageany ofRequired

[Optional] Add an initial system message to the session

stringOptional
or
nullOptional
chat_model_identifierstringRequired

Chat Model identifier. Get the UUID from the '/chat_models' endpoint

response_limitany ofRequired
integerOptional
or
nullOptional
max_tokensany ofRequired

[Optional] Enter the maximum number of tokens for each query and response

integerOptional
or
nullOptional
temperaturenumberRequired

Enter your desired temperature

Responses
200
OK
application/json
post
POST /api/workspace/query_session/create HTTP/1.1
Host: sapphire.contextdata.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 226

{
  "session_name": "text",
  "vector_store_identifier": "text",
  "vector_store_column": "text",
  "embedding_model_identifier": "text",
  "system_message": "text",
  "chat_model_identifier": "text",
  "response_limit": 1,
  "max_tokens": 1,
  "temperature": 1
}
{
  "message": "text",
  "data": {}
}

Session Chat

post

Conduct a RAG Interaction with your Query Session

Authorizations
Path parameters
session_identifierstringRequired
Body
query_textstringRequired
Responses
200
OK
application/json
post
POST /api/workspace/session_chat/{session_identifier} HTTP/1.1
Host: sapphire.contextdata.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 21

{
  "query_text": "text"
}
{
  "message": "text",
  "data": {}
}

Get Session History

get

Get Query Session History

Authorizations
Path parameters
session_identifierstringRequired
Responses
200
OK
get
GET /api/workspace/session_history/{session_identifier} HTTP/1.1
Host: sapphire.contextdata.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

OK

No content

Last updated