链接本地qwen32b大模型失败
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start with models.py and the Qwen3-32b-MAX configuration, then reproduce the local API response through frontend/mindsearch_gradio.py. Read streaming() around line 147 and predict() around line 167, inspect the value passed to json.loads, and confirm that a successful local-model response can be parsed without JSONDecodeError.
Written by the indexing model from the issue text.
Description
你好我修改了models.py函数,模仿了你们qwen模型的格式,新增了一个qwen32b的配置,模型在本地是可以连接的,我发现后端在解析链接qwen32b的时候不会报错但是前端解析json的时候会报错,是我的格式错误还是你们没有写这种适配方式,如果没有我能否直接修改json解析格式来达到我连接本地大模型的效果
新增配置:Qwen3-32b-MAX 本地API模型配置
qwen32b = dict(
type=GPTAPI,
model_type=os.getenv("LLM_MODEL", "Qwen3-32b-MAX"),
key=os.getenv("LLM_BINDING_API_KEY", "none"),
api_base=os.getenv("LLM_BINDING_HOST", "http://localhost:8011/v1"),
meta_template=[
dict(role="system", api_role="system"),
dict(role="user", api_role="user"),
dict(role="assistant", api_role="assistant"),
dict(role="environment", api_role="system"),
],
top_p=0.8,
top_k=1,
temperature=float(os.getenv("TEMPERATURE", 0.1)),
max_new_tokens=int(os.getenv("MAX_TOKENS", 131072)),
repetition_penalty=1.02,
stop_words=["<|im_end|>"],
timeout=int(os.getenv("TIMEOUT", 150)),
)
报错如下
- Running on local URL: http://127.0.0.1:7882
To create a public link, set share=True in launch().
F:\ANACONDA\envs\mindsearch\Lib\site-packages\schemdraw\backends\mpl.py:79: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
self.fig.show()
F:\ANACONDA\envs\mindsearch\Lib\site-packages\schemdraw\backends\mpl.py:80: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
plt.show() # To start the MPL event loop
Traceback (most recent call last):
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\gradio\queueing.py", line 624, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\gradio\route_utils.py", line 323, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\gradio\blocks.py", line 2019, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\gradio\blocks.py", line 1578, in call_function
prediction = await utils.async_iteration(iterator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\gradio\utils.py", line 710, in async_iteration
return await anext(iterator)
^^^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\gradio\utils.py", line 704, in anext
return await anyio.to_thread.run_sync(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\anyio_backends_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\anyio_backends_asyncio.py", line 967, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\gradio\utils.py", line 687, in run_sync_iterator_async
return next(iterator)
^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\site-packages\gradio\utils.py", line 848, in gen_wrapper
response = next(iterator)
^^^^^^^^^^^^^^
File "F:\down_project\MindSearch-main\frontend\mindsearch_gradio.py", line 167, in predict
for resp in streaming(raw_response):
File "F:\down_project\MindSearch-main\frontend\mindsearch_gradio.py", line 147, in streaming
response = json.loads(decoded)
^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ANACONDA\envs\mindsearch\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- Dominant language
- JavaScript
- Stars
- 7k
- Forks
- 684
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from InternLM/MindSearch
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
InternLM/MindSearch#326 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
InternLM/MindSearch#315 ·
-
问答只回复一次,没有完整推理搜索回复Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
InternLM/MindSearch#312 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
InternLM/MindSearch#311 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
InternLM/MindSearch#310 ·
All issues in InternLM/MindSearch
Similar issues
-
area/frontend good first issue topic/intents
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aws-samples/sample-collaborative-ai-dlc#1049 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
avniproject/avni-client#2268 ·
-
plugins/dsh: todayStr() computes UTC but is documented as local — journal entries written 00:00–08:00 local land in the previous day's filePossibly taken @Beehtrix claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
zilliztech/memsearch#907 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
we-promise/sure#6115 ·
Maintainers usually reply within 1 day
-
withImplementation leaves the temporary mock installed when its callback throws or rejectsPossibly taken @Cynnamoroll claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 10 days