mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-19 13:23:16 +08:00
命令说明
This commit is contained in:
parent
af536a3309
commit
1402c58699
@ -13,34 +13,22 @@ pip install langchain-chatchat -U
|
||||
>
|
||||
> 操作指令` chatchat-config`
|
||||
```text
|
||||
options:
|
||||
|
||||
-h, --help show this help message and exit
|
||||
-v {true,false}, --verbose {true,false}
|
||||
是否开启详细日志
|
||||
-d DATA, --data DATA 数据存放路径
|
||||
-f FORMAT, --format FORMAT
|
||||
日志格式
|
||||
--clear 清除配置
|
||||
--show 显示配置
|
||||
```
|
||||
> 查看配置
|
||||
```shell
|
||||
chatchat-config --show ±[●●][dev_config_init]
|
||||
{
|
||||
"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"
|
||||
}
|
||||
|
||||
Usage: chatchat-config [OPTIONS] COMMAND [ARGS]...
|
||||
|
||||
```
|
||||
指令` chatchat-config` 工作空间配置
|
||||
|
||||
Options:
|
||||
--help Show this message and exit.
|
||||
|
||||
Commands:
|
||||
basic 基础配置
|
||||
kb 知识库配置
|
||||
model 模型配置
|
||||
server 服务配置
|
||||
|
||||
```
|
||||
|
||||
|
||||
### 模型服务配置
|
||||
如果您已经有了一个openai endpoint的能力的地址,可以在`configs._model_config.py`文件中MODEL_PLATFORMS直接配置
|
||||
|
||||
@ -18,7 +18,7 @@ def main():
|
||||
|
||||
@main.command("basic", help="基础配置")
|
||||
@click.option("--verbose", type=click.Choice(["true", "false"]), help="是否开启详细日志")
|
||||
@click.option("--data", help="数据存放路径")
|
||||
@click.option("--data", help="初始化数据存放路径,注意:目录会清空重建")
|
||||
@click.option("--format", help="日志格式")
|
||||
@click.option("--clear", 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_host", help="模型平台配置服务host")
|
||||
@click.option("--model_providers_cfg_port", type=int, help="模型平台配置服务port")
|
||||
@click.option("--set_model_platforms", type=str, help="模型平台配置")
|
||||
@click.option("--set_tool_config", type=str, help="工具配置项 ")
|
||||
@click.option("--set_model_platforms", 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("--show", is_flag=True, help="显示配置")
|
||||
def model(**kwargs):
|
||||
@ -93,7 +97,7 @@ def model(**kwargs):
|
||||
if kwargs["set_tool_config"]:
|
||||
tool_config_dict = json.loads(kwargs["set_tool_config"])
|
||||
config_model_workspace.set_tool_config(tool_config=tool_config_dict)
|
||||
|
||||
|
||||
if kwargs["clear"]:
|
||||
config_model_workspace.clear()
|
||||
if kwargs["show"]:
|
||||
|
||||
@ -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:
|
||||
model_credential:
|
||||
- model: 'glm-4'
|
||||
- model: 'autodl-tmp-glm-4-9b-chat'
|
||||
model_type: 'llm'
|
||||
model_credentials:
|
||||
server_url: 'http://127.0.0.1:9997/'
|
||||
model_uid: 'glm-4'
|
||||
model_uid: 'autodl-tmp-glm-4-9b-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_type: 'embeddings'
|
||||
model_credentials:
|
||||
server_url: 'http://127.0.0.1:9997/'
|
||||
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