Open
Description
Custom providers
To list-models
or run gptscript with supported providers like - anthropic , the provide url used in the context of model should not have "https://".
These calls (without https:// )work:
gptscript --list-models github.com/gptscript-ai/anthropic-provider
gptscript --cache=false --default-model='claude-3-haiku-20240307 from github.com/gptscript-ai/anthropic-provider' examples/helloworld.gpt
Using https://
in provider url would fail:
% gptscript --list-models https://github.com/gptscript-ai/anthropic-provider
2024/04/03 11:56:32 error, status code: 404, message: {"error":"Not Found"}
% gptscript --cache=false --default-model='claude-3-haiku-20240307 from https://github.com/gptscript-ai/anthropic-provider' examples/helloworld.gpt
11:56:52 WARNING: Changing the default model can have unknown behavior for existing tools. Use the model field per tool instead.
11:56:52 started [main]
11:56:52 sent [main]
content [1] content | Waiting for model response...2024/04/03 11:56:52 error, status code: 403, message: Cookies must be enabled to use GitHub.
openai compatible provider
To list-models
or run gptscript for openai compatible provider like mistral , the provide url used in the context of model should have "https://".
Have GPTSCRIPT_PROVIDER_API_MISTRAL_AI_API_KEY
set
These calls (with https://) work:
gptscript --list-models https://api.mistral.ai/v1
gptscript --cache=false --default-model='mistral-large-latest from https://api.mistral.ai/v1' examples/bob.gpt
Without having https://
in provider url would fail:
gptscript --cache=false --default-model='mistral-large-latest from api.mistral.ai/v1' examples/bob.gpt
12:06:28 WARNING: Changing the default model can have unknown behavior for existing tools. Use the model field per tool instead.
12:06:28 started [main]
2024/04/03 12:06:28 OPENAI_API_KEY is not set. Please set the OPENAI_API_KEY environment variable
can not load tools path= name=api.mistral.ai/v1
It would be good to support a standard way of providing the provider url (with or without protocol).