liboai icon indicating copy to clipboard operation
liboai copied to clipboard

Method to set the openai_root_

Open aschet opened this issue 1 year ago • 1 comments

Describe the feature or improvement you're requesting

Currently the API endpoint is hardcoded to "https://api.openai.com/v1". This makes it hard to use this library against other implementations of the OpenAI API, e.g. Ollama, which provides support for chat completion. Therefore, it would be great to add a way to configure a specific endpoint so that this library can be used with Ollama without modification. To my knowledge, this is currently only possible by modifying openai_root_ at compiletime. It also would be great if it were possible to specify one API key per "connection" as it is in the Python API.

Additional context

No response

aschet avatar Sep 20 '24 07:09 aschet