Request to GroqChat#
This block allows you to send requests to the GroqChat generative models. 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 the use of 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 the use of 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, only one of the following values can be specified:
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 the model for generating the response. |
| Stop Words | [Text/List] A string or list containing no more than 4 lines that will stop further generation. The returned text will not contain these words. |
| Temperature | [Number] A decimal number from 0 to 1, indicating 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 shorter requests on average, increase it for longer requests. Keep in mind that this number limits the length of the response, but the 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. |
| Tools | [Data Table] A table describing the tools that the neural network can choose to solve the task instead of a text response. This functionality is not supported by all models. The data table must contain three columns:
Example JSON description of parameters: When calling the tool, the neural network will select the appropriate tool from the available ones based on the description of the tools you provided, and will also fill (generate) the values of the parameters you specified for calling these tools. More details about the mechanism for using tools can be found in the description of the output property CalledTools. |
| 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 load on the servers. If the established waiting limit is exceeded, an error occurs. |
| Response Schema | [Text] The response schema in JSON format. For example: { "name": "weather", "strict": true, "schema": { "type": "object", "properties": { "location": { "type": "string", "description": "City or location name" }, "temperature": { "type": "number", "description": "Temperature in Celsius" }, "conditions": { "type": "string", "description": "Weather conditions description" } }, "required": ["location", "temperature", "conditions"], "additionalProperties": false } } |
| Number of Attempts | [Number] The number of attempts in case of a server connection error. |
| Response Role | [Text] The role with which the neural network responded. |
| Response | [Text] The text of the neural network's response. |
| Reflections | [Text] The neural network's reflections (if they are present in the response). |
| Final Length | [Number] The final length of the request and result (combined), expressed in conditional tokens. |
| Called Tools | [List] A list of ToolItem objects. If the neural network suggests using one or more tools instead of a text response after the request, the list of ToolItem objects will be returned in this property. The object contains the following properties:
The values of id and name should be used in the "Chat History" table. The arguments property is a dictionary where the key is the name of the parameter of the called tool, and the value is the value of that parameter generated by the neural network. When using the tools mechanism, after calling this block, you must check whether the neural network selected any tool based on the contents of this list. If the list is not empty, you must implement the functionality of the selected tool or tools in the Robot's scenario, and then in the next call of this block return the result of the tool's execution to the neural network, which the neural network will use in generating subsequent messages. The result of the tool's execution must be recorded in the "Chat History" table as follows:
|
| 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. |