How to customize API BaseURL?
WalterZou opened this issue · 7 comments
Sometimes we don't directly use OpenAI's API, but instead wrap it with a proxy for usage. How to configure the BaseURL of the API?
This is a feature that I'm actively working on right now. My goal is to add very easy pass-through support for exactly this kind of proxy, where both the proxy and the "real" client can be written using CleverBird.
Cool, looking forward to it
Can you also add support for Azure OpenAI? please.
@iTarek That is a very different request than a simple change of URL, as the Azure OpenAI API spec can theoretically change independent of the "core" OpenAI one, which would change the backing implementation. Could you please file that as a new issue so I can design and investigate that by itself?
Realistically, I'm not planning to spend much more time adding features to CleverBird, but I'd be happy to consider a pull request that implements this.
I created a PR to support custom URLs. I'm using it myself for my Server-side Swift OpenAI proxy (https://github.com/ronaldmannak/SwiftOpenAIProxy)
This change from @ronaldmannak has been merged. Thanks for the contribution!