mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-09 00:25:46 +08:00
命令说明
This commit is contained in:
parent
af536a3309
commit
1402c58699
@ -13,35 +13,23 @@ pip install langchain-chatchat -U
|
|||||||
>
|
>
|
||||||
> 操作指令` chatchat-config`
|
> 操作指令` chatchat-config`
|
||||||
```text
|
```text
|
||||||
options:
|
|
||||||
|
|
||||||
-h, --help show this help message and exit
|
Usage: chatchat-config [OPTIONS] COMMAND [ARGS]...
|
||||||
-v {true,false}, --verbose {true,false}
|
|
||||||
是否开启详细日志
|
指令` chatchat-config` 工作空间配置
|
||||||
-d DATA, --data DATA 数据存放路径
|
|
||||||
-f FORMAT, --format FORMAT
|
Options:
|
||||||
日志格式
|
--help Show this message and exit.
|
||||||
--clear 清除配置
|
|
||||||
--show 显示配置
|
Commands:
|
||||||
```
|
basic 基础配置
|
||||||
> 查看配置
|
kb 知识库配置
|
||||||
```shell
|
model 模型配置
|
||||||
chatchat-config --show ±[●●][dev_config_init]
|
server 服务配置
|
||||||
{
|
|
||||||
"log_verbose": false,
|
|
||||||
"CHATCHAT_ROOT": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat",
|
|
||||||
"DATA_PATH": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/data",
|
|
||||||
"IMG_DIR": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/img",
|
|
||||||
"NLTK_DATA_PATH": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/data/nltk_data",
|
|
||||||
"LOG_FORMAT": "%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s",
|
|
||||||
"LOG_PATH": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/data/logs",
|
|
||||||
"MEDIA_PATH": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/data/media",
|
|
||||||
"BASE_TEMP_DIR": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/data/temp",
|
|
||||||
"class_name": "ConfigBasic"
|
|
||||||
}
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### 模型服务配置
|
### 模型服务配置
|
||||||
如果您已经有了一个openai endpoint的能力的地址,可以在`configs._model_config.py`文件中MODEL_PLATFORMS直接配置
|
如果您已经有了一个openai endpoint的能力的地址,可以在`configs._model_config.py`文件中MODEL_PLATFORMS直接配置
|
||||||
- platform_name 可以任意填写,不要重复即可
|
- platform_name 可以任意填写,不要重复即可
|
||||||
|
|||||||
@ -18,7 +18,7 @@ def main():
|
|||||||
|
|
||||||
@main.command("basic", help="基础配置")
|
@main.command("basic", help="基础配置")
|
||||||
@click.option("--verbose", type=click.Choice(["true", "false"]), help="是否开启详细日志")
|
@click.option("--verbose", type=click.Choice(["true", "false"]), help="是否开启详细日志")
|
||||||
@click.option("--data", help="数据存放路径")
|
@click.option("--data", help="初始化数据存放路径,注意:目录会清空重建")
|
||||||
@click.option("--format", help="日志格式")
|
@click.option("--format", help="日志格式")
|
||||||
@click.option("--clear", is_flag=True, help="清除配置")
|
@click.option("--clear", is_flag=True, help="清除配置")
|
||||||
@click.option("--show", is_flag=True, help="显示配置")
|
@click.option("--show", is_flag=True, help="显示配置")
|
||||||
@ -50,8 +50,12 @@ def basic(**kwargs):
|
|||||||
@click.option("--model_providers_cfg_path_config", help="模型平台配置文件路径")
|
@click.option("--model_providers_cfg_path_config", help="模型平台配置文件路径")
|
||||||
@click.option("--model_providers_cfg_host", help="模型平台配置服务host")
|
@click.option("--model_providers_cfg_host", help="模型平台配置服务host")
|
||||||
@click.option("--model_providers_cfg_port", type=int, help="模型平台配置服务port")
|
@click.option("--model_providers_cfg_port", type=int, help="模型平台配置服务port")
|
||||||
@click.option("--set_model_platforms", type=str, help="模型平台配置")
|
@click.option("--set_model_platforms", type=str, help="""模型平台配置
|
||||||
@click.option("--set_tool_config", type=str, help="工具配置项 ")
|
as a JSON string.
|
||||||
|
""")
|
||||||
|
@click.option("--set_tool_config", type=str, help="""
|
||||||
|
工具配置项 as a JSON string.
|
||||||
|
""")
|
||||||
@click.option("--clear", is_flag=True, help="清除配置")
|
@click.option("--clear", is_flag=True, help="清除配置")
|
||||||
@click.option("--show", is_flag=True, help="显示配置")
|
@click.option("--show", is_flag=True, help="显示配置")
|
||||||
def model(**kwargs):
|
def model(**kwargs):
|
||||||
|
|||||||
@ -1,51 +1,14 @@
|
|||||||
#openai:
|
|
||||||
# model_credential:
|
|
||||||
# - model: 'gpt-3.5-turbo'
|
|
||||||
# model_type: 'llm'
|
|
||||||
# model_credentials:
|
|
||||||
# openai_api_key: 'sk-'
|
|
||||||
# openai_organization: ''
|
|
||||||
# openai_api_base: ''
|
|
||||||
# - model: 'gpt-4'
|
|
||||||
# model_type: 'llm'
|
|
||||||
# model_credentials:
|
|
||||||
# openai_api_key: 'sk-'
|
|
||||||
# openai_organization: ''
|
|
||||||
# openai_api_base: ''
|
|
||||||
#
|
|
||||||
# provider_credential:
|
|
||||||
# openai_api_key: 'sk-'
|
|
||||||
# openai_organization: ''
|
|
||||||
# openai_api_base: ''
|
|
||||||
|
|
||||||
xinference:
|
xinference:
|
||||||
model_credential:
|
model_credential:
|
||||||
- model: 'glm-4'
|
- model: 'autodl-tmp-glm-4-9b-chat'
|
||||||
model_type: 'llm'
|
model_type: 'llm'
|
||||||
model_credentials:
|
model_credentials:
|
||||||
server_url: 'http://127.0.0.1:9997/'
|
server_url: 'http://127.0.0.1:9997/'
|
||||||
model_uid: 'glm-4'
|
model_uid: 'autodl-tmp-glm-4-9b-chat'
|
||||||
completion_type: 'chat'
|
completion_type: 'chat'
|
||||||
- model: 'qwen1.5-chat'
|
|
||||||
model_type: 'llm'
|
|
||||||
model_credentials:
|
|
||||||
completion_type: 'chat'
|
|
||||||
server_url: 'http://127.0.0.1:9997/'
|
|
||||||
model_uid: 'qwen1.5-chat'
|
|
||||||
- model: 'bge-large-zh-v1.5'
|
- model: 'bge-large-zh-v1.5'
|
||||||
model_type: 'embeddings'
|
model_type: 'embeddings'
|
||||||
model_credentials:
|
model_credentials:
|
||||||
server_url: 'http://127.0.0.1:9997/'
|
server_url: 'http://127.0.0.1:9997/'
|
||||||
model_uid: 'bge-large-zh-v1.5'
|
model_uid: 'bge-large-zh-v1.5'
|
||||||
|
|
||||||
#zhipuai:
|
|
||||||
# provider_credential:
|
|
||||||
# api_key: 'd4fa0690b6dfa205204cae2e12aa6fb6.1'
|
|
||||||
|
|
||||||
#ollama:
|
|
||||||
# model_credential:
|
|
||||||
# - model: 'llama3'
|
|
||||||
# model_type: 'llm'
|
|
||||||
# model_credentials:
|
|
||||||
# base_url: 'http://172.21.192.1:11434'
|
|
||||||
# mode: 'completion'
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user