olrea / openai-cpp

OpenAI C++ is a community-maintained library for the Open AI API
https://openai.com/api/
MIT License
183 stars 65 forks source link

add OPENAI_API_BASE url support #21

Closed matatonic closed 1 year ago

matatonic commented 1 year ago

This adds support for the OPENAI_API_BASE environment variable, a standard way to redirect the other openai clients (openai-python & openai-node). It enables support of alternate openai compatible implementations, like https://github.com/oobabooga/text-generation-webui

I compiled and ran the tests against text-generation-webui and for the working portions it was successful (it's not a complete re-implementation).

coin-au-carre commented 1 year ago

Thanks @matatonic I will take a look and merge your work !