Difficulty Implementing Proxy for OpenAI API with App Calling and curl Insufficiency
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 12.4k
- Forks
- 510
- PR merge metrics
- No merged PRs in 30d
Description
Problem
I'm trying to create a proxy to communicate with the OpenAI API api.openai.com:443. The idea is to have the proxy running while the web service that uses the mentioned API is defining the OpenAI URL with the proxy "127.0.0.1:2269" to apply certain toxics.
The solution proposed in this comment works for me:
However, it is not applicable to my solution as it is an app that calls OpenAI, and curl is not sufficient. The alternative I'm trying to apply is to modify /etc/hosts as proposed in this comment within the service that calls the API.
However, I receive the following errors with these alternatives:
image
Also following this guide
https://theholyjava.wordpress.com/2018/11/26/java-understanding-the-different-network-https-exceptions/
Any ideas?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked discussion in issue #175 and compare the proxy and /etc/hosts approaches described there. The report provides no repository file or test to inspect and does not define a concrete change; a useful next step would be to establish whether Toxiproxy should support this OpenAI HTTPS client setup and what behavior would count as fixed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100