bananaml/fructose

Make base_url for the openai a variable

Closed this issue · 2 comments

In order to be able to test and leverages other openAI compatible end points, would it be possible to support an openai_base_url variable and to push it to openai.client as you do it today for the api_key?
Examples for Open AI base_url examples

Yes I’ll add it as an env var and push a new build within 30 min

note that we use json return mode for all calls and the openai tools api for ‘uses’ function calling so use alternative providers at your own risk

also note you can currently supply your own openai client with
ai = Fructose(client=my_client)

Looks like the openai client already accepts this environment variable, no changes needed in potassium. We won't be adding it as an explicit arg.

export OPENAI_BASE_URL=https://yourendpoint

WIll get this added to docs, at least