curl --request POST \
--url https://paradigm.lighton.ai/api/v3/threads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"agent_id": 123,
"chat_setting_id": 123,
"is_ephemeral": false,
"tool_parameters": "<unknown>"
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/threads"
payload = {
"name": "<string>",
"agent_id": 123,
"chat_setting_id": 123,
"is_ephemeral": False,
"tool_parameters": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
agent_id: 123,
chat_setting_id: 123,
is_ephemeral: false,
tool_parameters: '<unknown>'
})
};
fetch('https://paradigm.lighton.ai/api/v3/threads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"ml_model": "<string>",
"ml_model_name": "<string>",
"agent_id": 123,
"agent_name": "<string>",
"creation_source": "<string>",
"is_read": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_ephemeral": true,
"is_archived": true,
"tool_parameters": "<unknown>",
"object": "thread"
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Create a conversation thread
Create a new conversation thread.
Note: chat_setting_id has been deprecated, now use agent_id instead, chat_settings_id is still supported for back-compatibility purposes. If no agent_id nor chat_setting_id is provided, the default agent for the company is used.
curl --request POST \
--url https://paradigm.lighton.ai/api/v3/threads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"agent_id": 123,
"chat_setting_id": 123,
"is_ephemeral": false,
"tool_parameters": "<unknown>"
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/threads"
payload = {
"name": "<string>",
"agent_id": 123,
"chat_setting_id": 123,
"is_ephemeral": False,
"tool_parameters": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
agent_id: 123,
chat_setting_id: 123,
is_ephemeral: false,
tool_parameters: '<unknown>'
})
};
fetch('https://paradigm.lighton.ai/api/v3/threads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>",
"ml_model": "<string>",
"ml_model_name": "<string>",
"agent_id": 123,
"agent_name": "<string>",
"creation_source": "<string>",
"is_read": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_ephemeral": true,
"is_archived": true,
"tool_parameters": "<unknown>",
"object": "thread"
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
255ID of the agent to use. If not provided, uses the default agent for the company.
DEPRECATED: Use 'agent_id' instead. ID of the chat setting to use. If not provided, uses the default agent for the company.
Global tool-specific parameters for all turns in this thread (e.g., document_search.top_k). Can be overridden at turn level.
Response
Global tool-specific parameters applied to all turns in this thread (e.g., document_search.top_k). Can be overridden at turn level.