# Get Embeddings

The block allows you to obtain embeddings[^1] for a string or a list of strings using the Open AI service.

<table data-header-hidden><thead><tr><th width="303.4666748046875" valign="top"></th><th width="323.56671142578125" valign="top"></th></tr></thead><tbody><tr><td valign="top">Text</td><td valign="top"><p>[Text/List] Input text or list of texts for which embeddings will be calculated.</p><p>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.</p></td></tr><tr><td valign="top">Model</td><td valign="top">Select a model for generating the response.</td></tr><tr><td valign="top">As Data Table</td><td valign="top">When enabled, the result will be returned as a data table with two columns: "Text" and "Embeddings".</td></tr><tr><td valign="top">Timeout</td><td valign="top">[Number] Maximum wait time for a response in seconds.</td></tr><tr><td valign="top">Number of Attempts</td><td valign="top">[Number] Number of attempts in case of a server connection error.</td></tr><tr><td valign="top">Embeddings</td><td valign="top"><p>[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).</p><p>If a list of strings was provided as input, the output will be a list of embeddings in JSON format (array of numbers).</p><p>If the "As Data Table" property is enabled, the output will be a data table with two columns: "Text" and "Embeddings".</p></td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Message</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block.</td></tr></tbody></table>

[^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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/spravochnik-blokov/mashinnoe-obuchenie-machine-learning/poluchit-embeddingi-openaigetembeddings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
