Create new Thread#
Endpoint#
Description#
Creates a new thread in the specified locale.Parameters#
Name | Type | Location | Required | Description |
---|
locale | string | path | Yes | The locale in which the thread is created. |
authorization | string | header | Yes | The authorization token required for authentication. format: Bearer {token} |
Request Body#
The request body should be a JSON object with the following structure:Request Body Parameters#
Name | Type | Required | Description |
---|
config | object | No | Configuration for the request. |
config.search_type | string | No | The type of search values: ["vector_search", "assistant"] default: "vector_search" . |
config.type | string | No | The type of request values: ["chat", "assistant"] default: "chat" . |
provider | string | No | The provider handling the request, default: "briano" |
Request Body#
{
"config": {
"search_type": "vector_search",
"type": "chat"
},
"provider": "briano"
}
Responses#
{
"data": {
"id": "briano_0d582974-6833-435e-8148-9d43228cadc0"
}
}
200 OK
: On successful creation of the thread.
400 Bad Request
: If there are any errors during the creation of the message. The response body contains an errors
field with the error details.
Add new Message to the Thread#
Endpoint#
POST /{locale}/threads/messages
Description#
add user message to thread.Parameters#
Name | Type | Location | Required | Description |
---|
locale | string | path | Yes | The locale in which the thread is created. |
authorization | string | header | Yes | The authorization token required for authentication. format: Bearer {token} |
Request Body Parameters#
Name | Type | Required | Description |
---|
text | string | Yes | message text. |
thread_id | string | Yes | id return from create thread api |
Request Body#
The request body should be a JSON object with the following structure: {
"text": "გამარჯობა",
"thread_id": "briano_0d582974-6833-435e-8148-9d43228cadc0"
}
Responses#
{
"message": {
"id": "chat_message",
"role": "user",
"thread_id": "briano_0d582974-6833-435e-8148-9d43228cadc0",
"content": [
"გამარჯობა"
],
"status": "completed"
}
}
Open Web Socket to receive AI responce#
Endpoint#
WebSocket /{locale}/threads/ws/{thread_id}?token={token}
Description#
Retrieve BRIANO AI responseParameters#
Name | Type | Location | Required | Description |
---|
locale | string | path | Yes | The locale in which the thread is created. |
authorization | string | header | Yes | The authorization token required for authentication. wihout Bearer |
Responses#
{
"message": {
"id": "chat_message",
"role": "assistant",
"thread_id": "briano_0d582974-6833-435e-8148-9d43228cadc0",
"content": ["გამარჯობა! მე ვარ BRIATO-ის AI ასისტენტი. როგორ შემიძლია დაგეხმაროთ?"],
"tool_calls": [],
"tool_outputs": [],
"backend_data": [],
"status": "completed"
},
"status": "completed"
}
Get existing messages from the Thread#
Endpoint#
GET /{locale}/threads/messages/{thread_id}
Description#
get current thread messagesParameters#
Name | Type | Location | Required | Description |
---|
locale | string | path | Yes | The locale in which the thread is created. |
authorization | string | header | Yes | The authorization token required for authentication. format: Bearer {token} |
thread_id | string | path | Yes | The id of thread |
Responses#
{
"messages": [
{
"id": "chat_message",
"role": "user",
"thread_id": "briano_0d582974-6833-435e-8148-9d43228cadc0",
"content": ["გამარჯობა"],
"status": "completed"
},
{
"id": "chat_message",
"role": "assistant",
"thread_id": "briano_0d582974-6833-435e-8148-9d43228cadc0",
"content": ["გამარჯობა! მე ვარ BRIATO-ის AI ასისტენტი. როგორ შემიძლია დაგეხმაროთ?"],
"tool_calls": [],
"tool_outputs": [],
"backend_data": [],
"status": "completed"
}
]
}
200 OK
: On successful retrieval of the messages. The response body contains a messages
field with the list of messages from the thread.
400 Bad Request
: If there are any errors during the retrieval of the messages. The response body contains an errors
field with the error details.
Modified at 2025-03-07 12:07:12