Files
LangBot/templates/schema/provider.json

606 lines
26 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"type": "object",
"layout": "expansion-panels",
"properties": {
"enable-chat": {
"type": "boolean",
"default": true,
"title": "启用聊天功能",
"description": "是否启用 AI 聊天功能"
},
"enable-vision": {
"type": "boolean",
"default": true,
"title": "启用视觉功能",
"description": "是否开启AI视觉功能。需要使用的模型同时支持视觉功能详情见元数据板块"
},
"keys": {
"type": "object",
"title": "模型接口密钥",
"description": "以字典的形式设置若干个密钥组,每个密钥组的键为密钥组名称,值为密钥列表。模型与密钥组的对应关系,请查看元数据板块",
"properties": {
"openai": {
"type": "array",
"title": "OpenAI API 密钥",
"items": {
"type": "string"
},
"default": []
},
"anthropic": {
"type": "array",
"title": "Anthropic API 密钥",
"items": {
"type": "string"
},
"default": []
},
"moonshot": {
"type": "array",
"title": "Moonshot API 密钥",
"items": {
"type": "string"
},
"default": []
},
"deepseek": {
"type": "array",
"title": "DeepSeek API 密钥",
"items": {
"type": "string"
},
"default": []
},
"gitee": {
"type": "array",
"title": "Gitee AI API 密钥",
"items": {
"type": "string"
},
"default": []
},
"xai": {
"type": "array",
"title": "xAI API 密钥",
"items": {
"type": "string"
},
"default": []
},
"zhipuai": {
"type": "array",
"title": "智谱AI API 密钥",
"items": {
"type": "string"
},
"default": []
},
"siliconflow": {
"type": "array",
"title": "SiliconFlow API 密钥",
"items": {
"type": "string"
},
"default": []
},
"bailian": {
"type": "array",
"title": "阿里云百炼大模型平台 API 密钥",
"items": {
"type": "string"
},
"default": []
},
"volcark": {
"type": "array",
"title": "火山引擎大模型平台 API 密钥",
"items": {
"type": "string"
},
"default": []
}
}
},
"requester": {
"type": "object",
"title": "大模型请求器",
"description": "以字典的形式设置若干个请求器,每个请求器的键为请求器名称,值为请求器配置。模型与请求器的对应关系,请查看元数据板块。实现请求器的方式,请查看插件编写教程",
"properties": {
"openai-chat-completions": {
"type": "object",
"title": "OpenAI API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 120
}
}
},
"anthropic-messages": {
"type": "object",
"title": "Anthropic API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 120
}
}
},
"moonshot-chat-completions": {
"type": "object",
"title": "Moonshot API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 120
}
}
},
"deepseek-chat-completions": {
"type": "object",
"title": "DeepSeek API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 120
}
}
},
"ollama-chat": {
"type": "object",
"title": "Ollama API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 600
}
}
},
"gitee-ai-chat-completions": {
"type": "object",
"title": "Gitee AI API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 120
}
}
},
"xai-chat-completions": {
"type": "object",
"title": "xAI API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 120
}
}
},
"zhipuai-chat-completions": {
"type": "object",
"title": "智谱AI API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"default": 120
}
}
},
"lmstudio-chat-completions": {
"type": "object",
"title": "LMStudio API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 120
}
}
},
"siliconflow-chat-completions": {
"type": "object",
"title": "SiliconFlow API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 120
}
}
},
"bailian-chat-completions": {
"type": "object",
"title": "阿里云百炼大模型平台 API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 120
}
}
},
"volcark-chat-completions": {
"type": "object",
"title": "火山方舟大模型平台 API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "API 请求超时时间",
"default": 120
}
}
}
}
},
"model": {
"type": "string",
"title": "所使用的模型名称",
"description": "设置要使用的模型名称。通常来说直接填写模型名称即可,但如果要使用原生接口不是 ChatCompletion 但以 ChatCompletion 接口格式接入的模型,请在模型名称前方加一个 OneAPI/ 前缀以进行区分。 简单来说可以认为是:现阶段非 OpenAI 的模型接入都需要在模型名称前方加一个 OneAPI/ 前缀。\n\n例如\n\n1. 通过 OneAPI 等中转服务接入了 OpenAI 的 gpt-4 模型,由于 gpt-4 也是使用 ChatCompletion 接口格式进行请求,则可以直接填入 gpt-4\n2. 通过 OneAPI 等中转服务接入了 Google 的 gemini-pro 模型,由于 gemini-pro 原生接口格式并非 ChatCompletion因此需要填入 OneAPI/gemini-pro。\n具体支持的模型列表和各个模型对应的请求器和密钥组请查看元数据板块 llm-models.json "
},
"prompt-mode": {
"type": "string",
"title": "情景预设(人格)模式",
"description": "值为normal单预设模式和full-scenario完整历史对话模式normal模式时使用下方设置的情景预设也支持读取data/prompts目录下的文件内容作为单个 System Prompt文件名即为prompt的名称full-scenario模式时读取 data/scenario/ 下的完整历史对话作为情景预设",
"enum": ["normal", "full-scenario"],
"default": "normal"
},
"prompt": {
"type": "object",
"title": "情景预设(人格)",
"description": "设置情景预设人格。值为空字符串时将不使用情景预设人格。normal模式时使用下方设置的情景预设也支持读取data/prompts目录下的文件内容作为单个 System Prompt文件名即为prompt的名称full-scenario模式时读取 data/scenario/ 下的完整历史对话作为情景预设",
"properties": {
"default": {
"type": "string",
"title": "默认情景预设",
"description": "设置默认情景预设。值为空字符串时,将不使用情景预设(人格)",
"default": ""
}
},
"patternProperties": {
"^.*$": {
"type": "string",
"title": "情景预设",
"description": "设置情景预设。值为空字符串时,将不使用情景预设(人格)",
"default": ""
}
},
"required": ["default"]
},
"runner": {
"type": "string",
"title": "请求运行器",
"description": "设置请求运行器。值为local-agent时使用内置默认运行器支持插件扩展",
"default": "local-agent"
},
"dify-service-api": {
"type": "object",
"title": "Dify Service API 配置",
"properties": {
"base-url": {
"type": "string",
"title": "API URL",
"description": "Dify Service API 的 基础URL可以在 Dify 应用 API 页面查看",
"default": "https://api.dify.ai/v1"
},
"app-type": {
"type": "string",
"title": "应用类型",
"description": "支持 chat 和 workflowchat聊天助手含高级编排和 Agentworkflow工作流请填写下方对应的应用类型 API 参数",
"enum": ["chat", "workflow", "agent"],
"default": "chat"
},
"options": {
"type": "object",
"title": "Dify Service API 配置选项",
"properties": {
"convert-thinking-tips": {
"type": "string",
"title": "转换思考提示",
"description": "设置转换思考提示。值为 original 时,不转换思考提示;值为 plain 时,将思考提示转换为类似 DeepSeek 官方的<think>...</think>格式;值为 remove 时,删除思考提示",
"enum": ["original", "plain", "remove"],
"default": "plain"
}
}
},
"chat": {
"type": "object",
"title": "聊天助手 API 参数",
"properties": {
"api-key": {
"type": "string",
"title": "API 密钥"
},
"timeout": {
"type": "number",
"title":"API 请求超时时间"
}
}
},
"agent": {
"type": "object",
"title": "Agent API 参数",
"properties": {
"api-key": {
"type": "string",
"title": "API 密钥"
},
"timeout": {
"type": "number",
"title":"API 请求超时时间"
}
}
},
"workflow": {
"type": "object",
"title": "工作流 API 参数",
"properties": {
"api-key": {
"type": "string",
"title": "API 密钥"
},
"output-key": {
"type": "string",
"title": "工作流输出键",
"description": "设置工作流输出键,用于从 Dify Workflow 结束节点返回的 JSON 数据中提取输出内容",
"default": "summary"
},
"timeout": {
"type": "number",
"title": "API 请求超时时间"
}
}
}
}
},
"dashscope-app-api": {
"type": "object",
"title": "阿里百炼平台自建应用 API 配置",
"properties": {
"app-type": {
"type": "string",
"title": "应用类型",
"description": "支持 workflow 和 agentworkflow智能体编排agent普通智能体请填写下方对应的应用类型 API 参数",
"enum": ["workflow", "agent"],
"default": "agent"
},
"api-key": {
"type": "string",
"title": "API 密钥"
},
"agent": {
"type": "object",
"title": "Agent API 参数",
"properties": {
"app-id": {
"type": "string",
"title": "应用 ID"
},
"references_quote": {
"type": "string",
"title": "参考资料引用",
"description": "设置参考资料引用,用于从 Dashscope App API 结束节点返回的 JSON 数据中提取引用内容",
"default": "参考资料来自:"
}
}
},
"workflow": {
"type": "object",
"title": "工作流 API 参数",
"properties": {
"app-id": {
"type": "string",
"title": "应用 ID"
},
"references_quote": {
"type": "string",
"title": "参考资料引用",
"default": "参考资料来自:"
},
"biz_params": {
"type": "object",
"title": "传入参数",
"default": {}
}
}
}
}
},
"mcp": {
"type": "object",
"title": "MCP 配置",
"properties": {
"servers": {
"type": "array",
"title": "MCP 服务器配置",
"default": [],
"items": {
"type": "object",
"oneOf": [
{
"title": "Stdio 模式服务器",
"properties": {
"mode": {
"type": "string",
"title": "模式",
"const": "stdio"
},
"enable": {
"type": "boolean",
"title": "启用"
},
"name": {
"type": "string",
"title": "名称"
},
"command": {
"type": "string",
"title": "启动命令"
},
"args": {
"type": "array",
"title": "启动参数",
"items": {
"type": "string"
},
"default": []
},
"env": {
"type": "object",
"default": {}
}
}
},
{
"title": "SSE 模式服务器",
"properties": {
"mode": {
"type": "string",
"title": "模式",
"const": "sse"
},
"enable": {
"type": "boolean",
"title": "启用"
},
"name": {
"type": "string",
"title": "名称"
},
"url": {
"type": "string",
"title": "URL"
},
"headers": {
"type": "object",
"default": {}
},
"timeout": {
"type": "number",
"title": "请求超时时间",
"default": 10
}
}
}
]
}
}
}
}
}
}