-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(api): update model descriptions for previous vendors (#3747)
* docs(api): update model descriptions and configuration examples for various AI providers * docs(api): clarify API endpoint usage and model specifications in documentation
- Loading branch information
Showing
9 changed files
with
145 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
# DeepSeek | ||
|
||
[DeepSeek](https://www.deepseek.com/) offers a suite of AI models, such as [DeepSeek V3](https://huggingface.co/deepseek-ai/DeepSeek-V3) and [DeepSeek Coder](https://huggingface.co/collections/deepseek-ai/deepseekcoder-v2-666bf4b274a5f556827ceeca), which perform well in coding tasks. Tabby supports DeepSeek's models for both code completion and chat. | ||
[DeepSeek](https://www.deepseek.com/) is an AI company that develops large language models specialized in coding and general tasks. Their models include [DeepSeek V3](https://huggingface.co/deepseek-ai/DeepSeek-V3) for general tasks and [DeepSeek Coder](https://huggingface.co/collections/deepseek-ai/deepseekcoder-v2-666bf4b274a5f556827ceeca) specifically optimized for programming tasks. | ||
|
||
Below is an example | ||
## Chat model | ||
|
||
DeepSeek provides an OpenAI-compatible chat API interface. | ||
|
||
```toml title="~/.tabby/config.toml" | ||
# Chat model configuration | ||
[model.chat.http] | ||
# Deepseek's chat interface is compatible with OpenAI's chat API. | ||
kind = "openai/chat" | ||
model_name = "your_model" | ||
api_endpoint = "https://api.deepseek.com/v1" | ||
api_key = "secret-api-key" | ||
api_key = "your-api-key" | ||
``` | ||
|
||
## Completion model | ||
|
||
DeepSeek offers a specialized completion API interface for code completion tasks. | ||
|
||
# Completion model configuration | ||
```toml title="~/.tabby/config.toml" | ||
[model.completion.http] | ||
# Deepseek uses its own completion API interface. | ||
kind = "deepseek/completion" | ||
model_name = "your_model" | ||
api_endpoint = "https://api.deepseek.com/beta" | ||
api_key = "secret-api-key" | ||
api_key = "your-api-key" | ||
``` | ||
|
||
## Embeddings model | ||
|
||
DeepSeek currently does not provide embedding model APIs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
# Jan AI | ||
|
||
[Jan](https://jan.ai/) is an open-source alternative to ChatGPT that runs entirely offline on your computer. | ||
[Jan](https://jan.ai/) is an open-source alternative to ChatGPT that runs entirely offline on your computer. It provides an OpenAI-compatible server interface that can be enabled through the Jan App's `Local API Server` UI. | ||
|
||
Jan can run a server that provides an OpenAI-equivalent chat API at https://localhost:1337, | ||
allowing us to use the OpenAI kinds for chat. | ||
To use the Jan Server, you need to enable it in the Jan App's `Local API Server` UI. | ||
## Chat model | ||
|
||
However, Jan does not yet provide API support for completion and embeddings. | ||
|
||
Below is an example for chat: | ||
Jan provides an OpenAI-compatible chat API interface. | ||
|
||
```toml title="~/.tabby/config.toml" | ||
# Chat model | ||
[model.chat.http] | ||
kind = "openai/chat" | ||
model_name = "your_model" | ||
api_endpoint = "http://localhost:1337/v1" | ||
api_key = "" | ||
``` | ||
``` | ||
|
||
## Completion model | ||
|
||
Jan currently does not provide completion API support. | ||
|
||
## Embeddings model | ||
|
||
Jan currently does not provide embedding API support. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,31 @@ | ||
# Mistral AI | ||
|
||
[Mistral](https://mistral.ai/) is a platform that provides a suite of AI models. Tabby supports Mistral's models for code completion and chat. | ||
[Mistral](https://mistral.ai/) is a platform that provides a suite of AI models specialized in various tasks, including code generation and natural language processing. Their models are known for high performance and efficiency in both code completion and chat interactions. | ||
|
||
To connect Tabby with Mistral's models, you need to apply the following configurations in the `~/.tabby/config.toml` file: | ||
## Chat model | ||
|
||
```toml title="~/.tabby/config.toml" | ||
# Completion Model | ||
[model.completion.http] | ||
kind = "mistral/completion" | ||
model_name = "codestral-latest" | ||
api_endpoint = "https://api.mistral.ai" | ||
api_key = "secret-api-key" | ||
Mistral provides a specialized chat API interface. | ||
|
||
# Chat Model | ||
```toml title="~/.tabby/config.toml" | ||
[model.chat.http] | ||
kind = "mistral/chat" | ||
model_name = "codestral-latest" | ||
api_endpoint = "https://api.mistral.ai/v1" | ||
api_key = "secret-api-key" | ||
api_key = "your-api-key" | ||
``` | ||
|
||
## Completion model | ||
|
||
Mistral offers a dedicated completion API interface for code completion tasks. | ||
|
||
```toml title="~/.tabby/config.toml" | ||
[model.completion.http] | ||
kind = "mistral/completion" | ||
model_name = "codestral-latest" | ||
api_endpoint = "https://api.mistral.ai" | ||
api_key = "your-api-key" | ||
``` | ||
|
||
## Embeddings model | ||
|
||
Mistral currently does not provide embedding model APIs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,48 @@ | ||
# vLLM | ||
|
||
[vLLM](https://docs.vllm.ai/en/stable/) is a fast and user-friendly library for LLM inference and serving. | ||
[vLLM](https://docs.vllm.ai/en/stable/) is a fast and user-friendly library for LLM inference and serving. It provides an OpenAI-compatible server interface, allowing the use of OpenAI kinds for chat and embedding, while offering a specialized interface for completions. | ||
|
||
vLLM offers an `OpenAI Compatible Server`, enabling us to use the OpenAI kinds for chat and embedding. | ||
However, for completion, there are certain differences in the implementation. | ||
Therefore, we should use the `vllm/completion` kind and provide a `prompt_template` depending on the specific models. | ||
Important requirements for all model types: | ||
|
||
Please note that models differ in their capabilities for completion or chat. | ||
You should confirm the model's capability before employing it for chat or completion tasks. | ||
- `model_name` must exactly match the one used to run vLLM | ||
- `api_endpoint` should follow the format `http://host:port/v1` | ||
- `api_key` should be identical to the one used to run vLLM | ||
|
||
Additionally, there are models that can serve both as chat and completion. | ||
For detailed information, please refer to the [Model Registry](../../models/index.mdx). | ||
Please note that models differ in their capabilities for completion or chat. Some models can serve both purposes. For detailed information, please refer to the [Model Registry](../../models/index.mdx). | ||
|
||
Below is an example of the vLLM running at `http://localhost:8000`: | ||
## Chat model | ||
|
||
Please note the following requirements in each model type: | ||
1. `model_name` must exactly match the one used to run vLLM. | ||
2. `api_endpoint` should follow the format `http://host:port/v1`. | ||
3. `api_key` should be identical to the one used to run vLLM. | ||
vLLM provides an OpenAI-compatible chat API interface. | ||
|
||
```toml title="~/.tabby/config.toml" | ||
# Chat model | ||
[model.chat.http] | ||
kind = "openai/chat" | ||
model_name = "your_model" # Please make sure to use a chat model. | ||
model_name = "your_model" # Please make sure to use a chat model | ||
api_endpoint = "http://localhost:8000/v1" | ||
api_key = "secret-api-key" | ||
api_key = "your-api-key" | ||
``` | ||
|
||
## Completion model | ||
|
||
# Completion model | ||
Due to implementation differences, vLLM uses its own completion API interface that requires a specific prompt template based on the model being used. | ||
|
||
```toml title="~/.tabby/config.toml" | ||
[model.completion.http] | ||
kind = "vllm/completion" | ||
model_name = "your_model" # Please make sure to use a completion model. | ||
model_name = "your_model" # Please make sure to use a completion model | ||
api_endpoint = "http://localhost:8000/v1" | ||
api_key = "secret-api-key" | ||
prompt_template = "<PRE> {prefix} <SUF>{suffix} <MID>" # Example prompt template for the CodeLlama model series. | ||
api_key = "your-api-key" | ||
prompt_template = "<PRE> {prefix} <SUF>{suffix} <MID>" # Example prompt template for the CodeLlama model series | ||
``` | ||
|
||
## Embeddings model | ||
|
||
# Embedding model | ||
vLLM provides an OpenAI-compatible embeddings API interface. | ||
|
||
```toml title="~/.tabby/config.toml" | ||
[model.embedding.http] | ||
kind = "openai/embedding" | ||
model_name = "your_model" | ||
api_endpoint = "http://localhost:8000/v1" | ||
api_key = "secret-api-key" | ||
api_key = "your-api-key" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters