Get Embeddings#
The block allows you to obtain embeddings[^1] for a string or a list of strings using the Open AI service.
| Text | [Text/List] Input text or list of texts for which embeddings will be calculated. If a list of texts is provided as input, the output will also be a list of embeddings for each of the input text elements. The maximum allowable length for each line is 8192 tokens. |
| Model | Select a model for generating the response. |
| As Data Table | When enabled, the result will be returned as a data table with two columns: "Text" and "Embeddings". |
| Timeout | [Number] Maximum wait time for a response in seconds. |
| Number of Attempts | [Number] Number of attempts in case of a server connection error. |
| Embeddings | [Text/List/Data Table] If a single string was provided as input, the output will be a vector representation of the embedding in JSON format (array of numbers). If a list of strings was provided as input, the output will be a list of embeddings in JSON format (array of numbers). If the "As Data Table" property is enabled, the output will be a data table with two columns: "Text" and "Embeddings". |
| Error Handling Level | Select the error handling level. Possible values:
If "Default" is selected, the value from the "Start" block of this diagram will be used. |
| Message Level | Select the message level that blocks will output during operation. Possible values:
If "Default" is selected, the value from the "Start" block of this diagram will be used. |
| Error Message | [Text] Returns detailed information about the error in case of incorrect execution of the block. |
[^1]: An embedding is a vector (set of numbers) that characterizes the meaning associated with the provided input text. Words or sentences with similar meanings will have embeddings with minimal cosine distance. Embeddings can also be used to search for the most semantically similar words, strings, or paragraphs in document databases.