Skip to content

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

@sangee2004

Description

@sangee2004

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions