# AI Server. Add File

The block adds a file to the knowledge base on the Sherpa AI Server. The document is automatically split into chunks, for each of which an embedding will be obtained[^1].

<table data-header-hidden><thead><tr><th width="312.4000244140625" valign="top"></th><th width="323.56658935546875" valign="top"></th></tr></thead><tbody><tr><td valign="top">File Name</td><td valign="top">[Text] The name and path to the file. You can enter the full file name including the path.</td></tr><tr><td valign="top">File Name in Knowledge Base</td><td valign="top">[Text] If necessary, you can specify your own file name in the knowledge base.</td></tr><tr><td valign="top">File Description</td><td valign="top">[Text] Description of the file.</td></tr><tr><td valign="top">GUID/Folder Path</td><td valign="top"><p>[Text] The GUID of the folder or the path to the folder where the file needs to be added.</p><p>If the value is not specified, the file will be added to the default folder. For example, <code>"Folder 1\Subfolder 2\Subfolder 3"</code>.</p></td></tr><tr><td valign="top">Metadata</td><td valign="top">[Dictionary] If necessary, provide a dictionary with metadata for this file.</td></tr><tr><td valign="top">Timeout</td><td valign="top">[Number] The maximum wait time for a response in seconds.</td></tr><tr><td valign="top">File GUID</td><td valign="top">[Text] Returns the GUID of the current file.</td></tr><tr><td valign="top">Folder GUID</td><td valign="top">[Text] Returns the GUID of the current folder.</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" - 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" - default;</li><li>"Release" - output is disabled;</li><li>"Debug" - outputs main information;</li><li>"Detailed" - outputs detailed information.</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 Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block's operation.</td></tr></tbody></table>

[^1]: An embedding is a vector (a set of numbers) that characterizes the meaning associated with the input text provided. 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/ai-server.-dobavit-fail-adddocumentaiserver.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.
