# Models

The "Models" screen, divided into "Models" and "Model Instances," provides the ability to connect an additional model to the Sherpa AI Server, provided that the necessary hardware resources are available.

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-0d046bb2b006071ada45c85d621dab5ffef270d5%2Fimage%20(278).png?alt=media" alt=""><figcaption></figcaption></figure>

Users can choose between a local model or a cloud model, provided they have the necessary tokens for access. It is also possible to integrate a model hosted on third-party servers within the local network, but not on the same server where the Sherpa AI Server is located.

Our system implements an algorithm that checks the availability of models and responds with the first available one. However, if it is necessary to use a specific model, we can simply create an instance of that model in the appropriate group, and it will work with it continuously.

It is worth noting that due to the grouping functionality, we are actually grouping not the models themselves, but their backends, which ensures the scalability and fault tolerance of the system. Within a group, it is permissible to host multiple backends with different models.

The "Models" section allows creating and editing model groups.

The "Model Instances" section allows creating various links to models. For each model, separate connections can be configured, each with its own individual parameters and settings.

<table data-header-hidden><thead><tr><th width="53.5555419921875"></th><th width="261.6666259765625"></th><th valign="top"></th></tr></thead><tbody><tr><td><strong>No.</strong></td><td><strong>Interface Element</strong></td><td valign="top"><strong>Description</strong></td></tr><tr><td></td><td><strong>Table "Models"</strong></td><td valign="top"></td></tr><tr><td>1.</td><td>button "Create"</td><td valign="top">Allows creating new model groups.</td></tr><tr><td>2.</td><td>button "Refresh"</td><td valign="top">Allows forcibly refreshing the "Models" table.</td></tr><tr><td>3.</td><td>button "Delete Selected"</td><td valign="top">Allows deleting selected model groups from the Sherpa AI Server. Individual model groups can also be deleted by clicking the button in the corresponding row of the Models table. When deleting a model group, a confirmation window appears.</td></tr><tr><td>4.</td><td>button "Export to CSV"</td><td valign="top">Generates a data file of model groups in CSV (Comma-Separated Values) format for import into spreadsheets and accounting systems.</td></tr><tr><td>5.</td><td>button "Export to XLSX"</td><td valign="top">Generates a data file of model groups in Microsoft Excel (XLSX) format for import into spreadsheets and accounting systems.</td></tr><tr><td></td><td><strong>Table "Model Instances"</strong></td><td valign="top"></td></tr><tr><td>1.</td><td>button "Create"</td><td valign="top">Allows creating model instances.</td></tr><tr><td>2.</td><td>button "Refresh"</td><td valign="top">Allows forcibly refreshing the "Model Instances" table.</td></tr><tr><td>3.</td><td>button "Delete Selected"</td><td valign="top">Allows deleting selected model instances from the Sherpa AI Server. Individual model instances can also be deleted by clicking the button in the corresponding row of the "Rules" table. When deleting model instances, a confirmation window appears.</td></tr><tr><td>4.</td><td>button "Export to CSV"</td><td valign="top">Generates a data file of model instances in CSV format for import into spreadsheets and accounting systems.</td></tr><tr><td>5.</td><td>button "Export to XLSX"</td><td valign="top">Generates a data file of model instances in Microsoft Excel (XLSX) format for import into spreadsheets and accounting systems.</td></tr></tbody></table>

## Selecting a Model on Other Screens of Sherpa AI Server

### Chat

The "Models" section allows viewing and editing model groups that the User can later select when [creating a new dialogue](https://docs.sherparpa.ru/en/sherpa-ai/sherpa-ai-server/rabota-v-sherpa-ai-server/chat) in the Sherpa AI Server.

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-d16d0c2ce818f7a1663d1a47023fa6f5f3d41e1c%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20(13).png?alt=media" alt=""><figcaption></figcaption></figure>

### Assistants

The "Models" section allows viewing and editing model groups that the User can later select when creating an [Assistant](https://docs.sherparpa.ru/en/sherpa-ai/sherpa-ai-server/rabota-v-sherpa-ai-server/assistenty).

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-ec3b4371fd7ec6b840ab3343a2bc24cdd04f5bb7%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20(16).png?alt=media" alt=""><figcaption></figcaption></figure>

## Create Model

To create a new model group, you need to click the "Create" button in the "Models" table and fill out the opened form.

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-c817ccb8d2e30b83c97d34cc69f76e116632e5db%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20(28).png?alt=media" alt=""><figcaption></figcaption></figure>

## Create Instance

To create a new model instance, you need to click the "Create" button in the "Model Instances" table and fill out the opened form.

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-967ff5b8d61a7275ea1db0ba9749ded36ef997b9%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20(29).png?alt=media" alt=""><figcaption></figcaption></figure>

Fields to fill in the "Create Instance" popup:

* "Name \*" – a mandatory field for the name of the model instance;
* "Description" – a field for entering a description of the model instance;
* "Host \*" – a mandatory field for specifying the IP address or domain name of the server where the model instance is hosted;
* "Port \*" – a mandatory field for specifying the service port number of the model instance;
* "Protocol \*" – a mandatory field for selecting the connection protocol;
* "Timeout \*" – a mandatory field for setting the maximum waiting time for a response from the model instance (in seconds).

There is also the option to create connections to cloud models (selecting the "Cloud" checkbox in the "Create Instance" window). Special settings are provided for this, including proxy servers and additional access tokens. In the case of local models, the configuration includes specifying the host, port, and protocol. The protocol remains our standard, similar to the OpenAI format, ensuring consistency and compatibility when working with various models.

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-dbfe154b3dcdab74fcb55f88372d1627d1757cd2%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20(15).png?alt=media" alt=""><figcaption></figcaption></figure>

Additional fields to fill in the "Create Model" popup (when selecting the "Cloud" checkbox in the "Create Instance" window):

* "Provider \*" – a field for selecting the model provider;
* "Provider Model" – a field for specifying a specific model from the selected provider;
* "Token / API Key \*" – a field for entering the provider's API key or authorization token;
* "Login" – a field for entering the username (when using basic authentication);
* "Password" – a field for entering the password (when using basic authentication).

This is a special container designed to run a single model. Essentially, it is a universal platform where any model can be launched, but only one at a time. To use multiple models, it is sufficient to launch several such containers, each with its own configuration. In each container, the port used to access the model will need to be changed. This approach allows for efficient use of a single server, running any number of models (the limitation only depends on hardware resources).

## Edit Model

To view and edit the properties of a model group, you need to select the desired group from the list and click the button ![](https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-dc74b7a07745f14c6ce68ae542872c3b70988ebe%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20\(70\).png?alt=media). After that, a form with model settings will open, where you can make the necessary changes. There are no new fields in the previously created model.

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-05a1498a89b00e1ce660c662decdd604a7ac9226%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20(487).png?alt=media" alt=""><figcaption></figcaption></figure>

## Edit Instance

To view and edit the properties of a model instance, you need to select the desired instance from the list and click the button ![](https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-dc74b7a07745f14c6ce68ae542872c3b70988ebe%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20\(70\).png?alt=media). After that, a form with instance settings will open, where you can make the necessary changes. There are no new fields in the previously created model instance.

<figure><img src="https://3237142148-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FscP4BXwl9ufpJr5mfVln%2Fuploads%2Fgit-blob-794eadf6ac8f9f890d9998bdf0142a5cefa35b90%2F%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5%20(488).png?alt=media" alt=""><figcaption></figcaption></figure>


---

# 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-ai/sherpa-ai-server/rabota-v-sherpa-ai-server/modeli.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.
