-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 to use OpenAI API #6188
Comments
Please try in the UI settings, choose Advanced Settings, and set |
In fact I set up the clash on the host machine and I want to use the
|
The error in your post doesn't seem related to setting that It's docker. I'm not sure why it fails to connect. That connection in your error log is NOT to the LLM, it's to the sandbox where the agent is running. Are you running with the command in the readme and no other docker configuration modifications? |
Yes. My second reply is with the command in the readme and no other docker configuration modifications. Now, I will try to install a clash in the container after it has been created. I believe many users of your agent need a proxy to use the LLM API and not for other http request. So I believe a setting or a special environment variable could be used to solve the problem. |
please ping me if your problem is solved. Hopefully there is a solution for it |
Sorry, just to clarify: there already is an env var for use of a proxy to the LLM API and nothing else, it's |
I try to use the OpenAI API with OpenHands Agent GUI. However, due to some network problem, I (and some people) must use proxy to get service from OpenAI. How can I set the proxy?
I install the openhands with a standard installed docker:
Specifically, I install docker in root account and then use
newgrp docker
to get the authority to use docker.Then I install OpenHands by the standard instruction in the main page.
I have tried to use HTTP_PROXY and HTTPS_PROXY enviroment variables but it seems useless. I also try this method (https://docs.docker.com/engine/cli/proxy/). Specifically I write the proxy in a
~/.docker/config.json
file. However, I find this error.My config.json file is :
I use a clash in the host machine and the clash listen to the port 7890. In the host machine, I can successfully get google by setting HTTP_PROXY=http://127.0.0.1:7890
And I remove the proxy config the error disappears but I cannot get the OpenAI API.
Does anyone know how to solve the problem?
The text was updated successfully, but these errors were encountered: