mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Clean AI model API providers documentation
This commit is contained in:
@@ -22,13 +22,13 @@ Using LiteLLM with Khoj makes it possible to turn any LLM behind an API into you
|
|||||||
litellm --model mistral/mistral-tiny --drop_params
|
litellm --model mistral/mistral-tiny --drop_params
|
||||||
```
|
```
|
||||||
3. Create a new [API Model API](http://localhost:42110/server/admin/database/aimodelapi/add) on your Khoj admin panel
|
3. Create a new [API Model API](http://localhost:42110/server/admin/database/aimodelapi/add) on your Khoj admin panel
|
||||||
- Name: `proxy-name`
|
- **Name**: `litellm`
|
||||||
- Api Key: `any string`
|
- **Api Key**: `any string`
|
||||||
- Api Base Url: **URL of your Openai Proxy API**
|
- **Api Base Url**: `<URL of your Openai Proxy API>`
|
||||||
4. Create a new [Chat Model](http://localhost:42110/server/admin/database/chatmodel/add) on your Khoj admin panel.
|
4. Create a new [Chat Model](http://localhost:42110/server/admin/database/chatmodel/add) on your Khoj admin panel.
|
||||||
- Name: `llama3.1` (replace with the name of your local model)
|
- **Name**: `llama3.1` (replace with the name of your local model)
|
||||||
- Model Type: `Openai`
|
- **Model Type**: `Openai`
|
||||||
- Openai Config: `<the proxy config you created in step 3>`
|
- **Ai Model Api**: *the litellm Ai Model API you created in step 3*
|
||||||
- Max prompt size: `20000` (replace with the max prompt size of your model)
|
- **Max prompt size**: `20000` (replace with the max prompt size of your model)
|
||||||
- Tokenizer: *Do not set for OpenAI, Mistral, Llama3 based models*
|
- **Tokenizer**: *Do not set for OpenAI, Mistral, Llama3 based models*
|
||||||
5. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
|
5. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ LM Studio can expose an [OpenAI API compatible server](https://lmstudio.ai/docs/
|
|||||||
## Setup
|
## Setup
|
||||||
1. Install [LM Studio](https://lmstudio.ai/) and download your preferred Chat Model
|
1. Install [LM Studio](https://lmstudio.ai/) and download your preferred Chat Model
|
||||||
2. Go to the Server Tab on LM Studio, Select your preferred Chat Model and Click the green Start Server button
|
2. Go to the Server Tab on LM Studio, Select your preferred Chat Model and Click the green Start Server button
|
||||||
3. Create a new [Add ai model api](http://localhost:42110/server/admin/database/aimodelapi/add/) on your Khoj admin panel
|
3. Create a new [AI Model API](http://localhost:42110/server/admin/database/aimodelapi/add/) on your Khoj admin panel
|
||||||
- Name: `proxy-name`
|
- **Name**: `lmstudio`
|
||||||
- Api Key: `any string`
|
- **Api Key**: `any string`
|
||||||
- Api Base Url: `http://localhost:1234/v1/` (default for LMStudio)
|
- **Api Base Url**: `http://localhost:1234/v1/` (default for LMStudio)
|
||||||
4. Create a new [Chat Model](http://localhost:42110/server/admin/database/chatmodel/add) on your Khoj admin panel.
|
4. Create a new [Chat Model](http://localhost:42110/server/admin/database/chatmodel/add) on your Khoj admin panel.
|
||||||
- Name: `llama3.1` (replace with the name of your local model)
|
- **Name**: `llama3.1` (replace with the name of your local model)
|
||||||
- Model Type: `Openai`
|
- **Model Type**: `Openai`
|
||||||
- Ai model api: `<the Ai model api you created in step 3>`
|
- **Ai Model Api**: *the lmstudio Ai Model Api you created in step 3*
|
||||||
- Max prompt size: `20000` (replace with the max prompt size of your model)
|
- **Max prompt size**: `20000` (replace with the max prompt size of your model)
|
||||||
- Tokenizer: *Do not set for OpenAI, mistral, llama3 based models*
|
- **Tokenizer**: *Do not set for OpenAI, mistral, llama3 based models*
|
||||||
5. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
|
5. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
|
||||||
|
|||||||
@@ -61,14 +61,14 @@ Restart your Khoj server after first run or update to the settings below to ensu
|
|||||||
ollama pull llama3.1
|
ollama pull llama3.1
|
||||||
```
|
```
|
||||||
3. Create a new [AI Model API](http://localhost:42110/server/admin/database/aimodelapi/add) on your Khoj admin panel
|
3. Create a new [AI Model API](http://localhost:42110/server/admin/database/aimodelapi/add) on your Khoj admin panel
|
||||||
- Name: `ollama`
|
- **Name**: `ollama`
|
||||||
- Api Key: `any string`
|
- **Api Key**: `any string`
|
||||||
- Api Base Url: `http://localhost:11434/v1/` (default for Ollama)
|
- **Api Base Url**: `http://localhost:11434/v1/` (default for Ollama)
|
||||||
4. Create a new [Chat Model](http://localhost:42110/server/admin/database/chatmodel/add) on your Khoj admin panel.
|
4. Create a new [Chat Model](http://localhost:42110/server/admin/database/chatmodel/add) on your Khoj admin panel.
|
||||||
- Name: `llama3.1` (replace with the name of your local model)
|
- **Name**: `llama3.1` (replace with the name of your local model)
|
||||||
- Model Type: `Openai`
|
- **Model Type**: `Openai`
|
||||||
- Openai Config: `<the ollama config you created in step 3>`
|
- **AI Model API**: *the ollama AI Model API you created in step 3*
|
||||||
- Max prompt size: `20000` (replace with the max prompt size of your model)
|
- **Max prompt size**: `20000` (replace with the max prompt size of your model)
|
||||||
5. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
|
5. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
|
||||||
|
|
||||||
If you want to add additional models running on Ollama, repeat step 4 for each model.
|
If you want to add additional models running on Ollama, repeat step 4 for each model.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Khoj natively supports local LLMs [available on HuggingFace in GGUF format](http
|
|||||||
:::
|
:::
|
||||||
|
|
||||||
Khoj can use any OpenAI API compatible server including local providers like [Ollama](/advanced/ollama), [LMStudio](/advanced/lmstudio) and [LiteLLM](/advanced/litellm) and commercial providers like [HuggingFace](https://huggingface.co/docs/api-inference/tasks/chat-completion#using-the-api), [OpenRouter](https://openrouter.ai/docs/quick-start) etc.
|
Khoj can use any OpenAI API compatible server including local providers like [Ollama](/advanced/ollama), [LMStudio](/advanced/lmstudio) and [LiteLLM](/advanced/litellm) and commercial providers like [HuggingFace](https://huggingface.co/docs/api-inference/tasks/chat-completion#using-the-api), [OpenRouter](https://openrouter.ai/docs/quick-start) etc.
|
||||||
Configuring this allows you to use non-standard, open or commercial, local or hosted LLM models for Khoj
|
Configuring this allows you to use non-standard, open or commercial, local or hosted LLM models for Khoj.
|
||||||
|
|
||||||
Combine them with Khoj can turn your favorite LLM into an AI agent. Allowing you to chat with your docs, find answers from the internet, build custom agents and run automations.
|
Combine them with Khoj can turn your favorite LLM into an AI agent. Allowing you to chat with your docs, find answers from the internet, build custom agents and run automations.
|
||||||
|
|
||||||
@@ -22,13 +22,13 @@ For specific integrations, see our [Ollama](/advanced/ollama), [LMStudio](/advan
|
|||||||
|
|
||||||
1. Start your preferred OpenAI API compatible app locally or get API keys from commercial AI model providers.
|
1. Start your preferred OpenAI API compatible app locally or get API keys from commercial AI model providers.
|
||||||
3. Create a new [API Model API](http://localhost:42110/server/admin/database/aimodelapi/add) on your Khoj admin panel
|
3. Create a new [API Model API](http://localhost:42110/server/admin/database/aimodelapi/add) on your Khoj admin panel
|
||||||
- Name: `any name`
|
- **Name**: `any name`
|
||||||
- Api Key: `any string`
|
- **Api Key**: `any string`
|
||||||
- Api Base Url: **URL of your Openai Proxy API**
|
- **Api Base Url**: *The URL of your Openai Compatible API*
|
||||||
3. Create a new [Chat Model](http://localhost:42110/server/admin/database/chatmodel/add) on your Khoj admin panel.
|
3. Create a new [Chat Model](http://localhost:42110/server/admin/database/chatmodel/add) on your Khoj admin panel.
|
||||||
- Name: `llama3` (replace with the name of your local model)
|
- **Name**: `llama3` (replace with the name of your local model)
|
||||||
- Model Type: `Openai`
|
- **Model Type**: `Openai`
|
||||||
- Openai Config: `<the proxy config you created in step 2>`
|
- **Ai Model Api**: *The AI Model API you created in step 2*
|
||||||
- Max prompt size: `2000` (replace with the max prompt size of your model)
|
- **Max prompt size**: `2000` (replace with the max prompt size of your model)
|
||||||
- Tokenizer: *Do not set for OpenAI, mistral, llama3 based models*
|
- **Tokenizer**: *Do not set for OpenAI, mistral, llama3 based models*
|
||||||
4. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
|
4. Go to [your config](http://localhost:42110/settings) and select the model you just created in the chat model dropdown.
|
||||||
|
|||||||
Reference in New Issue
Block a user