Closed dbtzy closed 9 months ago
🤖
你好,@dbtzy!我是Dosu,一个帮助您解决bug,回答问题,甚至成为贡献者的机器人。在等待人类维护者的过程中,我在这里为您提供帮助。很高兴在此与您相遇!
根据我在Langchain-Chatchat存储库中找到的信息,您遇到的问题可能是因为您尝试安装的numexpr版本不存在。目前可用的最新版本是2.8.6。
要解决此问题,您应该在requirements.txt文件中将numexpr的版本更改为可用的版本。在这种情况下,您应该将numexpr>=2.8.7
更改为numexpr>=2.8.6
或者只是numexpr==2.8.6
,如果您想坚持使用该特定版本。
这是您更新后的requirements.txt文件应该如何看起来:
# API requirements
langchain==0.0.344
langchain-experimental>=0.0.42
pydantic==1.10.13
fschat>=0.2.33
xformers>=0.0.22.post7
openai>=1.3.6
sentence_transformers
transformers>=4.35.2
torch==2.1.0 ##on Windows system, install the cuda version manually from https://pytorch.org/
torchvision #on Windows system, install the cuda version manually from https://pytorch.org/
torchaudio #on Windows system, install the cuda version manually from https://pytorch.org/
fastapi>=0.104
nltk>=3.8.1
uvicorn>=0.24.0.post1
starlette~=0.27.0
unstructured[all-docs]==0.11.0
python-magic-bin; sys_platform == 'win32'
SQLAlchemy==2.0.19
faiss-cpu
accelerate>=0.24.1
spacy>=3.7.2
PyMuPDF
rapidocr_onnxruntime
requests>=2.31.0
pathlib>=1.0.1
pytest>=7.4.3
numexpr==2.8.6
strsimpy>=0.2.1
markdownify>=0.11.6
tiktoken>=0.5.1
tqdm>=4.66.1
websockets
numpy~=1.24.4
pandas~=2.0.3
einops>=0.7.0
transformers_stream_generator==0.0.4
vllm==0.2.2; sys_platform == "linux"
# Online api libs dependencies
# zhipuai>=1.0.7
# dashscope>=1.10.0
# qianfan>=0.2.0
# volcengine>=1.0.106
# pymilvus>=2.3.3
# psycopg2
# pgvector>=0.2.4
# Agent and Search Tools
arxiv>=2.0.0
youtube-search>=2.1.2
duckduckgo-search>=3.9.9
metaphor-python>=0.1.23
# WebUI requirements
streamlit>=1.29.0
streamlit-option-menu>=0.3.6
streamlit-antd-components>=0.2.3
streamlit-chatbox>=1.1.11
streamlit-modal>=0.1.0
streamlit-aggrid>=0.3.4.post3
httpx[brotli,http2,socks]>=0.25.2
watchdog>=3.0.0
做出这个更改后,您应该能够无任何问题地安装包。
关于numexpr在Langchain-Chatchat代码库中的具体作用,它被用于评估数学表达式。在calculate
函数中,它被用于执行query
字符串中提供的数学表达式。这个评估的结果然后作为数学问题的答案返回。
这是相关的代码片段:
...numexpr.evaluate(query)...
这行代码被用来评估query
字符串中包含的数学表达式。例如,如果query
是"37593 * 67"
,numexpr.evaluate(query)
将返回2518731
。同样,如果query
是"37593**(1/5)"
,numexpr.evaluate(query)
将返回8.222831614237718
。
参考资料:
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
感谢反馈,下个版本将会把 numexpr 限定为 2.8.6 版。
当前您可以手动安装该版本
在python3.8.18下执行pip install -r requirements.txt时提示numexpr最高只有2.8.6