mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
docs: update local copilot instructions for macOS (#1077)
* docs: update local copilot instructions for macOS * docs: add source and more detailed instructions for Ollama setup instructions
This commit is contained in:
parent
49fee3a175
commit
b19671b39a
1 changed files with 20 additions and 0 deletions
|
|
@ -43,12 +43,32 @@ Look for this parameter `llama_new_context_with_model: n_ctx` in your server log
|
|||
|
||||
#### Start Ollama server for Obsidian
|
||||
|
||||
In order for Obsidian to communicate with Ollama, the `OLLAMA_ORIGINS` variable needs to be updated. Choose your method for running Ollama to get detailed instructions for how to update Ollama correctly.
|
||||
|
||||
<details>
|
||||
<summary>CLI</summary>
|
||||
|
||||
Now, **start the local server with `OLLAMA_ORIGINS=app://obsidian.md* ollama serve`, this will allow the Obsidian app to access the local server without CORS issues**.
|
||||
|
||||
> **NOTE**: If using `fish`, quote the env value: `OLLAMA_ORIGINS="app://obsidian.md*" ollama serve`
|
||||
|
||||
Again, `OLLAMA_ORIGINS=app://obsidian.md*` is required!
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>macOS App</summary>
|
||||
|
||||
If Ollama is run as a macOS application, [environment variables should be set using launchctl](https://github.com/Ollama/Ollama/blob/main/docs/faq.md#setting-environment-variables-on-mac). To support Obsidian, set "app://obsidian.md*" on the `OLLAMA_ORIGINS` variable by running this command:
|
||||
|
||||
```sh
|
||||
launchctl setenv OLLAMA_ORIGINS "app://obsidian.md*"
|
||||
```
|
||||
|
||||
Then, quit Ollama from the menu bar and reopen it.
|
||||
|
||||
</details>
|
||||
|
||||
<img src="./images/ollama-serve.png" alt="Ollama">
|
||||
|
||||
Inside Copilot settings, click Add Custom Model, enter the model name you pulled from Ollama, e.g. `mistral`, select `ollama` as provider, click add, and you'll find it in your model picker!
|
||||
|
|
|
|||
Loading…
Reference in a new issue