Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add a quick note to explain a workaround for incorrect token error even when using local provider with no auth required.
  • Loading branch information
knutle authored Oct 13, 2024
1 parent be04e41 commit 0e16178
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,15 @@ Phantom is the overlay UI placed inline in the editor view (see the picture belo
### Open Source models support (llama.cpp, ollama)

1. Replace `"url"` setting of a given model to point to whatever host you're server running on (e.g.`"http://localhost:8080"`).
2. [Optional] Provide a `"token"` if your provider required one.
2. [Optional] Provide a `"token"` if your provider required one. ()
3. Tweak `"chat_model"` to a model of your choice and you're set.

> [!NOTE]
> You can set both `url` and `token` either global or on per assistant instance basis, thus being capable to freely switching between closed source and open sourced models within a single session.
> [!TIP]
> In some cases, even if your provider does not require authentication, you may receive an error message stating _"No API token provided, you have to set the OpenAI token into the settings to make things work."_ To resolve this, simply set your `token` value to any string with 10 characters or more.
## Settings

The OpenAI Completion plugin has a settings file where you can set your OpenAI API key. This is required for the most of providers to work. To set your API key, open the settings within `Preferences` -> `Package Settings` -> `OpenAI` -> `Settings` and paste your API key in the token property, as follows:
Expand All @@ -150,6 +153,7 @@ The OpenAI Completion plugin has a settings file where you can set your OpenAI A
}
```


### Advertisement disabling

To disable advertisement you have to add `"advertisement": false` line into an assistant setting where you wish it to be disabled.
Expand Down Expand Up @@ -197,4 +201,4 @@ You can setup it up by overriding the proxy property in the `OpenAI completion`
[stars]: https://github.com/yaroslavyaroslav/OpenAI-sublime-text/stargazers
[img-stars]: static/media/star-on-github.svg
[downloads]: https://packagecontrol.io/packages/OpenAI%20completion
[img-downloads]: https://img.shields.io/packagecontrol/dt/OpenAI%2520completion.svg
[img-downloads]: https://img.shields.io/packagecontrol/dt/OpenAI%2520completion.svg

0 comments on commit 0e16178

Please sign in to comment.