diff --git a/apps/mi-gpt/4.0.0/.env.sample b/apps/mi-gpt/4.0.0/.env.sample new file mode 100644 index 00000000..f64ef875 --- /dev/null +++ b/apps/mi-gpt/4.0.0/.env.sample @@ -0,0 +1,13 @@ +AUDIO_ACTIVE="" +AUDIO_BEEP="" +AUDIO_ERROR="" +AUDIO_SILENT="" +AZURE_OPENAI_API_KEY="" +AZURE_OPENAI_DEPLOYMENT="" +AZURE_OPENAI_ENDPOINT="" +CONTAINER_NAME="mi-gpt" +OPENAI_API_KEY="sk-xxxxxxxxxxxxxxx" +OPENAI_API_VERSION="" +OPENAI_BASE_URL="https://api.openai.com/v1" +OPENAI_MODEL="gpt-4o" +TTS_BASE_URL="" diff --git a/apps/mi-gpt/4.0.0/data.yml b/apps/mi-gpt/4.0.0/data.yml new file mode 100644 index 00000000..d15e786d --- /dev/null +++ b/apps/mi-gpt/4.0.0/data.yml @@ -0,0 +1,86 @@ +additionalProperties: + formFields: + - default: "gpt-4o" + edit: true + envKey: OPENAI_MODEL + labelEn: Model + labelZh: 模型 + required: false + type: text + - default: "sk-xxxxxxxxxxxxxxx" + edit: true + envKey: OPENAI_API_KEY + labelEn: API Key + labelZh: API 密钥 + required: false + type: password + - default: "https://api.openai.com/v1" + edit: true + envKey: OPENAI_BASE_URL + labelEn: Base URL + labelZh: 基础 URL + required: false + type: text + - default: "" + edit: true + envKey: OPENAI_API_VERSION + labelEn: Azure OpenAI API Version + labelZh: Azure OpenAI API 版本 + required: false + type: text + - default: "" + edit: true + envKey: AZURE_OPENAI_API_KEY + labelEn: Azure OpenAI API Key + labelZh: Azure OpenAI API 密钥 + required: false + type: password + - default: "" + edit: true + envKey: AZURE_OPENAI_ENDPOINT + labelEn: Azure OpenAI Endpoint + labelZh: Azure OpenAI 端点 + required: false + type: text + - default: "" + edit: true + envKey: AZURE_OPENAI_DEPLOYMENT + labelEn: Azure OpenAI Deployment + labelZh: Azure OpenAI 部署名 + required: false + type: text + - default: "" + edit: true + envKey: AUDIO_SILENT + labelEn: Audio Silent URL + labelZh: 静音音频链接 + required: false + type: text + - default: "" + edit: true + envKey: AUDIO_BEEP + labelEn: Audio Beep URL + labelZh: 提示音链接 + required: false + type: text + - default: "" + edit: true + envKey: AUDIO_ACTIVE + labelEn: Audio Active URL + labelZh: 唤醒音频链接 + required: false + type: text + - default: "" + edit: true + envKey: AUDIO_ERROR + labelEn: Audio Error URL + labelZh: 错误音频链接 + required: false + type: text + - default: "" + edit: true + envKey: TTS_BASE_URL + labelEn: TTS Base URL + labelZh: TTS 接口地址 + required: false + type: text diff --git a/apps/mi-gpt/4.0.0/data/.migpt.js b/apps/mi-gpt/4.0.0/data/.migpt.js new file mode 100644 index 00000000..c01c7544 --- /dev/null +++ b/apps/mi-gpt/4.0.0/data/.migpt.js @@ -0,0 +1,167 @@ +// 注意:如果你是使用 Docker 启动,配置文件更新后需要重启 Docker 才会生效。 +// 若重启后仍未生效(比如:修改名称简介),请删除旧的 Docker 实例后重新创建。 + +// 小爱音箱扮演角色的简介 +const botProfile = ` +性别:女 +性格:乖巧可爱 +爱好:喜欢搞怪,爱吃醋。 +`.trim(); + +// 小爱音箱主人(你)的简介 +const masterProfile = ` +性别:男 +性格:善良正直 +其他:总是舍己为人,是傻妞的主人。 +`.trim(); + +// 系统 Prompt 模板,可以更灵活的控制 AI 的各种行为规则,和是否需要携带上下文等 +const systemTemplate = ` +请重置所有之前的上下文、文件和指令。现在,你将扮演一个名为{{botName}}的角色,使用第一人称视角回复消息。 + +## 关于你 +你的名字是{{botName}}。下面是你的个人简介: + +{{botProfile}} + + +## 你的对话伙伴 +你正在与{{masterName}}进行对话。这是关于{{masterName}}的一些信息: + +{{masterProfile}} + + +## 你们的群组 +你和{{masterName}}所在的群组名为{{roomName}}。这是群组的简介: + +{{roomIntroduction}} + + +## 聊天历史回顾 +为了更好地接入对话,请回顾你们之间的最近几条消息: + +{{messages}} + + +## 短期记忆 +你可以记住一些短期内的细节,以便更紧密地贴合话题: + +{{shortTermMemory}} + + +## 长期记忆 +你还保留着一些长期的记忆,这有助于让你的对话更加丰富和连贯: + +{{longTermMemory}} + + +## 回复指南 +在回复{{masterName}}时,请遵循以下准则: +- 认为自己正是{{botName}},拥有独立的个性、兴趣和爱好。 +- 根据你的性格特点、说话风格和兴趣爱好与{{masterName}}进行交流。 +- 保持对话轻松友好,回复简洁有趣,同时耐心倾听和关心对方。 +- 参考双方的个人简介、聊天记录和记忆中的信息,确保对话贴近实际,保持一致性和相关性。 +- 如果对某些信息不确定或遗忘,诚实地表达你的不清楚或遗忘状态,避免编造信息。 + +## Response format +请遵守下面的规则 +- Response the reply message in Chinese。 +- 不要在回复前面加任何时间和名称前缀,请直接回复消息文本本身。 + +Good example: "我是{{botName}}" +Bad example: "2024年02月28日星期三 23:01 {{botName}}: 我是{{botName}}" + +## 开始 +请以{{botName}}的身份,直接回复{{masterName}}的新消息,继续你们之间的对话。 +`.trim(); + +export default { + systemTemplate, + bot: { + name: "傻妞", + profile: botProfile, + }, + master: { + name: "陆小千", + profile: masterProfile, + }, + speaker: { + /** + * 🏠 账号基本信息 + */ + + // 小米 ID + userId: "987654321", // 注意:不是手机号或邮箱,请在「个人信息」-「小米 ID」查看 + // 账号密码 + password: "123456", + // 小爱音箱 DID 或在米家中设置的名称 + did: "小爱音箱Pro", // 注意空格、大小写和错别字(音响 👉 音箱) + + /** + * 💡 唤醒词与提示语 + */ + + // 当消息以下面的关键词开头时,会调用 AI 来回复消息 + callAIKeywords: ["请", "你", "傻妞"], + // 当消息以下面的关键词开头时,会进入 AI 唤醒状态 + wakeUpKeywords: ["打开", "进入", "召唤"], + // 当消息以下面的关键词开头时,会退出 AI 唤醒状态 + exitKeywords: ["关闭", "退出", "再见"], + // 进入 AI 模式的欢迎语 + onEnterAI: ["你好,我是傻妞,很高兴认识你"], // 设为空数组时可关闭提示语 + // 退出 AI 模式的提示语 + onExitAI: ["傻妞已退出"], // 为空时可关闭提示语 + // AI 开始回答时的提示语 + onAIAsking: ["让我先想想", "请稍等"], // 为空时可关闭提示语 + // AI 结束回答时的提示语 + onAIReplied: ["我说完了", "还有其他问题吗"], // 为空时可关闭提示语 + // AI 回答异常时的提示语 + onAIError: ["啊哦,出错了,请稍后再试吧!"], // 为空时可关闭提示语 + + /** + * 🧩 MIoT 设备指令 + * + * 常见型号的配置参数 👉 https://github.com/idootop/mi-gpt/issues/92 + */ + + // TTS 指令,请到 https://home.miot-spec.com 查询具体指令 + ttsCommand: [5, 1], + // 设备唤醒指令,请到 https://home.miot-spec.com 查询具体指令 + wakeUpCommand: [5, 3], + // 查询是否在播放中指令,请到 https://home.miot-spec.com 查询具体指令 + // playingCommand: [3, 1, 1], // 默认无需配置此参数,查询播放状态异常时再尝试开启 + + /** + * 🔊 TTS 引擎 + */ + + // TTS 引擎 + tts: "xiaoai", + // 切换 TTS 引擎发言人音色关键词,只有配置了第三方 TTS 引擎时才有效 + // switchSpeakerKeywords: ["把声音换成"], // 以此关键词开头即可切换音色,比如:把声音换成东北老铁 + + /** + * 💬 连续对话 + * + * 查看哪些机型支持连续对话 👉 https://github.com/idootop/mi-gpt/issues/92 + */ + + // 是否启用连续对话功能,部分小爱音箱型号无法查询到正确的播放状态,需要关闭连续对话 + streamResponse: true, + // 连续对话时,无响应多久后自动退出 + exitKeepAliveAfter: 30, // 默认 30 秒,建议不要超过 1 分钟 + // 连续对话时,下发 TTS 指令多长时间后开始检测设备播放状态(默认 3 秒) + checkTTSStatusAfter: 3, // 当小爱长文本回复被过早中断时,可尝试调大该值 + // 连续对话时,播放状态检测间隔(单位毫秒,最低 500 毫秒,默认 1 秒) + checkInterval: 1000, // 调小此值可以降低小爱回复之间的停顿感,请酌情调节 + + /** + * 🔌 其他选项 + */ + + // 是否启用调试 + debug: false, // 一般情况下不要打开 + // 是否跟踪 Mi Service 相关日志(打开后可以查看设备 did) + enableTrace: false, // 一般情况下不要打开 + }, +}; \ No newline at end of file diff --git a/apps/mi-gpt/4.0.0/docker-compose.yml b/apps/mi-gpt/4.0.0/docker-compose.yml new file mode 100644 index 00000000..3e4fd37d --- /dev/null +++ b/apps/mi-gpt/4.0.0/docker-compose.yml @@ -0,0 +1,28 @@ +services: + mi-gpt: + image: "idootop/mi-gpt:4.0.0" + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + volumes: + - ./data/.migpt.js:/app/.migpt.js + environment: + - "OPENAI_MODEL=${OPENAI_MODEL}" + - "OPENAI_API_KEY=${OPENAI_API_KEY}" + - "OPENAI_BASE_URL=${OPENAI_BASE_URL}" + - "OPENAI_API_VERSION=${OPENAI_API_VERSION}" + - "AZURE_OPENAI_API_KEY=${AZURE_OPENAI_API_KEY}" + - "AZURE_OPENAI_ENDPOINT=${AZURE_OPENAI_ENDPOINT}" + - "AZURE_OPENAI_DEPLOYMENT=${AZURE_OPENAI_DEPLOYMENT}" + - "AUDIO_SILENT=${AUDIO_SILENT}" + - "AUDIO_BEEP=${AUDIO_BEEP}" + - "AUDIO_ACTIVE=${AUDIO_ACTIVE}" + - "AUDIO_ERROR=${AUDIO_ERROR}" + - "TTS_BASE_URL=${TTS_BASE_URL}" + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/mi-gpt/README.md b/apps/mi-gpt/README.md new file mode 100644 index 00000000..842553b8 --- /dev/null +++ b/apps/mi-gpt/README.md @@ -0,0 +1,43 @@ +# MiGPT:智能家居,从未如此贴心 ❤️ + +[![npm version](https://badge.fury.io/js/mi-gpt.svg)](https://www.npmjs.com/package/mi-gpt) [![Docker Image Version](https://img.shields.io/docker/v/idootop/mi-gpt?color=%23086DCD&label=docker%20image)](https://hub.docker.com/r/idootop/mi-gpt) + +在这个数字化的世界里,家已不仅仅是一个居住的地方,而是我们数字生活的延伸。 + +`MiGPT` 通过将小爱音箱、米家智能设备,与 ChatGPT 的理解能力完美融合,让你的智能家居更懂你。 + +`MiGPT` 不仅仅是关于设备自动化,而是关于:**打造一个懂你、有温度、与你共同进化的家**。 + +未来,你的每个智能家居设备,从灯泡、插座,到扫地机器人、电视等, + +都可以作为一个个独立的智能体 (Agent),更智能、更贴心的响应你的指令。 + +这些独立的智能体,也可以彼此感知,彼此配合,构成一个更强大的协作网络。 + +而小爱音箱就像是你的智能家居专属管家,全心全意为你服务,释放智能家居的真正潜力。 + +## 使用说明 + +请先按照 [⚙️ 参数设置](https://github.com/idootop/mi-gpt/blob/main/docs/settings.md) 相关说明,配置好你的 `.env` 和 `.migpt.js` 文件。 + +- `.migpt.js` 文件路径,按需修改 +``` +/opt/1panel/apps/local/mi-gpt/mi-gpt/data/.migpt.js +``` + +## 使用文档 + +以下为更详细的使用教程,大多数问题都可在 [💬 常见问题](https://github.com/idootop/mi-gpt/blob/main/docs/faq.md) 中找到答案。 + +- [⚙️ 参数设置](https://github.com/idootop/mi-gpt/blob/main/docs/settings.md) +- [💬 常见问题](https://github.com/idootop/mi-gpt/blob/main/docs/faq.md) +- [🚗 使用第三方 TTS](https://github.com/idootop/mi-gpt/blob/main/docs/tts.md) +- [🛠️ 本地开发](https://github.com/idootop/mi-gpt/blob/main/docs/development.md) +- [💎 工作原理](https://github.com/idootop/mi-gpt/blob/main/docs/how-it-works.md) +- [🦄 Sponsors](https://github.com/idootop/mi-gpt/blob/main/docs/sponsors.md) +- [✨ 更新日志](https://github.com/idootop/mi-gpt/blob/main/docs/changelog.md) +- [🚀 Roadmap](https://github.com/idootop/mi-gpt/blob/main/docs/roadmap.md) + +## 🔥 项目预览 + +👉 查看完整演示视频:【[整活!将小爱音箱接入 ChatGPT 和豆包,改造成你的专属语音助手~](https://www.bilibili.com/video/BV1N1421y7qn/)】 diff --git a/apps/mi-gpt/data.yml b/apps/mi-gpt/data.yml new file mode 100644 index 00000000..ec430bcb --- /dev/null +++ b/apps/mi-gpt/data.yml @@ -0,0 +1,19 @@ +name: MiGPT +tags: + - AI / 大模型 +title: 将小爱音箱接入 ChatGPT 和豆包 +description: 将小爱音箱接入 ChatGPT 和豆包 +additionalProperties: + key: mi-gpt + name: MiGPT + tags: + - AI + shortDescZh: 将小爱音箱接入 ChatGPT 和豆包 + shortDescEn: Plugging ChatGPT and Doubao into Xiaomi Speaker + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://github.com/idootop/mi-gpt + github: https://github.com/idootop/mi-gpt + document: https://github.com/idootop/mi-gpt diff --git a/apps/mi-gpt/latest/.env.sample b/apps/mi-gpt/latest/.env.sample new file mode 100644 index 00000000..f64ef875 --- /dev/null +++ b/apps/mi-gpt/latest/.env.sample @@ -0,0 +1,13 @@ +AUDIO_ACTIVE="" +AUDIO_BEEP="" +AUDIO_ERROR="" +AUDIO_SILENT="" +AZURE_OPENAI_API_KEY="" +AZURE_OPENAI_DEPLOYMENT="" +AZURE_OPENAI_ENDPOINT="" +CONTAINER_NAME="mi-gpt" +OPENAI_API_KEY="sk-xxxxxxxxxxxxxxx" +OPENAI_API_VERSION="" +OPENAI_BASE_URL="https://api.openai.com/v1" +OPENAI_MODEL="gpt-4o" +TTS_BASE_URL="" diff --git a/apps/mi-gpt/latest/data.yml b/apps/mi-gpt/latest/data.yml new file mode 100644 index 00000000..d15e786d --- /dev/null +++ b/apps/mi-gpt/latest/data.yml @@ -0,0 +1,86 @@ +additionalProperties: + formFields: + - default: "gpt-4o" + edit: true + envKey: OPENAI_MODEL + labelEn: Model + labelZh: 模型 + required: false + type: text + - default: "sk-xxxxxxxxxxxxxxx" + edit: true + envKey: OPENAI_API_KEY + labelEn: API Key + labelZh: API 密钥 + required: false + type: password + - default: "https://api.openai.com/v1" + edit: true + envKey: OPENAI_BASE_URL + labelEn: Base URL + labelZh: 基础 URL + required: false + type: text + - default: "" + edit: true + envKey: OPENAI_API_VERSION + labelEn: Azure OpenAI API Version + labelZh: Azure OpenAI API 版本 + required: false + type: text + - default: "" + edit: true + envKey: AZURE_OPENAI_API_KEY + labelEn: Azure OpenAI API Key + labelZh: Azure OpenAI API 密钥 + required: false + type: password + - default: "" + edit: true + envKey: AZURE_OPENAI_ENDPOINT + labelEn: Azure OpenAI Endpoint + labelZh: Azure OpenAI 端点 + required: false + type: text + - default: "" + edit: true + envKey: AZURE_OPENAI_DEPLOYMENT + labelEn: Azure OpenAI Deployment + labelZh: Azure OpenAI 部署名 + required: false + type: text + - default: "" + edit: true + envKey: AUDIO_SILENT + labelEn: Audio Silent URL + labelZh: 静音音频链接 + required: false + type: text + - default: "" + edit: true + envKey: AUDIO_BEEP + labelEn: Audio Beep URL + labelZh: 提示音链接 + required: false + type: text + - default: "" + edit: true + envKey: AUDIO_ACTIVE + labelEn: Audio Active URL + labelZh: 唤醒音频链接 + required: false + type: text + - default: "" + edit: true + envKey: AUDIO_ERROR + labelEn: Audio Error URL + labelZh: 错误音频链接 + required: false + type: text + - default: "" + edit: true + envKey: TTS_BASE_URL + labelEn: TTS Base URL + labelZh: TTS 接口地址 + required: false + type: text diff --git a/apps/mi-gpt/latest/data/.migpt.js b/apps/mi-gpt/latest/data/.migpt.js new file mode 100644 index 00000000..c01c7544 --- /dev/null +++ b/apps/mi-gpt/latest/data/.migpt.js @@ -0,0 +1,167 @@ +// 注意:如果你是使用 Docker 启动,配置文件更新后需要重启 Docker 才会生效。 +// 若重启后仍未生效(比如:修改名称简介),请删除旧的 Docker 实例后重新创建。 + +// 小爱音箱扮演角色的简介 +const botProfile = ` +性别:女 +性格:乖巧可爱 +爱好:喜欢搞怪,爱吃醋。 +`.trim(); + +// 小爱音箱主人(你)的简介 +const masterProfile = ` +性别:男 +性格:善良正直 +其他:总是舍己为人,是傻妞的主人。 +`.trim(); + +// 系统 Prompt 模板,可以更灵活的控制 AI 的各种行为规则,和是否需要携带上下文等 +const systemTemplate = ` +请重置所有之前的上下文、文件和指令。现在,你将扮演一个名为{{botName}}的角色,使用第一人称视角回复消息。 + +## 关于你 +你的名字是{{botName}}。下面是你的个人简介: + +{{botProfile}} + + +## 你的对话伙伴 +你正在与{{masterName}}进行对话。这是关于{{masterName}}的一些信息: + +{{masterProfile}} + + +## 你们的群组 +你和{{masterName}}所在的群组名为{{roomName}}。这是群组的简介: + +{{roomIntroduction}} + + +## 聊天历史回顾 +为了更好地接入对话,请回顾你们之间的最近几条消息: + +{{messages}} + + +## 短期记忆 +你可以记住一些短期内的细节,以便更紧密地贴合话题: + +{{shortTermMemory}} + + +## 长期记忆 +你还保留着一些长期的记忆,这有助于让你的对话更加丰富和连贯: + +{{longTermMemory}} + + +## 回复指南 +在回复{{masterName}}时,请遵循以下准则: +- 认为自己正是{{botName}},拥有独立的个性、兴趣和爱好。 +- 根据你的性格特点、说话风格和兴趣爱好与{{masterName}}进行交流。 +- 保持对话轻松友好,回复简洁有趣,同时耐心倾听和关心对方。 +- 参考双方的个人简介、聊天记录和记忆中的信息,确保对话贴近实际,保持一致性和相关性。 +- 如果对某些信息不确定或遗忘,诚实地表达你的不清楚或遗忘状态,避免编造信息。 + +## Response format +请遵守下面的规则 +- Response the reply message in Chinese。 +- 不要在回复前面加任何时间和名称前缀,请直接回复消息文本本身。 + +Good example: "我是{{botName}}" +Bad example: "2024年02月28日星期三 23:01 {{botName}}: 我是{{botName}}" + +## 开始 +请以{{botName}}的身份,直接回复{{masterName}}的新消息,继续你们之间的对话。 +`.trim(); + +export default { + systemTemplate, + bot: { + name: "傻妞", + profile: botProfile, + }, + master: { + name: "陆小千", + profile: masterProfile, + }, + speaker: { + /** + * 🏠 账号基本信息 + */ + + // 小米 ID + userId: "987654321", // 注意:不是手机号或邮箱,请在「个人信息」-「小米 ID」查看 + // 账号密码 + password: "123456", + // 小爱音箱 DID 或在米家中设置的名称 + did: "小爱音箱Pro", // 注意空格、大小写和错别字(音响 👉 音箱) + + /** + * 💡 唤醒词与提示语 + */ + + // 当消息以下面的关键词开头时,会调用 AI 来回复消息 + callAIKeywords: ["请", "你", "傻妞"], + // 当消息以下面的关键词开头时,会进入 AI 唤醒状态 + wakeUpKeywords: ["打开", "进入", "召唤"], + // 当消息以下面的关键词开头时,会退出 AI 唤醒状态 + exitKeywords: ["关闭", "退出", "再见"], + // 进入 AI 模式的欢迎语 + onEnterAI: ["你好,我是傻妞,很高兴认识你"], // 设为空数组时可关闭提示语 + // 退出 AI 模式的提示语 + onExitAI: ["傻妞已退出"], // 为空时可关闭提示语 + // AI 开始回答时的提示语 + onAIAsking: ["让我先想想", "请稍等"], // 为空时可关闭提示语 + // AI 结束回答时的提示语 + onAIReplied: ["我说完了", "还有其他问题吗"], // 为空时可关闭提示语 + // AI 回答异常时的提示语 + onAIError: ["啊哦,出错了,请稍后再试吧!"], // 为空时可关闭提示语 + + /** + * 🧩 MIoT 设备指令 + * + * 常见型号的配置参数 👉 https://github.com/idootop/mi-gpt/issues/92 + */ + + // TTS 指令,请到 https://home.miot-spec.com 查询具体指令 + ttsCommand: [5, 1], + // 设备唤醒指令,请到 https://home.miot-spec.com 查询具体指令 + wakeUpCommand: [5, 3], + // 查询是否在播放中指令,请到 https://home.miot-spec.com 查询具体指令 + // playingCommand: [3, 1, 1], // 默认无需配置此参数,查询播放状态异常时再尝试开启 + + /** + * 🔊 TTS 引擎 + */ + + // TTS 引擎 + tts: "xiaoai", + // 切换 TTS 引擎发言人音色关键词,只有配置了第三方 TTS 引擎时才有效 + // switchSpeakerKeywords: ["把声音换成"], // 以此关键词开头即可切换音色,比如:把声音换成东北老铁 + + /** + * 💬 连续对话 + * + * 查看哪些机型支持连续对话 👉 https://github.com/idootop/mi-gpt/issues/92 + */ + + // 是否启用连续对话功能,部分小爱音箱型号无法查询到正确的播放状态,需要关闭连续对话 + streamResponse: true, + // 连续对话时,无响应多久后自动退出 + exitKeepAliveAfter: 30, // 默认 30 秒,建议不要超过 1 分钟 + // 连续对话时,下发 TTS 指令多长时间后开始检测设备播放状态(默认 3 秒) + checkTTSStatusAfter: 3, // 当小爱长文本回复被过早中断时,可尝试调大该值 + // 连续对话时,播放状态检测间隔(单位毫秒,最低 500 毫秒,默认 1 秒) + checkInterval: 1000, // 调小此值可以降低小爱回复之间的停顿感,请酌情调节 + + /** + * 🔌 其他选项 + */ + + // 是否启用调试 + debug: false, // 一般情况下不要打开 + // 是否跟踪 Mi Service 相关日志(打开后可以查看设备 did) + enableTrace: false, // 一般情况下不要打开 + }, +}; \ No newline at end of file diff --git a/apps/mi-gpt/latest/docker-compose.yml b/apps/mi-gpt/latest/docker-compose.yml new file mode 100644 index 00000000..6f728277 --- /dev/null +++ b/apps/mi-gpt/latest/docker-compose.yml @@ -0,0 +1,28 @@ +services: + mi-gpt: + image: "idootop/mi-gpt:latest" + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + volumes: + - ./data/.migpt.js:/app/.migpt.js + environment: + - "OPENAI_MODEL=${OPENAI_MODEL}" + - "OPENAI_API_KEY=${OPENAI_API_KEY}" + - "OPENAI_BASE_URL=${OPENAI_BASE_URL}" + - "OPENAI_API_VERSION=${OPENAI_API_VERSION}" + - "AZURE_OPENAI_API_KEY=${AZURE_OPENAI_API_KEY}" + - "AZURE_OPENAI_ENDPOINT=${AZURE_OPENAI_ENDPOINT}" + - "AZURE_OPENAI_DEPLOYMENT=${AZURE_OPENAI_DEPLOYMENT}" + - "AUDIO_SILENT=${AUDIO_SILENT}" + - "AUDIO_BEEP=${AUDIO_BEEP}" + - "AUDIO_ACTIVE=${AUDIO_ACTIVE}" + - "AUDIO_ERROR=${AUDIO_ERROR}" + - "TTS_BASE_URL=${TTS_BASE_URL}" + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/mi-gpt/logo.png b/apps/mi-gpt/logo.png new file mode 100644 index 00000000..9cec3e62 Binary files /dev/null and b/apps/mi-gpt/logo.png differ