Request to GigaChat#
This block allows you to send requests to the generative models of GigaChat. With it, you can create new texts on demand, perform various tasks:
- classification,
- summarization,
- translation and rewriting of texts,
- writing code prototypes in different programming languages,
- parsing semi-structured and unstructured data,
- extracting and processing facts,
- maintaining a dialogue on various topics, and much more.
Payment for using this functionality is deducted from the client's account on the platform. For testing purposes, each new User is given the opportunity to test this functionality free of charge. After the development of the Robot is completed, payment is required for using this functionality.
| Chat History | [Data Table] Add the chat history, based on the context of which the neural network should generate a response. The specified data table must contain columns named "role" and "content". If such columns are absent, the first column of the table will be used as "role" and the second column as "content". In the "role" column, you can specify only one of the following values:
The system role is intended for setting the tone and basic settings of the neural network, for example:
Older messages should be placed at the beginning of the table, newer ones at the end. The "content" column should contain the message itself. This property can be left empty, in which case generation will be performed only based on the contents of the "Role" and "Request" properties. If the "Tools" property is used, then the table must have 4 columns:
|
| System Request | [Text] Enter the text of the new request to the neural network. The request will be executed with the system role. |
| User Request | [Text] Enter the text of the new request to the neural network. The request will be executed with the user role. |
| Model | Select a model for generating a response. |
| Temperature | [Number] A decimal number from 0 to 2 that indicates the degree of "randomness" or "creativity" of the result, where:
For most creative tasks, a value of 0.7 is more suitable, and if you want to receive the same response for the same request every time, set the value to 0. |
| Maximum Length | [Number] The maximum length of the result, expressed in conditional tokens. For the English language, 1 token is 4 characters, for most other languages, 1 token is 1 character. Reduce this number if you want to receive, on average, shorter requests, increase it for longer requests. Keep in mind that this number limits the length of the response; however, the received response may not necessarily be of the length you specified - depending on the content of the request, it may be shorter. |
| Auto Length Limiting | When enabled, the specified maximum length will be automatically adjusted. This is done by calculating the number of tokens in the request and considering the maximum possible number of tokens for the selected model. |
| Timeout | [Number] The maximum waiting time for a response in seconds. The actual waiting time depends on the selected model, the length of your request, and the anticipated length of the response, as well as the current server load. If the set timeout limit is exceeded, an error occurs. |
| Response Role | [Text] The role with which the neural network responded. |
| Response | [Text] The text of the neural network's response. |
| Final Length | [Number] The final length of the request and result (combined), expressed in conditional tokens. |
| Error Handling Level | Select the error handling level. Possible values:
If "Default" is selected, the value of the "Start" block of this diagram will be used. |
| Message Level | Select the message level that the blocks will output during operation. Possible values:
If "Default" is selected, the value of the "Start" block of this diagram will be used. |
| Error Text | [Text] Returns detailed information about the error in case of incorrect execution of the block's work. |