lm-sys / lm-sys/FastChat

Error while using RetrievalQA chain type of Langchain for vector retrieval using FastChat LLM model which is hosted on Endpoint(GPU machine).

Open
#2,447 2 comments 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

Our LLM model is on endpoint :

from langchain.indexes import VectorstoreIndexCreator

os.environ["OPENAI_API_BASE"] = "my_endpoint_ip"
os.environ["OPENAI_API_KEY"] = "empty"
embedding = OpenAIEmbeddings(model="text-embedding-ada-002")
local_llm = OpenAI(model="gpt-3.5-turbo")

So while performing below retrieval task we are not able to fetch llm model from endpoint.
qa_chain = RetrievalQA.from_chain_type(llm=local_llm,
chain_type="stuff",
retriever=retriever, return_source_documents=True)

ERROR : ConnectionResetError

ConnectionResetError Traceback (most recent call last)
File ~/SageMaker/AmazonSageMaker-IAG/virtual_environment/lib/python3.10/site-packages/urllib3/connectionpool.py:714, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
713 # Make the request on the httplib connection object.
--> 714 httplib_response = self._make_request(
715 conn,
716 method,
717 url,
718 timeout=timeout_obj,
719 body=body,
720 headers=headers,
721 chunked=chunked,
722 )
ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

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 RetrievalQA.from_chain_type call using the provided OpenAIEmbeddings and OpenAI configuration, then inspect the FastChat endpoint and its request or server logs for the connection reset. No repository file or test is named in the issue; done means identifying the endpoint or integration cause and confirming a working retrieval request.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.