chat
Send a request
Application Conversation
POST https://portal.echobot.ai/api/openapi/v1/chat/completions
Send a chat message
Headers
Bearer *
String
You can generate an API key from the EchoBot portal in the API section of the app. You will only see it if you are a enterprise user.
It is in this format: f"{echobot_token}-{echobot_appId}"
Request Body
chatId
string
When undefined (not passed in), the context function provided by EchoBot is not used, and the context is built entirely from the incoming messages. - When '' is null, it means the first conversation in the new window. The response value will have a newChatId - When it is a non-empty string, it means that the chatId is used for the conversation and the history is automatically fetched from the EchoBot database.
stream*
boolean
Weather to stream the response of not
messages*
list
List of messages, this is the same format as OpenAI chat completions.
"rawSearch": [
{
"id": "19339",
"q": "Who is the director of the movie Journey to Bell Bud?" .
"a": "The director of the movie Journey to Suzumiya is Makoto Shinkai." .
"source": ""
},
{
"id": "8099",
"q": "Who is the main character of this work?" .
"a": "The main character of this work is a young girl named Suzumiya." .
"source": "Manual modification"
}
],
"newChatId": "648f0fc12e0d47315f3bc30e",
"id": "",
"model": "gpt-3.5-turbo-16k",
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 373
},
"choices": [
{
"message": [
{
"role": "assistant",
"content": "The director of the movie Reiya no Trip is Makoto Shinkai."
}
],
"finish_reason": "stop",
"index": 0
}
]
}Last updated