FastChat
FastChat copied to clipboard
report error while i execute `python -m fastchat.serve.openai_api_server --host localhost --port 8000`
1,already execute git pull
2,web model and cli mode works
3,it reports error below:
/root/anaconda3/envs/fastchat/lib/python3.9/runpy.py:197 in _run_module_as_main │
│ │
│ 194 │ main_globals = sys.modules["main"].dict │
│ 195 │ if alter_argv: │
│ 196 │ │ sys.argv[0] = mod_spec.origin │
│ ❱ 197 │ return _run_code(code, main_globals, None, │
│ 198 │ │ │ │ │ "main", mod_spec) │
│ 199 │
│ 200 def run_module(mod_name, init_globals=None, │
│ │
│ /root/anaconda3/envs/fastchat/lib/python3.9/runpy.py:87 in _run_code │
│ │
│ 84 │ │ │ │ │ loader = loader, │
│ 85 │ │ │ │ │ package = pkg_name, │
│ 86 │ │ │ │ │ spec = mod_spec) │
│ ❱ 87 │ exec(code, run_globals) │
│ 88 │ return run_globals │
│ 89 │
│ 90 def _run_module_code(code, init_globals=None, │
│ │
│ /home/work/FastChat/fastchat/serve/openai_api_server.py:34 in
How can I fix it
I found a way to run this command, temporarily delete the finish_reason
filed in fastchat/protocol/openai_api_protocol.py
and fastchat/protocol/api_protocol.py
or change it to be string, like **finish_reason: str**
.
https://github.com/lm-sys/FastChat/commit/f111a6cb72a0f5e85ebdc3eec51f1c0f328602b9
in this commit version i find out the code was deleted, but it recovers right now. it is reasonable to infer the method is not correct, it may cause other bugs.
could you try the latest main branch?
I found a way to run this command, temporarily delete the
finish_reason
filed infastchat/protocol/openai_api_protocol.py
andfastchat/protocol/api_protocol.py
or change it to be string, like**finish_reason: str**
.
https://github.com/lm-sys/FastChat/commit/f111a6cb72a0f5e85ebdc3eec51f1c0f328602b9
in this commit version i find out the code was deleted, but it recovers right now. it is reasonable to infer the method is not correct, it may cause other bugs.
how did you fix. ihave the same problems
这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
@chengming1108 did you manage it?