File size: 3,960 Bytes
7bd2067
8c604a4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7bd2067
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
    // 各配置具体说明,见 [https://github.com/GaiZhenbiao/ChuanhuChatGPT/wiki/使用教程#配置-configjson]

    //== API 配置 ==
    "openai_api_key": "sk-PghldI4CiqXRpSksHm2VuLi6D1ITpZsGz3Z5RlX7p4dZ0E2K", // 你的 OpenAI API Key,一般必填,若空缺则需在图形界面中填入API Key
    "google_palm_api_key": "", // 你的 Google PaLM API Key,用于 Google PaLM 对话模型
    "xmchat_api_key": "", // 你的 xmchat API Key,用于 XMChat 对话模型
    "minimax_api_key": "", // 你的 MiniMax API Key,用于 MiniMax 对话模型
    "minimax_group_id": "", // 你的 MiniMax Group ID,用于 MiniMax 对话模型

    //== Azure ==
    "openai_api_type": "openai", // 可选项:azure, openai
    "azure_openai_api_key": "", // 你的 Azure OpenAI API Key,用于 Azure OpenAI 对话模型
    "azure_openai_api_base_url": "", // 你的 Azure Base URL
    "azure_openai_api_version": "2023-05-15", // 你的 Azure OpenAI API 版本
    "azure_deployment_name": "", // 你的 Azure OpenAI Chat 模型 Deployment 名称
    "azure_embedding_deployment_name": "", // 你的 Azure OpenAI Embedding 模型 Deployment 名称
    "azure_embedding_model_name": "text-embedding-ada-002", // 你的 Azure OpenAI Embedding 模型名称

    //== 基础配置 ==
    "language": "zh-CN", // 界面语言,可选"auto", "zh-CN", "en-US", "ja-JP", "ko-KR", "sv-SE"
    "users": [], // 用户列表,[[用户名1, 密码1], [用户名2, 密码2], ...]
    "local_embedding": false, //是否在本地编制索引
    "hide_history_when_not_logged_in": false, //未登录情况下是否不展示对话历史
    "check_update": true, //是否启用检查更新
    "default_model": "gpt-3.5-turbo", // 默认模型

    //== API 用量 ==
    "show_api_billing": false, //是否显示OpenAI API用量(启用需要填写sensitive_id)
    "sensitive_id": "", // 你 OpenAI 账户的 Sensitive ID,用于查询 API 用量
    "usage_limit": 120, // 该 OpenAI API Key 的当月限额,单位:美元,用于计算百分比和显示上限
    "legacy_api_usage": false, // 是否使用旧版 API 用量查询接口(OpenAI现已关闭该接口,但是如果你在使用第三方 API,第三方可能仍然支持此接口)

    //== 川虎助理设置 ==
    "default_chuanhu_assistant_model": "gpt-4", //川虎助理使用的模型,可选gpt-3.5-turbo或者gpt-4等
    "GOOGLE_CSE_ID": "", //谷歌搜索引擎ID,用于川虎助理Pro模式,获取方式请看 https://stackoverflow.com/questions/37083058/programmatically-searching-google-in-python-using-custom-search
    "GOOGLE_API_KEY": "", //谷歌API Key,用于川虎助理Pro模式
    "WOLFRAM_ALPHA_APPID": "", //Wolfram Alpha API Key,用于川虎助理Pro模式,获取方式请看 https://products.wolframalpha.com/api/
    "SERPAPI_API_KEY": "", //SerpAPI API Key,用于川虎助理Pro模式,获取方式请看 https://serpapi.com/

    //== 文档处理与显示 ==
    "latex_option": "default", // LaTeX 公式渲染策略,可选"default", "strict", "all"或者"disabled"
    "advance_docs": {
        "pdf": {
            "two_column": false, // 是否认为PDF是双栏的
            "formula_ocr": true // 是否使用OCR识别PDF中的公式
        }
    },

    //== 高级配置 ==
    // 是否多个API Key轮换使用
    "multi_api_key": false,
    "api_key_list": [
        "sk-xxxxxxxxxxxxxxxxxxxxxxxx1",
        "sk-xxxxxxxxxxxxxxxxxxxxxxxx2",
        "sk-xxxxxxxxxxxxxxxxxxxxxxxx3"
    ],
    // 自定义OpenAI API Base
    // "openai_api_base": "https://api.chatanywhere.com.cn",
    // 自定义使用代理(请替换代理URL)
    // "https_proxy": "http://127.0.0.1:1079",
    // "http_proxy": "http://127.0.0.1:1079",
    // 自定义端口、自定义ip(请替换对应内容)
    // "server_name": "0.0.0.0",
    // "server_port": 7860,
    // 如果要share到gradio,设置为true
    // "share": false,
}