language_models: Add support for API key to Ollama provider (#34110)
Closes https://github.com/zed-industries/zed/issues/19491 Release Notes: - Ollama: Added configuration of URL and API key for remote Ollama provider. --------- Signed-off-by: Umesh Yadav <git@umesh.dev> Co-authored-by: Peter Tripp <peter@zed.dev> Co-authored-by: Oliver Azevedo Barnes <oliver@liquidvoting.io> Co-authored-by: Michael Sloan <michael@zed.dev>
This commit is contained in:
co-authored by
Peter Tripp
Oliver Azevedo Barnes
Michael Sloan
parent
a598fbaa73
commit
526196917b
@@ -376,6 +376,20 @@ If the model is tagged with `thinking` in the Ollama catalog, set this option an
|
||||
The `supports_images` option enables the model's vision capabilities, allowing it to process images included in the conversation context.
|
||||
If the model is tagged with `vision` in the Ollama catalog, set this option and you can use it in Zed.
|
||||
|
||||
#### Ollama Authentication
|
||||
|
||||
In addition to running Ollama on your own hardware, which generally does not require authentication, Zed also supports connecting to remote Ollama instances. API keys are required for authentication.
|
||||
|
||||
One such service is [Ollama Turbo])(https://ollama.com/turbo). To configure Zed to use Ollama turbo:
|
||||
|
||||
1. Sign in to your Ollama account and subscribe to Ollama Turbo
|
||||
2. Visit [ollama.com/settings/keys](https://ollama.com/settings/keys) and create an API key
|
||||
3. Open the settings view (`agent: open settings`) and go to the Ollama section
|
||||
4. Paste your API key and press enter.
|
||||
5. For the API URL enter `https://ollama.com`
|
||||
|
||||
Zed will also use the `OLLAMA_API_KEY` environment variables if defined.
|
||||
|
||||
### OpenAI {#openai}
|
||||
|
||||
1. Visit the OpenAI platform and [create an API key](https://platform.openai.com/account/api-keys)
|
||||
|
||||
Reference in New Issue
Block a user