Skip to content

Commit

Permalink
refactor: Use ffmpeg.wasm instead of ffmpeg
Browse files Browse the repository at this point in the history
feat: Support for transferring sticker, video, and text/plain files
chore: Adjust adapter dependencies to be compatible with non-OpenAI audio chat
  • Loading branch information
adolphnov committed Dec 14, 2024
1 parent 42da2d2 commit 4b740b5
Show file tree
Hide file tree
Showing 21 changed files with 7,852 additions and 6,923 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ FROM node:alpine AS DEV
WORKDIR /app
COPY package.json vite.config.ts tsconfig.json ./
COPY src ./src
RUN apk add git && npm install && npm run build:local
RUN npm install && npm run build:local

FROM node:alpine AS PROD

WORKDIR /app
COPY --from=DEV /app/dist/index.js /app/dist/index.js
COPY --from=DEV /app/package.json /app/
RUN apk add --no-cache ffmpeg git sqlite && \
RUN apk add --no-cache sqlite && \
npm install --only=production --omit=dev && \
npm cache clean --force
EXPOSE 8787
Expand Down
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
"prepare:vercel": "tsx ./scripts/plugins/vercel/setenv.ts",
"wrangler": "wrangler",
"test": "tsx ./src/config/env.test.ts",
"clean": "rm -rf dist",
"postinstall": "cd node_modules/cloudflare-worker-adapter && npm install && npm run build"
"clean": "rm -rf dist"
},
"dependencies": {
"@ai-sdk/anthropic": "^1.0.5",
Expand All @@ -48,10 +47,13 @@
"@ai-sdk/google-vertex": "^2.0.7",
"@ai-sdk/mistral": "^1.0.5",
"@ai-sdk/openai": "^1.0.8",
"@ai-sdk/provider": "^1.0.2",
"@ai-sdk/xai": "^1.0.6",
"@ffmpeg.wasm/core-st": "^0.13.2",
"@ffmpeg.wasm/main": "^0.13.1",
"ai": "^4.0.14",
"base64-stream": "^1.0.0",
"cloudflare-worker-adapter": "github:adolphnov/cloudflare-worker-adapter",
"cf-worker-adapter": "^1.4.0",
"fluent-ffmpeg": "^2.1.3",
"node-cron": "^3.0.3"
},
Expand All @@ -65,7 +67,6 @@
"@ai-sdk/openai": "^1.0.8",
"@antfu/eslint-config": "^3.11.2",
"@cloudflare/workers-types": "^4.20241205.0",
"@google-cloud/vertexai": "^1.9.2",
"@rollup/plugin-node-resolve": "^15.3.0",
"@types/base64-stream": "^1.0.5",
"@types/fluent-ffmpeg": "^2.1.27",
Expand All @@ -79,10 +80,6 @@
"base64-stream": "^1.0.0",
"eslint": "^9.16.0",
"eslint-plugin-format": "^0.1.3",
"fluent-ffmpeg": "^2.1.3",
"gts": "^6.0.2",
"openai": "^4.76.1",
"react-dom": "^19.0.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-node-externals": "^7.1.3",
"telegram-bot-api-types": "^8.1.0",
Expand Down
Loading

0 comments on commit 4b740b5

Please sign in to comment.