You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2024-05-15 13:48:29,424 [INFO] [base_model.py:492] 加载索引中……
Traceback (most recent call last):
File "/usr/local/python38/lib/python3.8/site-packages/gradio/queueing.py", line 566, in process_events
response = await route_utils.call_process_api(
File "/usr/local/python38/lib/python3.8/site-packages/gradio/route_utils.py", line 261, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/python38/lib/python3.8/site-packages/gradio/blocks.py", line 1786, in process_api
result = await self.call_function(
File "/usr/local/python38/lib/python3.8/site-packages/gradio/blocks.py", line 1350, in call_function
prediction = await utils.async_iteration(iterator)
File "/usr/local/python38/lib/python3.8/site-packages/gradio/utils.py", line 583, in async_iteration
return await iterator.__anext__()
File "/usr/local/python38/lib/python3.8/site-packages/gradio/utils.py", line 576, in __anext__
return await anyio.to_thread.run_sync(
File "/usr/local/python38/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/python38/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/usr/local/python38/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/usr/local/python38/lib/python3.8/site-packages/gradio/utils.py", line 559, in run_sync_iterator_async
return next(iterator)
File "/usr/local/python38/lib/python3.8/site-packages/gradio/utils.py", line 742, in gen_wrapper
response = next(iterator)
File "/home/luxun/ChuanhuChatGPT/modules/utils.py", line 41, in predict
foriin iter:
File "/home/luxun/ChuanhuChatGPT/modules/models/base_model.py", line 632, in predict
) = self.prepare_inputs(
File "/home/luxun/ChuanhuChatGPT/modules/models/base_model.py", line 493, in prepare_inputs
index = construct_index(
NameError: name 'construct_index' is not defined
运行环境
OS: centos
Browser: Chrome
Gradio version: 4.26.0
Python version: 3.8.6
帮助解决
我愿意协助解决!
补充说明
No response
The text was updated successfully, but these errors were encountered:
这个bug是否已存在现有issue了?
错误表现
因为要使用知识库的功能,必须要调用base_model.py中的handle_file_upload方法,
而handle_file_upload方法会调用到index_func.py中的construct_index函数,
但是index_func.py又使用from modules.utils import *引用了utils中的全部内容,
同时在utils中的1432行出现了from .models.base_model import BaseLLMModel,使得utils又对base_model 进行了引用,进而导致了循环引用的问题,使得base_model.py的from ..index_func import *无法生效,进而导致handle_file_upload方法无法调用到index_func.py中的construct_index函数,导致知识库的功能出错。
复现操作
正常部署了最新版本代码,然后问答正常,但是知识库功能不正常。
错误日志
运行环境
帮助解决
补充说明
No response
The text was updated successfully, but these errors were encountered: