-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy through server #37
Comments
So more or less a way of changing the base URL used for the API? I can add in a parameter to change out the URL for proxies, as long as your own proxy has the same mechanisms of handling traffic from and to the app. |
Thanks for the reply. I've read through more of your source and think the ideal for my use case at least would be to be able to swap in both a custom base URL as well as a custom "base API client" so that I can use my own server's auth schemes. In my case I generate OpenAPI clients for my server via openapi-generator using URLTask async/await in swift5. I'm thinking how best to abstract OpenAI.swift in this project to allow swapping in alternative API clients for users who already have something working for server auth or other network/header needs for delivering the request payload. Maybe define a protocol and let the user swap in something that bridges to the user's API client library to the payload you want to deliver |
I'll create a branch for this repo, and I will let you try it out to see if it fits within your requirements. Once a decision is a made, I'll go ahead and release the feature for my next version that'll include Whisper's endpoints. |
Thank you, happy to give feedback. For now I've forked to meet my needs but didn't find a nice way to contribute something back upstream, so it's great if you have a better way in mind. |
Heyo, It's a pleasure to have you suggest the feature in the first place. I'd be more than happy to see how your own implementation went. I do agree that having a more advanced feature for proxy servers would be beneficial for this project. Let me know if you're interested in publishing a PR or just willing to share your own code. |
Describe the feature or improvement you're requesting
I want to meter users by proxying requests through my server, but I still want to use your nice interface to the API instead of creating a new one for the server interaction. So I'd love to be able to send the requests to a custom hostname or base URL, without needing an API key and then I can ship this to iOS apps too.
Additional context
No response
The text was updated successfully, but these errors were encountered: