mirror of
https://github.com/idootop/mi-gpt.git
synced 2025-04-08 02:30:56 +00:00
release: v1.1.0
This commit is contained in:
parent
b88aa350fd
commit
b6f8946369
|
@ -33,6 +33,7 @@
|
||||||
LICENSE
|
LICENSE
|
||||||
TODO.md
|
TODO.md
|
||||||
README.md
|
README.md
|
||||||
|
CHANGELOG.md
|
||||||
**/.bot.json
|
**/.bot.json
|
||||||
**/.mi.json
|
**/.mi.json
|
||||||
**/.migpt.js*
|
**/.migpt.js*
|
||||||
|
|
14
CHANGELOG.md
Normal file
14
CHANGELOG.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# v1.1.0
|
||||||
|
|
||||||
|
- 新增 Arm64 Docker 镜像
|
||||||
|
- 替换 Yarn 包管理工具为 Pnpm
|
||||||
|
|
||||||
|
# v1.0.0
|
||||||
|
|
||||||
|
- 支持人物设定
|
||||||
|
- 支持连续对话
|
||||||
|
- 支持流式响应
|
||||||
|
- 支持长短期记忆
|
||||||
|
- 支持更换音色
|
||||||
|
- 支持自定义音效和唤醒词等设置
|
||||||
|
|
70
Dockerfile
70
Dockerfile
|
@ -1,67 +1,29 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
# Comments are provided throughout this file to help you get started.
|
# base
|
||||||
# If you need more help, visit the Dockerfile reference guide at
|
FROM node:20.13.1-alpine as base
|
||||||
# https://docs.docker.com/engine/reference/builder/
|
|
||||||
|
|
||||||
ARG NODE_VERSION=18.18.2
|
WORKDIR /app
|
||||||
|
|
||||||
################################################################################
|
# build
|
||||||
# Use node image for base image for all stages.
|
FROM base as build
|
||||||
FROM node:${NODE_VERSION}-alpine as base
|
|
||||||
|
|
||||||
# Set working directory for all build stages.
|
RUN --mount=type=cache,target=/root/.npm \
|
||||||
WORKDIR /usr/src/app
|
npm install -g pnpm@9.1.1
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Create a stage for installing production dependecies.
|
|
||||||
FROM base as deps
|
|
||||||
|
|
||||||
# Download dependencies as a separate step to take advantage of Docker's caching.
|
|
||||||
# Leverage a cache mount to /root/.yarn to speed up subsequent builds.
|
|
||||||
# Leverage bind mounts to package.json and yarn.lock to avoid having to copy them
|
|
||||||
# into this layer.
|
|
||||||
RUN --mount=type=bind,source=package.json,target=package.json \
|
|
||||||
--mount=type=bind,source=yarn.lock,target=yarn.lock \
|
|
||||||
--mount=type=cache,target=/root/.yarn \
|
|
||||||
yarn install --production --frozen-lockfile
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Create a stage for building the application.
|
|
||||||
FROM deps as build
|
|
||||||
|
|
||||||
# Download additional development dependencies before building, as some projects require
|
|
||||||
# "devDependencies" to be installed to build. If you don't need this, remove this step.
|
|
||||||
RUN --mount=type=bind,source=package.json,target=package.json \
|
|
||||||
--mount=type=bind,source=yarn.lock,target=yarn.lock \
|
|
||||||
--mount=type=cache,target=/root/.yarn \
|
|
||||||
yarn install --frozen-lockfile
|
|
||||||
|
|
||||||
# Copy the rest of the source files into the image.
|
|
||||||
COPY . .
|
COPY . .
|
||||||
# Run the build script.
|
|
||||||
RUN yarn run build
|
|
||||||
|
|
||||||
################################################################################
|
RUN --mount=type=cache,target=/root/.local/share/pnpm/store \
|
||||||
# Create a new stage to run the application with minimal runtime dependencies
|
pnpm install && pnpm build
|
||||||
# where the necessary files are copied from the build stage.
|
|
||||||
FROM base as final
|
|
||||||
|
|
||||||
# Use production node environment by default.
|
# run
|
||||||
ENV NODE_ENV production
|
FROM base
|
||||||
|
|
||||||
# Copy package.json so that package manager commands can be used.
|
|
||||||
COPY package.json .
|
COPY package.json .
|
||||||
|
COPY --from=build /app/dist ./dist
|
||||||
# Copy the production dependencies from the deps stage and also
|
COPY --from=build /app/scripts ./scripts
|
||||||
# the built application from the build stage into the image.
|
COPY --from=build /app/prisma ./prisma
|
||||||
COPY --from=deps /usr/src/app/node_modules ./node_modules
|
COPY --from=build /app/node_modules ./node_modules
|
||||||
COPY --from=build /usr/src/app/dist ./dist
|
|
||||||
COPY --from=build /usr/src/app/scripts ./scripts
|
|
||||||
COPY --from=build /usr/src/app/prisma ./prisma
|
|
||||||
COPY --from=build /usr/src/app/node_modules/@prisma/client/ ./node_modules/@prisma/client/
|
|
||||||
COPY --from=build /usr/src/app/node_modules/.prisma/client/ ./node_modules/.prisma/client/
|
|
||||||
|
|
||||||
# Run the application.
|
# Run the application.
|
||||||
CMD yarn start
|
CMD npm run start
|
||||||
|
|
12
README.md
12
README.md
|
@ -1,6 +1,6 @@
|
||||||
# MiGPT:智能家居,从未如此贴心 ❤️
|
# MiGPT:智能家居,从未如此贴心 ❤️
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/mi-gpt) [](https://hub.docker.com/r/idootop/mi-gpt)
|
[](https://www.npmjs.com/package/mi-gpt) [](https://hub.docker.com/r/idootop/mi-gpt)
|
||||||
|
|
||||||
在这个数字化的世界里,家已不仅仅是一个居住的地方,而是我们数字生活的延伸。
|
在这个数字化的世界里,家已不仅仅是一个居住的地方,而是我们数字生活的延伸。
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker run -d --env-file $(pwd)/.env \
|
docker run -d --env-file $(pwd)/.env \
|
||||||
-v $(pwd)/.migpt.js:/usr/src/app/.migpt.js \
|
-v $(pwd)/.migpt.js:/app/.migpt.js \
|
||||||
idootop/mi-gpt:1.0.0
|
idootop/mi-gpt:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
#### ⭐️ NPM
|
#### ⭐️ NPM
|
||||||
|
@ -135,14 +135,10 @@ main();
|
||||||
|
|
||||||
其他未声明的配置参数与使用方法,请自行查阅源代码。
|
其他未声明的配置参数与使用方法,请自行查阅源代码。
|
||||||
|
|
||||||
**Q:我还有其他问题想问,怎么联系你?**
|
**Q:我还有其他问题**
|
||||||
|
|
||||||
请提交 [issue](https://github.com/idootop/mi-gpt/issues)
|
请提交 [issue](https://github.com/idootop/mi-gpt/issues)
|
||||||
|
|
||||||
**Q:这个项目太棒了,为你点赞 👍**
|
|
||||||
|
|
||||||
Enjoy it!
|
|
||||||
|
|
||||||
## 🚨 免责声明
|
## 🚨 免责声明
|
||||||
|
|
||||||
本项目旨在分享学习大型语言模型(LLM)智能对话及智能家居自动化相关知识,严禁用于任何商业目的或违反所在地区的法律法规。使用者须知悉,本项目代码可能存在未知的缺陷或风险,因使用本项目引起的任何形式的损失或损害(包括但不限于设备故障、账户被禁等),使用者需自行承担全部责任。
|
本项目旨在分享学习大型语言模型(LLM)智能对话及智能家居自动化相关知识,严禁用于任何商业目的或违反所在地区的法律法规。使用者须知悉,本项目代码可能存在未知的缺陷或风险,因使用本项目引起的任何形式的损失或损害(包括但不限于设备故障、账户被禁等),使用者需自行承担全部责任。
|
||||||
|
|
10
package.json
10
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mi-gpt",
|
"name": "mi-gpt",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "将小爱音箱接入 ChatGPT 和豆包,改造成你的专属语音助手。",
|
"description": "将小爱音箱接入 ChatGPT 和豆包,改造成你的专属语音助手。",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -10,18 +10,16 @@
|
||||||
"url": "https://github.com/idootop"
|
"url": "https://github.com/idootop"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"GPT",
|
|
||||||
"ChatGPT",
|
|
||||||
"mi",
|
"mi",
|
||||||
"xiaomi",
|
"xiaomi",
|
||||||
"xiaoai",
|
|
||||||
"mi-home",
|
"mi-home",
|
||||||
|
"ChatGPT",
|
||||||
"home-assistant"
|
"home-assistant"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn prisma generate && tsup",
|
|
||||||
"start": "node ./scripts/runner.js",
|
"start": "node ./scripts/runner.js",
|
||||||
"db:gen": "yarn prisma migrate dev --name init",
|
"build": "pnpm prisma generate && tsup",
|
||||||
|
"db:gen": "pnpm prisma migrate dev --name init",
|
||||||
"db:reset": "rm -f .mi.json .bot.json prisma/app.db prisma/app.db-journal"
|
"db:reset": "rm -f .mi.json .bot.json prisma/app.db prisma/app.db-journal"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
1779
pnpm-lock.yaml
Normal file
1779
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user