chat-langchain
chat-langchain copied to clipboard
For somebody who need to use proxy to access, you can try this
1、add below code:
import openai
openai.proxy = {
"http": "http://127.0.0.1:7890",
"https": "http://127.0.0.1:7890"
}
2、change openai.py file:
max_reties = 6
stop=stop_after_attempt(max_reties),
where is openai.py file
where is openai.py file
I added a proxy to the header of the main.py file and it is working.
where is openai.py file
I added a proxy to the header of the main.py file and it is working.
great! it really works fine with me. thank you!
thanks, it solved my problem
where is openai.py file
If using openai.proxy
to set up a proxy does not work, you can try setting up a network proxy by setting environment variables using the following code:
import os
os.environ["http_proxy"] = "http://127.0.0.1:7890"
os.environ["https_proxy"] = "http://127.0.0.1:7890"
In this code, the port number is the port number of the proxy software, for example, 7890 for Clash.
Hi is there a way to add proxy for javascript?
It's also viable to setup OPENAI_PROXY=http://IP:PORT
env variable
It's also viable to setup
OPENAI_PROXY=http://IP:PORT
env variable
It works! Thank you
Thank you, finally got through
where is openai.py file
If using
openai.proxy
to set up a proxy does not work, you can try setting up a network proxy by setting environment variables using the following code:import os os.environ["http_proxy"] = "http://127.0.0.1:7890" os.environ["https_proxy"] = "http://127.0.0.1:7890"
In this code, the port number is the port number of the proxy software, for example, 7890 for Clash.
Thank you!It works well.