Specifications
- Input
- text, documents
- Output
- text
- Context size
- 4 095 tokens
- Max answer length
- 4 096 tokens
Prompt cost
(per 1M tokens)
Answer cost
(per 1M tokens)
Image prompt
(per 1K tokens)
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: '<your bothub access token>',
baseURL: 'https://openai.bothub.chat/v1'
});
// Sync - Text generation
async function main() {
const chatCompletion = await openai.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'gigachat',
});
}
// Async - Text generation
async function main() {
const stream = await openai.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'gigachat',
stream: true
});
for await (const chunk of stream) {
const part: string | null = chunk.choices[0].delta?.content ?? null;
}
}
main();
How it works GigaChat?
Frequently asked questions about GigaChat
You can use generated results for commercial purposes. You own all rights to the content you create. The only restriction: make sure your prompt does not include copyrighted third-party material. You are responsible for respecting the rights to any input data.
GigaChat is a text model that conducts dialogues, writes and edits texts, answers questions, and analyzes the content of uploaded documents. In BotHub, it works through the same interface as other models, making it convenient to connect to support, analytics, and Russian-language material processing tasks.
The model generates up to 4096 tokens per response, and the context size is limited to 4095 tokens. For long materials, it makes sense to break them into parts or switch to a model with a larger context, as BotHub provides unified access to models, so you won't have to rewrite the integration.
A specific note about reasoning before answering is not marked in our model data, so we cannot claim that GigaChat builds a long chain of thought. The model confidently answers ordinary questions, but for tasks with complex logic, it is worth comparing the result with another model in BotHub.
Function calling and structured JSON output are not marked in our data for this model, so we will not promise their support. If your scenario requires a strict response format, check the behavior with a small test, and if necessary, choose a model with confirmed function support.
In addition to text, GigaChat accepts documents: you can upload a file and ask questions about it. The acceptance of images, audio, and video is not marked in our data for this model, so for such files, it is better to choose a model with image or audio support in the same BotHub window.
GigaChat was created as a Russian-language model, so it works confidently with Russian text: it understands phrasing, maintains style, and is suitable for correspondence, editing, and analyzing documents in Russian. This is convenient when materials and correspondence are conducted primarily in Russian.