Merge branch 'refs/heads/dev' into dev_config_init

# Conflicts:
#	libs/chatchat-server/pyproject.toml
This commit is contained in:
glide-the 2024-06-11 14:40:13 +08:00
commit d0aa044329
4 changed files with 25 additions and 11 deletions

View File

@ -22,6 +22,7 @@ options:
-f FORMAT, --format FORMAT
日志格式
--clear 清除配置
--show 显示配置
```
> 查看配置
```shell
@ -41,8 +42,14 @@ options:
```
### 模型服务配置
如果您已经有了一个openai endpoint的能力的地址可以在`configs._model_config.py`文件中MODEL_PLATFORMS直接配置
- platform_name 可以任意填写,不要重复即可
- platform_type 以后可能根据平台类型做一些功能区分,与platform_name一致即可
- 将框架部署的模型填写到对应列表即可。不同框架可以加载同名模型,项目会自动做负载均衡。
- 自定义平台加载
### 自定义平台加载
可以通过 model_providers 提供转换不同平台的接口为openai endpoint的能力
> 配置*CHATCHAT_ROOT*文件夹configs中的`model_providers.yaml`文件,即可完成自定义平台加载
```shell
@ -53,12 +60,20 @@ vim model_providers.yaml
>
> 详细配置请参考[README.md](../model-providers/README.md)
- 初始化知识库
### 初始化知识库
```shell
chatchat-kb -r
```
- 启动服务
### 启动服务
```shell
chatchat -a
```
### 模型?
```text
chatchat 0.3版本中,为保证平台、模型、及本地服务的兼容,在保证可扩展性的同时,
我们对模型的加载进行了重新设计. chatchat 0.3之后的版本,我们将分离模型加载和服务启动. 您可以使用提供了`openaiEndpoint`任何服务,
可以在`configs._model_config.py`文件中MODEL_PLATFORMS直接配置
```

View File

@ -5,6 +5,10 @@
git clone https://github.com/chatchat-space/Langchain-Chatchat.git
```
- 初始化开发环境
> [Code](../../docs/contributing/code.md): 源码配置可以帮助我们更快的寻找bug或者改进基础设施。
- 关于chatchat-config
> chatchat-config由ConfigWorkSpace接口提供知识库配置载入存储
>
@ -33,10 +37,6 @@ ConfigWorkSpace是一个配置工作空间的抽象类提供基础的配置
> 详细配置请参考[README.md](../model-providers/README.md)
- 初始化开发环境
> [Code](../../docs/contributing/code.md): 源码配置可以帮助我们更快的寻找bug或者改进基础设施。
- 初始化仓库
> 请注意:这个命令会清空数据库,如果您有重要数据,请备份
```shell

View File

@ -133,7 +133,7 @@ def run_webui(model_platforms_shard: Dict,
from streamlit.web import bootstrap
except ImportError:
from streamlit import bootstrap
bootstrap.load_config_options(flag_options=flag_options)
bootstrap.run(script_dir, False, args, flag_options)
started_event.set()

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "model-providers"
version = "0.3.0.20240606"
version = "0.3.0.20240610"
description = ""
authors = ["glide-the <2533736852@qq.com>"]
readme = "README.md"
@ -17,7 +17,7 @@ pydantic ="~2.6.4"
omegaconf = "~2.0.6"
# modle_runtime
openai = "~1.13.3"
tiktoken = "~0.5.2"
tiktoken = "~0.7.0"
pydub = "~0.25.1"
boto3 = "~1.28.17"
@ -113,7 +113,6 @@ extended_testing = [
"xmltodict",
"faiss-cpu",
"openapi-pydantic",
"markdownify",
"arxiv",
"sqlite-vss",
"rapidocr-onnxruntime",