mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-04 05:33:12 +08:00
一些依赖问题
This commit is contained in:
parent
a5b203170b
commit
94524f8479
@ -15,9 +15,11 @@
|
||||
|
||||
Install Poetry: [documentation on how to install it.](https://python-poetry.org/docs/#installing-with-pipx)
|
||||
|
||||
> 友情提示 不想安装pipx可以用pip安装poetry,(Tips:如果你没有其它poetry的项目
|
||||
> 注意: 如果您使用 Conda 或 Pyenv 作为您的环境/包管理器,在安装Poetry之后,
|
||||
> 使用如下命令使 Poetry 使用 virtualenv python environment (`poetry config virtualenvs.prefer-active-python true`)
|
||||
|
||||
|
||||
#### 本地开发环境安装
|
||||
|
||||
- 选择主项目目录
|
||||
|
||||
@ -20,7 +20,7 @@ langchainhub = "0.1.14"
|
||||
langchain-community = "0.0.17"
|
||||
langchain-openai = "0.0.5"
|
||||
langchain-experimental = "0.0.50"
|
||||
fastapi = "0.109.2"
|
||||
fastapi = "~0.109.2"
|
||||
sse_starlette = "~1.8.2"
|
||||
nltk = "~3.8.1"
|
||||
uvicorn = ">=0.27.0.post1"
|
||||
@ -35,16 +35,16 @@ rapidocr_onnxruntime = "~1.3.8"
|
||||
requests = "~2.31.0"
|
||||
pathlib = "~1.0.1"
|
||||
pytest = "~7.4.3"
|
||||
pyjwt = "2.8.0"
|
||||
pyjwt = "~2.8.0"
|
||||
elasticsearch = "*"
|
||||
numexpr = ">=1" #test
|
||||
strsimpy = ">=0.2.1"
|
||||
markdownify = ">=0.11.6"
|
||||
tqdm = ">=4.66.1"
|
||||
websockets = ">=12.0"
|
||||
numpy = "1.24.4"
|
||||
numpy = "~1.24.4"
|
||||
pandas = "~1" # test
|
||||
pydantic = "2.6.4"
|
||||
pydantic = "~2.6.4"
|
||||
httpx = {version = ">=0.25.2", extras = ["brotli", "http2", "socks"]}
|
||||
python-multipart = "0.0.9"
|
||||
# webui
|
||||
|
||||
@ -1,26 +1,26 @@
|
||||
import redis
|
||||
from redis.connection import Connection, SSLConnection
|
||||
|
||||
redis_client = redis.Redis()
|
||||
|
||||
|
||||
def init_app(app):
|
||||
connection_class = Connection
|
||||
if app.config.get("REDIS_USE_SSL", False):
|
||||
connection_class = SSLConnection
|
||||
|
||||
redis_client.connection_pool = redis.ConnectionPool(
|
||||
**{
|
||||
"host": app.config.get("REDIS_HOST", "localhost"),
|
||||
"port": app.config.get("REDIS_PORT", 6379),
|
||||
"username": app.config.get("REDIS_USERNAME", None),
|
||||
"password": app.config.get("REDIS_PASSWORD", None),
|
||||
"db": app.config.get("REDIS_DB", 0),
|
||||
"encoding": "utf-8",
|
||||
"encoding_errors": "strict",
|
||||
"decode_responses": False,
|
||||
},
|
||||
connection_class=connection_class,
|
||||
)
|
||||
|
||||
app.extensions["redis"] = redis_client
|
||||
# import redis
|
||||
# from redis.connection import Connection, SSLConnection
|
||||
#
|
||||
# redis_client = redis.Redis()
|
||||
#
|
||||
#
|
||||
# def init_app(app):
|
||||
# connection_class = Connection
|
||||
# if app.config.get("REDIS_USE_SSL", False):
|
||||
# connection_class = SSLConnection
|
||||
#
|
||||
# redis_client.connection_pool = redis.ConnectionPool(
|
||||
# **{
|
||||
# "host": app.config.get("REDIS_HOST", "localhost"),
|
||||
# "port": app.config.get("REDIS_PORT", 6379),
|
||||
# "username": app.config.get("REDIS_USERNAME", None),
|
||||
# "password": app.config.get("REDIS_PASSWORD", None),
|
||||
# "db": app.config.get("REDIS_DB", 0),
|
||||
# "encoding": "utf-8",
|
||||
# "encoding_errors": "strict",
|
||||
# "decode_responses": False,
|
||||
# },
|
||||
# connection_class=connection_class,
|
||||
# )
|
||||
#
|
||||
# app.extensions["redis"] = redis_client
|
||||
|
||||
@ -7,20 +7,19 @@ readme = "README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.8.1,<3.12,!=3.9.7"
|
||||
transformers = "4.31.0"
|
||||
fastapi = "^0.109.2"
|
||||
transformers = "~4.31.0"
|
||||
fastapi = "~0.109.2"
|
||||
uvicorn = ">=0.27.0.post1"
|
||||
sse-starlette = "^1.8.2"
|
||||
pyyaml = "6.0.1"
|
||||
pydantic = "2.6.4"
|
||||
redis = "4.5.4"
|
||||
sse-starlette = "~1.8.2"
|
||||
pyyaml = "~6.0.1"
|
||||
pydantic ="~2.6.4"
|
||||
# config manage
|
||||
omegaconf = "2.0.6"
|
||||
omegaconf = "~2.0.6"
|
||||
# modle_runtime
|
||||
openai = "1.13.3"
|
||||
tiktoken = "0.5.2"
|
||||
pydub = "0.25.1"
|
||||
boto3 = "1.28.17"
|
||||
openai = "~1.13.3"
|
||||
tiktoken = "~0.5.2"
|
||||
pydub = "~0.25.1"
|
||||
boto3 = "~1.28.17"
|
||||
|
||||
[tool.poetry.group.test.dependencies]
|
||||
# The only dependencies that should be added are
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user