Skip to content

Prompted for entering API keys when using local models which require no keys. #509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sangee2004 opened this issue Jun 18, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@sangee2004
Copy link
Contributor

gptscript version v0.8.2+1b5e068f

Steps to reproduce the problem:

  1. Host a LLM model locally

  2. Execute gptscript using this model.

  3. User is prompted to enter API keys for the model which is incorrect.

 gptscript --disable-cache --default-model 'Llama-3-8b-function-calling-alpha-v1.gguf from http://localhost:1234/v1' examples/bob.gpt
12:15:55 WARNING: Changing the default model can have unknown behavior for existing tools. Use the model field per tool instead.
12:15:55 started  [main]
? Please provide your API key for http://localhost:1234/v1 
12:15:58 Saved API key as credential http://localhost:1234/v1
12:15:58 sent     [main]
12:16:00 ended    [main] [output=starttoolcall{\"name\": \"bob\", \"arguments\": \"{\\\"question\\\":\\\"How are you doing?\\\"}\"}endtoolcall]
12:16:00 usage    [total=220] [prompt=193] [completion=27]

OUTPUT:

starttoolcall{"name": "bob", "arguments": "{\"question\":\"How are you doing?\"}"}endtoolcall

  1. This behavior is also seen when listing models
% gptscript --list-models http://localhost:1234/v1 
? Please provide your API key for http://localhost:1234/v1 
11:40:22 Saved API key as credential http://localhost:1234/v1
  1. Not entering anything when prompted for credentials (from step 3 and step 4), results in a credential entry being created after which I am not able to list credentials.
% gptscript credentials                           
2024/06/18 11:41:58 failed to list credentials: unexpected end of JSON input

Deleting the credential created allows for existing credentials to be listed.

%gptscript credential delete http://localhost:1234/v1 

% gptscript credential                                 
braveSearchAPIKey
sys.openai
@g-linville
Copy link
Member

@sangee2004 can you re-test this one? Should be fixed.

@sangee2004
Copy link
Contributor Author

sangee2004 commented Jul 1, 2024

Tested with gptscript version - v0.0.0-dev-a42c9e31-dirty. This issue is not seen anymore. We are not prompted to enter credentials when testing with local models that have no authentication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants