Chatbots
Create a personalized AI chatbot trained on your unique content, knowledge base, files, and more. The chatbot can intelligently and automatically answer customer inquiries, providing a seamless customer experience that mirrors your brand voice and values.
The beauty of our service is the flexibility. You have the power to tailor your chatbot according to your specific needs, ensuring it aligns perfectly with your brand and business objectives. Whether it's adjusting the tone of responses, setting the level of creativity, or controlling response length, you can make the chatbot truly your own.
Embrace the power of AI and create a customer interaction platform that works for you, around the clock, and matches the unique requirements of your business.
Create a chatbot
curl --request POST \
--url https://api.gigachat.ai/chatbots \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
"name": "first test",
"response": {
"n": 1,
"top_p": 1,
"stream": true,
"max_tokens": 200,
"memory_size": 0,
"temperature": 0.7,
"system_persona": "You are a friendly chatbot to help answer questions! Given the following sections from a website, answer the question using only that information. If you are unsure and the answer and it is not explicitly written in the context sections, say \"Sorry, I don't know how to help with that.\"",
"presence_penalty": 0,
"frequency_penalty": 0
},
"restrictions": {
"hostnames": [],
"ip_addresses": []
},
"documents": {
"results": {
"match_count": 3,
"match_threshold": 0.78
},
"text_splitter": {
"chunk_size": 1000,
"chunk_overlap": 200
}
}
}'
Response 201
{
"id": "8fb205e5-ff46-4bf6-9d7b-4d770935a486",
"user_id": "4c4087f4-805f-4cf4-9957-0571faf82a4d",
"name": "first test",
"response": {
"n": 1,
"top_p": 1,
"stream": true,
"max_tokens": 200,
"memory_size": 0,
"temperature": 0.7,
"system_persona": "You are a friendly chatbot to help answer questions! Given the following sections from a website, answer the question using only that information. If you are unsure and the answer and it is not explicitly written in the context sections, say \"Sorry, I don't know how to help with that.\"",
"presence_penalty": 0,
"frequency_penalty": 0
},
"restrictions": {
"hostnames": [],
"ip_addresses": []
},
"documents": {
"results": {
"match_count": 3,
"match_threshold": 0.78
},
"text_splitter": {
"chunk_size": 1000,
"chunk_overlap": 200
}
}
}
Update a chatbot
curl --request POST \
--url https://api.gigachat.ai/chatbots/{chatbot_id} \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
--data '{
"id": "8fb205e5-ff46-4bf6-9d7b-4d770935a486",
"user_id": "4c4087f4-805f-4cf4-9957-0571faf82a4d",
"name": "first test",
"response": {
"n": 1,
"top_p": 1,
"stream": true,
"max_tokens": 200,
"memory_size": 3,
"temperature": 0.7,
"system_persona": "You are a friendly chatbot to help answer questions! Given the following sections from a website, answer the question using only that information. If you are unsure and the answer and it is not explicitly written in the context sections, say \"Sorry, I don't know how to help with that.\"",
"presence_penalty": 0,
"frequency_penalty": 0
},
"restrictions": {
"hostnames": [],
"ip_addresses": []
},
"documents": {
"results": {
"match_count": 3,
"match_threshold": 0.78
},
"text_splitter": {
"chunk_size": 1000,
"chunk_overlap": 200
}
}
}'
The request accepts a JSON object with the name
property being required. To see all available properties, see the chatbot schema.
Response 201
{
"id": "8fb205e5-ff46-4bf6-9d7b-4d770935a486",
"user_id": "4c4087f4-805f-4cf4-9957-0571faf82a4d",
"name": "first test",
"response": {
"n": 1,
"top_p": 1,
"stream": true,
"max_tokens": 200,
"memory_size": 0,
"temperature": 0.7,
"system_persona": "You are a friendly chatbot to help answer questions! Given the following sections from a website, answer the question using only that information. If you are unsure and the answer and it is not explicitly written in the context sections, say \"Sorry, I don't know how to help with that.\"",
"presence_penalty": 0,
"frequency_penalty": 0
},
"restrictions": {
"hostnames": [],
"ip_addresses": []
},
"documents": {
"results": {
"match_count": 3,
"match_threshold": 0.78
},
"text_splitter": {
"chunk_size": 1000,
"chunk_overlap": 200
}
}
}
Get all chatbot
curl --request GET \
--url https://api.gigachat.ai/chatbots \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
Response 200
[
{
"id": "8fb205e5-ff46-4bf6-9d7b-4d770935a486",
"user_id": "4c4087f4-805f-4cf4-9957-0571faf82a4d",
"name": "first test",
"response": {
"n": 1,
"top_p": 1,
"stream": true,
"max_tokens": 200,
"memory_size": 0,
"temperature": 0.7,
"system_persona": "You are a friendly chatbot to help answer questions! Given the following sections from a website, answer the question using only that information. If you are unsure and the answer and it is not explicitly written in the context sections, say \"Sorry, I don't know how to help with that.\"",
"presence_penalty": 0,
"frequency_penalty": 0
},
"restrictions": {
"hostnames": [],
"ip_addresses": []
},
"documents": {
"results": {
"match_count": 3,
"match_threshold": 0.78
},
"text_splitter": {
"chunk_size": 1000,
"chunk_overlap": 200
}
}
}
]
Get chatbot by ID
curl --request GET \
--url https://api.gigachat.ai/chatbots/{chatbot_id} \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
Response 200
{
"id": "8fb205e5-ff46-4bf6-9d7b-4d770935a486",
"user_id": "4c4087f4-805f-4cf4-9957-0571faf82a4d",
"name": "first test",
"response": {
"n": 1,
"top_p": 1,
"stream": true,
"max_tokens": 200,
"memory_size": 0,
"temperature": 0.7,
"system_persona": "You are a friendly chatbot to help answer questions! Given the following sections from a website, answer the question using only that information. If you are unsure and the answer and it is not explicitly written in the context sections, say \"Sorry, I don't know how to help with that.\"",
"presence_penalty": 0,
"frequency_penalty": 0
},
"restrictions": {
"hostnames": [],
"ip_addresses": []
},
"documents": {
"results": {
"match_count": 3,
"match_threshold": 0.78
},
"text_splitter": {
"chunk_size": 1000,
"chunk_overlap": 200
}
}
}
Delete chatbot by ID
curl --request DELETE \
--url https://api.gigachat.ai/chatbots/{chatbot_id} \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API_KEY>' \
Response 204
No content
Request Properties
Gain substantial control over the behavior of the AI model when generating responses. You can specify the number of responses the AI should produce, adjust the degree of randomness in the AI's output, and determine whether the AI should deliver responses all at once or gradually over time.
These configurations also let you manage the maximum length of responses, define how much past interaction the model should remember, and set the creativity level in the output. You can further establish a consistent character for your model and discourage the model from using or repeating certain words or phrases. In essence, these settings enable you to tailor the AI's behavior to suit your specific application needs.
Table 1: Main Properties
Property | Description | Required | Default Value |
---|---|---|---|
name | The name of the test | Yes | |
response | An object containing properties related to the response | No | |
restrictions | An object containing restrictions for the request | No | |
documents | An object containing properties related to the documents | No |
Table 2: Response Properties
Property | Description | Required | Default Value |
---|---|---|---|
n | Specifies the number of responses to generate | No | 1 |
top_p | Determines the subset of probable tokens the model should consider | No | None |
stream | Specifies whether the response should be streamed | No | False |
max_tokens | Sets the maximum number of tokens in the response | No | None |
memory_size | Defines the memory size for the request | No | None |
temperature | Controls the creativity of the responses | No | None |
system_persona | Sets the personality of the chatbot | No | None |
presence_penalty | Penalizes certain tokens from appearing in the response | No | None |
frequency_penalty | Penalizes the repetition of certain tokens in the response | No | None |
Table 3: Restrictions Properties
Property | Description | Required | Default Value |
---|---|---|---|
hostnames | An array containing restricted hostnames | No | |
ip_addresses | An array containing restricted IP addresses | No |
Table 4: Documents Properties
Property | Description | Required | Default Value |
---|---|---|---|
results | An object with properties related to the results | No | |
text_splitter | An object with properties for splitting the text | No |
Table 5: Results Properties
Property | Description | Required | Default Value |
---|---|---|---|
match_count | The count of matches | No | |
match_threshold | The threshold for considering a match | No |
Table 6: Text Splitter Properties
Property | Description | Required | Default Value |
---|---|---|---|
chunk_size | The size of each text chunk | No | |
chunk_overlap | The overlap between each text chunk | No |