POST
/
api
/
ai
/
session
/
{ai_session_id}
/
qa
/
create
curl --request POST \
  --url https://cite.petal.org/api/ai/session/{ai_session_id}/qa/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "chat_model": "<string>",
  "language": "English (US)",
  "meta": {},
  "query": "<string>",
  "restrict_to_context": "True",
  "use_cells": "True",
  "use_context": "True",
  "use_history": "True",
  "use_meta": "True"
}'
[
  {
    "ai_session_id": 123,
    "created_at": "<string>",
    "id": 123,
    "meta": {},
    "query": "<string>",
    "response": "<string>",
    "task_id": "<string>",
    "task_status": "<string>",
    "user_id": 123,
    "user_rating": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

ai_session_id
integer
required

The unique ID of the Session in which the new message is to be created

Body

application/json

Response

200
application/json

OK

The response is of type object[].