From 0e16178d1402dd3583bbed92669ec195e21b4a01 Mon Sep 17 00:00:00 2001 From: Knut Leborg Date: Sun, 13 Oct 2024 13:01:34 +0200 Subject: [PATCH] Update README.md Add a quick note to explain a workaround for incorrect token error even when using local provider with no auth required. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1b91239..6855661 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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. @@ -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 \ No newline at end of file +[img-downloads]: https://img.shields.io/packagecontrol/dt/OpenAI%2520completion.svg