lm-sys / lm-sys/FastChat

urllib3.exceptions.newconnectionerror

Open
#3,103 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/lm-sys/FastChat/assets/65876180/4fe961ee-5ad6-4b62-861b-2c6c561829ed)
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](https://github.com/lm-sys/FastChat/assets/65876180/8e2cd350-88f5-491c-823f-a6af423450d3)
![19001709176469_ pic](https://github.com/lm-sys/FastChat/assets/65876180/6a07290b-9e44-4192-901e-14098fc37944)
how to solve this problem, please

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 by reproducing the two FastChat commands and the LangChain OpenAIEmbeddings call shown in the issue. Check the controller, model worker, and OpenAI API server addresses and compare them with the configured OPENAI_API_BASE. Done means the embedding request connects successfully and returns an embedding instead of the urllib3 connection error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.