Отправить пользовательский запрос Версия 1 (Python)
Группа действий: Robin AI Core
Описание
The action sends a request with the specified parameters to the server with the language model.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Context | The context for connecting to a server with a language model | Context Robin AI Core | CreateContext1.Context | Yes |
Message | The query that the language model should execute. If the number of tokens for making a request exceeds 8196, then the "Additional message" parameter must be used | String | Извлеки только предложение, которое содержит фразу.\n\n ##Фраза\n Договор вступает в силу с | Yes |
Additional message | An additional request to the language model. It works with the result obtained from executing the command from the "Message" field | String | "Извлеки дату в формате:\n Дата окончания исполнения : день.месяц.год \n ##Пример\n Дата окончания исполнения : 05.12.2025", | No |
Instruction | Instruction for the model that specifies the criteria for processing a message and the rules for responding to it (role, style, response form, etc.) | String | Ответ должен быть сформулирован по пунктам. | No |
Data source | Information from which the model will generate responses | String | No | |
Temperature | Randomness of token selection to form the answer. The higher the value, the more random the answer will be. If the value is greater than 2, the answer may be characterized by excessive randomness. Valid values: from 0 and higher. The default value is 0.5 | Number | 0,5 | No |
Max tokens | Maximum number of tokens to generate a response. If the parameter value is small, the model may return an incomplete response. Valid values: integers greater than 0. The default value is 500 | Number | 10 | No |
Word repetition | Limit the repetition of words in the response. For values between 0 and 1, the model will repeat words that have already been used. If the value is greater than 1, the model will try not to repeat words. Valid values: more than 0. The default value is 0,9 | Number | 1 | Нет |
Results | ||||
Result | The response to the request from the language model | String |
Special conditions of use
- The request is sent to the server with the language model configured in the Create context action;
- A request is composed of a message, a message for additional processing, an instruction and a data source. The length of the request is determined by the number of tokens:
- If the request length is less than 8196 tokens, the request is considered short. The request from the "Message" field is used, if the "Additional message" field is filled in, it is ignored for short requests;
- If the length of the request is more than 8196 tokens, the request is considered long. The request is divided into parts of 8196 tokens, such parts are called windows. To each window a query from the "Message" field is executed. Then to all received results combined together a query from the "Additional Message" field is executed;
- If the allowed request length of 8196 tokens in the "Message" field is exceeded, the robot will terminate with the error "The number of tokens sent in the request to the language model in the "Message" field has been exceeded. You need to reduce the length of the request and repeat the request.";
- If the allowed request length of 8196 tokens is exceeded in the fields of "Message" + "Instruction" + "Data source" and the "Additional message" field is not filled in, the robot will terminate with the error "The number of tokens sent in the request to the language model has been exceeded. You need to reduce the length of the request and repeat it or use the "Additional message" parameter."
Examples of filling in the "Message" and "Additional message" parameters. Use when "Message" + "Instruction" + "Data source" exceeds 8196 tokens.
"Message": "Extract the contract dates",
"Additional message": "Extract only the first contract date in the format",
"Format": "Contract date: contract date",
"Message": "Extract only the sentence that contains the phrase.\n\n\n ##Phrase\n The contract shall enter into force from",
"Additional message": "Extract the date in the format:\n Date of completion of performance : day.month.year \n ##Example\n Date of completion of performance : 05.12.2025",
"Message": "Extract contract numbers",
"Additional message": "Extract only the first contract number without the date in the format. Format: Contract number: contract number",
"Message": "Extract strictly from the text only the part from paragraph 1 Subject of the contract",
"Additional message": "Quote the subject of the contract. Give the answer without additional characters strictly in the format Subject of the contract : found subject of the contract",
"Сообщение": "Извлеки только текст, который содержит сумму договора",
"Дополнительное сообщение": "Извлеки сумму договора. Ответ дай без дополнительных символов строго в формате Сумма договора : найденная сумма договора валюта",
"Message": "Extract only the text that contains the contract amount",
"Additional message": "Extract the contract amount. Give the answer without additional characters strictly in the format Contract amount : found contract amount currency",
2 Example of use
Task
Receive a generated response to a request to the Robin AI Core service.
Solution
Воспользоваться действиями "Создать контекст", "Отправить пользовательский запрос" и "Сообщение".
Use the actions "Create context", "Send a custom request", "Show message".
Implementation
Preface
- Move the "Create context", "Send a custom request", and "Show message" actions to the workspace.
- Fill in the parameters of the "Create context" action.
Fill in the parameters of the "Send a custom request" action.
Move the "Show message" action to the workspace. Fill in the parameters.
- Click on the "Start" button in the top panel.
Result
The program robot completed successfully.
The result is displayed in a dialog box:
The generated response of the model according to the specified parameters was received, as well as the chat history for further requests.