POST
/
v1
/
collection
/
chat
curl --request POST \
  --url https://api.wetrocloud.com/v1/collection/chat/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'collection_id={{collection_id}}' \
  --form 'message=What were the major milestones during Queen Elizabeth II'\''s reign?' \
  --form 'chat_history=[
  {
    "role":"user",
    "content":"What is this all about?"
  }, 
  {
    "role":"system",
    "content":"This is about Queen Elizabeth_II of England"
  }
]
'
{
  "response": "Queen Elizabeth II was the monarch of the United Kingdom and other Commonwealth realms. She served as the Supreme Governor of the Church of England and was a member of the Church of Scotland. Her reign included significant events such as her first state visit to China and her address to a joint meeting of the United States Congress. Elizabeth was known for her involvement in various state matters and her response to public scrutiny regarding the royal family's affairs. She was also noted for her wealth, which included state assets, and her efforts to modernize the monarchy during her reign.",
  "tokens": 5224,
  "success": true
}

Authorizations

Authorization
string
header
required

Body

multipart/form-data
collection_id
string
Example:

"{{collection_id}}"

message
string
Example:

"What were the major milestones during Queen Elizabeth II's reign?"

chat_history
string
Example:

"[\n {\n \"role\":\"user\",\n \"content\":\"What is this all about?\"\n }, \n {\n \"role\":\"system\",\n \"content\":\"This is about Queen Elizabeth_II of England\"\n }\n]\n"

Response

200
application/json
OK

The response is of type object.