Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设置一片空白,内详,感谢大佬,已经star #20

Open
arraycto opened this issue Nov 18, 2024 · 9 comments
Open

设置一片空白,内详,感谢大佬,已经star #20

arraycto opened this issue Nov 18, 2024 · 9 comments

Comments

@arraycto
Copy link

arraycto commented Nov 18, 2024

image

.env已经配置了大模型apikey,但是页面显示空白,如图。

@xerrors
Copy link
Owner

xerrors commented Nov 21, 2024

这种情况大概率是后端启动错误,可以使用 docker logs api-dev 看一下后端的启动情况。

@arraycto
Copy link
Author

FileNotFoundError: [Errno 2] No such file or directory: 'src/config/models.yaml'

源码确实没有这个文件啊,需要自己创建么,大佬

@xerrors
Copy link
Owner

xerrors commented Nov 21, 2024

又忘记上传了,我更新一下,重新 git pull 一下就可以

@arraycto
Copy link
Author

image
知识库有问题,大佬

@xerrors
Copy link
Owner

xerrors commented Nov 21, 2024

这个问题不是很好定位,可以尝试(1)先上传一个 txt 文件试试。(2)在 工具 中测试一下 pdf 转文本是否可以正常使用。

@arraycto
Copy link
Author

image
txt同样的效果哦

@xerrors
Copy link
Owner

xerrors commented Nov 21, 2024

看一下后端报错信息是哪里?

@xerrors
Copy link
Owner

xerrors commented Nov 23, 2024

可能是 zhipu-embedding 的长度限制问题,已经修改为轮询encoding,重新更新一下代码应该就可以了。

@xeon-ye
Copy link

xeon-ye commented Nov 26, 2024

Traceback (most recent call last):
File "/opt/conda/bin/uvicorn", line 8, in
sys.exit(main())
^^^^^^
File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
run(
File "/opt/conda/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
server.run()
File "/opt/conda/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
File "/opt/conda/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve
await self._serve(sockets)
File "/opt/conda/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve
config.load()
File "/opt/conda/lib/python3.11/site-packages/uvicorn/config.py", line 434, in load
self.loaded_app = import_from_string(self.app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string
module = importlib.import_module(module_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/app/src/main.py", line 5, in
from src.routers import router
File "/app/src/routers/init.py", line 2, in
from src.routers.chat_router import chat
File "/app/src/routers/chat_router.py", line 7, in
from src.core.startup import startup
File "/app/src/core/startup.py", line 26, in
startup = Startup()
^^^^^^^^^
File "/app/src/core/startup.py", line 12, in init
self.start()
File "/app/src/core/startup.py", line 18, in start
self.retriever = Retriever(self.config, self.dbm, self.model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/src/core/retriever.py", line 15, in init
self.reranker = Reranker(config)
^^^^^^^^^^^^^^^^
File "/app/src/models/embedding.py", line 33, in init
model_name_or_path = config.model_local_paths.get(config.reranker, default_path=RERANKER_LIST[config.reranker])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: dict.get() takes no keyword arguments
Exception ignored in: <function AbsReranker.del at 0x799ece763920>
Traceback (most recent call last):
File "/opt/conda/lib/python3.11/site-packages/FlagEmbedding/abc/inference/AbsReranker.py", line 204, in del
AttributeError: 'Reranker' object has no attribute 'pool'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants