lm-sys / FastChat

An open platform for training, serving, and evaluating large language models. Release repo for Vicuna and Chatbot Arena.
Apache License 2.0
35.6k stars 4.38k forks source link

urllib3.exceptions.newconnectionerror #3103

Open Yinglibo123 opened 4 months ago

Yinglibo123 commented 4 months ago

i start the embedding model with fastchat like python3 -m fastchat.serve.controller --host 127.0.0.1 --port 7008 & python3 -m fastchat.serve.model_worker --host 127.0.0.1 --port 7007 --worker-address http://127.0.0.1:7007 --controller-address http://127.0.0.1:7008 --model-path bge-large-zh-v1.5 --model-name text-davinci-003 & python3 -m fastchat.serve.openai_api_server --host 127.0.0.1 --port 7009 --controller-address http://127.0.0.1:7008 and get 18041709003989_ pic but when i test the embedding service with python code like

from langchain.embeddings.openai import OpenAIEmbeddings
import os 
os.environ['OPENAI_API_KEY']="EMPTY" 
os.environ['OPENAI_API_BASE']="http://41.230.180.239:7009/v1" 
embedding=OpenAIEmbeddings(model="text-davinci-003")
print(embedding.embed_query("str"))

i get a error respose like this 19011709176585_ pic 19001709176469_ pic how to solve this problem, please

linkedlist771 commented 4 months ago

It appears that you are using an SSH connection, suggesting that the system is operating on a remote GPU server. There are two primary methods to establish a connection:

  1. Utilize a public network port and expose this port to your client.
  2. Implement SSH port forwarding, also known as local port mapping, and configure the SSH identity accordingly.