Shopify / Shopify/toxiproxy

Difficulty Implementing Proxy for OpenAI API with App Calling and curl Insufficiency

Open
#544 0 comments 0 reactions 0 assignees View on GitHub

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:

image

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.

image

However, I receive the following errors with these alternatives:

imageimage
image

Also following this guide
https://theholyjava.wordpress.com/2018/11/26/java-understanding-the-different-network-https-exceptions/
image

Any ideas?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.