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

依赖升级 #2246

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions configs/model_config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ EMBEDDING_DEVICE = "auto"
EMBEDDING_KEYWORD_FILE = "keywords.txt"
EMBEDDING_MODEL_OUTPUT_PATH = "output"

# 要运行的 LLM 名称,可以包括本地模型和在线模型。
# 第一个将作为 API 和 WEBUI 的默认模型
LLM_MODELS = ["chatglm3-6b", "zhipu-api", "openai-api"]
# 要运行的 LLM 名称,可以包括本地模型和在线模型。第一个将作为 API 和 WEBUI 的默认模型
# 在这里,我们使用目前主流的两个离线模型,其中,chatglm3-6b 为默认加载模型,如果你的显存不足,可使用 Qwen-1_8B-Chat, 该模型 FP16 仅需 3.8G显存。
LLM_MODELS = ["chatglm3-6b", "Qwen-1_8B-Chat", "zhipu-api", "openai-api"]

# AgentLM模型的名称 (可以不指定,指定之后就锁定进入Agent之后的Chain的模型,不指定就是LLM_MODELS[0])
Agent_MODEL = None
Expand Down
2 changes: 1 addition & 1 deletion configs/server_config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ FSCHAT_MODEL_WORKERS = {

},
# 可以如下示例方式更改默认配置
# "Qwen-7B-Chat": { # 使用default中的IP和端口
# "Qwen-1_8B-Chat": { # 使用default中的IP和端口
# "device": "cpu",
# },
"chatglm3-6b": { # 使用default中的IP和端口
Expand Down
Binary file removed img/qr_code_72.jpg
Binary file not shown.
Binary file removed img/qr_code_73.jpg
Binary file not shown.
Binary file removed img/qr_code_74.jpg
Binary file not shown.
65 changes: 35 additions & 30 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,64 +1,69 @@
# API requirements

langchain==0.0.343
langchain==0.0.344
langchain-experimental>=0.0.42
fschat[model_worker]>=0.2.33
pydantic==1.10.13
fschat>=0.2.33
xformers>=0.0.22.post7
openai>=1.3.5
openai>=1.3.6
sentence_transformers
transformers>=4.35.2
torch==2.1.0 ##on win, install the cuda version manually if you want use gpu
torchvision #on win, install the cuda version manually if you want use gpu
torchaudio #on win, install the cuda version manually if you want use gpu
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.23.1
uvicorn>=0.24.0.post1
starlette~=0.27.0
pydantic<2
unstructured[all-docs]==0.11.0
python-magic-bin; sys_platform == 'win32'
SQLAlchemy==2.0.19
faiss-cpu
accelerate
spacy
accelerate>=0.24.1
spacy>=3.7.2
PyMuPDF
rapidocr_onnxruntime

requests
pathlib
pytest
numexpr
strsimpy
markdownify
tiktoken
tqdm
requests>=2.31.0
pathlib>=1.0.1
pytest>=7.4.3
numexpr>=2.8.7
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
einops>=0.7.0
transformers_stream_generator==0.0.4

vllm==0.2.2; sys_platform == "linux"

# online api libs dependencies

# Online api libs dependencies

# zhipuai>=1.0.7
# dashscope>=1.10.0
# qianfan>=0.2.0
# volcengine>=1.0.106

# uncomment libs if you want to use corresponding vector store
# pymilvus==2.1.3 # requires milvus==2.1.3
# pymilvus>=2.3.3
# psycopg2
# pgvector
# pgvector>=0.2.4

# Agent and Search Tools

arxiv>=2.0.0
youtube-search>=2.1.2
duckduckgo-search>=4.9.3
metaphor-python>=0.1.23

# WebUI requirements

streamlit~=1.28.2 # # on win, make sure write its path in environment variable
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-modal>=0.1.0
streamlit-aggrid>=0.3.4.post3
httpx[brotli,http2,socks]~=0.24.1
watchdog
httpx[brotli,http2,socks]>=0.25.2
watchdog>=3.0.0

63 changes: 34 additions & 29 deletions requirements_api.txt
Original file line number Diff line number Diff line change
@@ -1,52 +1,57 @@
# API requirements

langchain==0.0.343
langchain==0.0.344
langchain-experimental>=0.0.42
fschat[model_worker]>=0.2.33
pydantic==1.10.13
fschat>=0.2.33
xformers>=0.0.22.post7
openai>=1.3.5
openai>=1.3.6
sentence_transformers
transformers>=4.35.2
torch==2.1.0
torchvision
torchaudio
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.23.1
uvicorn>=0.24.0.post1
starlette~=0.27.0
pydantic<2
unstructured[all-docs]==0.11.0
python-magic-bin; sys_platform == 'win32'
SQLAlchemy==2.0.19
faiss-cpu
accelerate>=0.24.1
spacy
spacy>=3.7.2
PyMuPDF
rapidocr_onnxruntime

requests
pathlib
pytest
numexpr
strsimpy
markdownify
tiktoken
tqdm
requests>=2.31.0
pathlib>=1.0.1
pytest>=7.4.3
numexpr>=2.8.7
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
transformers_stream_generator>=0.0.4
einops>=0.7.0
transformers_stream_generator==0.0.4
vllm==0.2.2; sys_platform == "linux"

vllm>=0.2.0; sys_platform == "linux"

# online api libs
zhipuai
dashscope>=1.10.0 # qwen
qianfan
# volcengine>=1.0.106 # fangzhou
# Online api libs dependencies

# uncomment libs if you want to use corresponding vector store
# pymilvus==2.1.3 # requires milvus==2.1.3
# zhipuai>=1.0.7
# dashscope>=1.10.0
# qianfan>=0.2.0
# volcengine>=1.0.106
# pymilvus>=2.3.3
# psycopg2
# pgvector
# pgvector>=0.2.4

# Agent and Search Tools

arxiv>=2.0.0
youtube-search>=2.1.2
duckduckgo-search>=4.9.3
metaphor-python>=0.1.23
46 changes: 23 additions & 23 deletions requirements_lite.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
langchain==0.0.343
langchain==0.0.344
pydantic==1.10.13
fschat>=0.2.33
openai>=1.3.5
# sentence_transformers
# transformers>=4.35.2
# torch>=2.0.1
# torchvision
# torchaudio
openai>=1.3.6
fastapi>=0.104.1
python-multipart
nltk~=3.8.1
uvicorn~=0.23.1
uvicorn>=0.24.0.post1
starlette~=0.27.0
pydantic~=1.10.11
unstructured[docx,csv]==0.11.0 # add pdf if need
python-magic-bin; sys_platform == 'win32'
SQLAlchemy==2.0.19
numexpr>=2.8.7
strsimpy>=0.2.1

faiss-cpu
# accelerate
# spacy
# accelerate>=0.24.1
# spacy>=3.7.2
# PyMuPDF==1.22.5 # install if need pdf
# rapidocr_onnxruntime>=1.3.2 # install if need pdf

Expand All @@ -26,18 +24,18 @@ pathlib
pytest
# scikit-learn
# numexpr
# vllm==0.1.7; sys_platform == "linux"
# vllm==0.2.2; sys_platform == "linux"

# online api libs
zhipuai
dashscope>=1.10.0 # qwen
# qianfan

zhipuai>=1.0.7 # zhipu
# dashscope>=1.10.0 # qwen
# volcengine>=1.0.106 # fangzhou

# uncomment libs if you want to use corresponding vector store
# pymilvus==2.1.3 # requires milvus==2.1.3
# psycopg2
# pgvector
# pgvector>=0.2.4

numpy~=1.24.4
pandas~=2.0.3
Expand All @@ -50,13 +48,15 @@ httpx~=0.24.1
watchdog
tqdm
websockets
einops>=0.7.0

# tiktoken
einops
# scipy
# scipy>=1.11.4
# transformers_stream_generator==0.0.4

# search engine libs
duckduckgo-search
metaphor-python
strsimpy
markdownify
# Agent and Search Tools

arxiv>=2.0.0
youtube-search>=2.1.2
duckduckgo-search>=4.9.3
metaphor-python>=0.1.23
9 changes: 4 additions & 5 deletions requirements_webui.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# WebUI requirements

streamlit~=1.28.2
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-modal>=0.1.0
streamlit-aggrid>=0.3.4.post3
httpx[brotli,http2,socks]~=0.24.1
watchdog

httpx[brotli,http2,socks]>=0.25.2
watchdog>=3.0.0
1 change: 0 additions & 1 deletion server/agent/tools/search_knowledgebase_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ def _process_llm_result(
queries = [(line.split(",")[0].strip(), line.split(",")[1].strip()) for line in lines]
except:
queries = [(line.split(",")[0].strip(), line.split(",")[1].strip()) for line in lines]
print(queries)
run_manager.on_text("知识库查询询内容:\n\n" + str(queries) + " \n\n", color="blue", verbose=self.verbose)
output = self._evaluate_expression(queries)
run_manager.on_text("\nAnswer: ", verbose=self.verbose)
Expand Down