-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Labels
PrioritybugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
In our openai backend, we set defaults if values are None:
if base_url is None:
self._base_url = "http://localhost:11434/v1" # ollama
else:
self._base_url = base_url
if api_key is None:
self._api_key = "ollama"
else:
self._api_key = api_key
This is counterintuitive because the openai sdk will grab environment variables as the default if they are not set. For example:
if api_key is None:
api_key = os.environ.get("OPENAI_API_KEY")
...
if base_url is None:
base_url = os.environ.get("OPENAI_BASE_URL")
if base_url is None:
base_url = f"https://api.openai.com/v1"
I think we should either remove our defaults (and maybe provide an error message explaining how to use ollama if something goes wrong) or explicitly look for those env variables before setting our own defaults. Even in that case, our defaults would differ from the openai defaults which would probably cause some friction.
Metadata
Metadata
Assignees
Labels
PrioritybugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers