LMCache / LMCache/demo

Error when running frontend.py in demo2-multi-node-sharing: APIConnectionError

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
33
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Hello,

I encountered an error when running the second demo in the repository. Following the README, I downloaded the image.
image
And I tried running frontend.py. However, I received the following error during execution:

File "/mnt/data1/user1/demo/demo2-multi-node-sharing/frontend.py", line 59, in <module>
    session = chat_session.ChatSession(PORT1)
File "/mnt/data1/user1/demo/demo2-multi-node-sharing/chat_session.py", line 21, in __init__
    models = client.models.list()
File "/mnt/data1/user1/anaconda3/envs/sglang/lib/python3.10/site-packages/openai/resources/models.py", line 91, in list
    return self._get_api_list(
File "/mnt/data1/user1/anaconda3/envs/sglang/lib/python3.10/site-packages/openai/_base_client.py", line 1326, in get_api_list
    return self._request_api_list(model, page, opts)
File "/mnt/data1/user1/anaconda3/envs/sglang/lib/python3.10/site-packages/openai/_base_client.py", line 1177, in _request_api_list
    return self.request(page, options, stream=False)
File "/mnt/data1/user1/anaconda3/envs/sglang/lib/python3.10/site-packages/openai/_base_client.py", line 954, in request
    return self._request(
File "/mnt/data1/user1/anaconda3/envs/sglang/lib/python3.10/site-packages/openai/_base_client.py", line 1014, in _request
    return self._retry_request(
File "/mnt/data1/user1/anaconda3/envs/sglang/lib/python3.10/site-packages/openai/_base_client.py", line 1092, in _retry_request
    return self._request(
File "/mnt/data1/user1/anaconda3/envs/sglang/lib/python3.10/site-packages/openai/_base_client.py", line 1024, in _request
    raise APIConnectionError(request=request) from err

However, based on the code, the wrapped OpenAI client is pointing to a local port service.
image
If you have any insights or suggestions on resolving this issue, I would appreciate it!

Thank you!

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 with the README instructions for demo2-multi-node-sharing, then inspect frontend.py around line 59 and chat_session.py around line 21. Verify that the local service is running and reachable at the configured PORT1 before rerunning frontend.py; done means the demo can initialize ChatSession without APIConnectionError.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.