From 49509f751abda7ccb3778d5b262d5b2e8a8eaedb Mon Sep 17 00:00:00 2001 From: Lars Grammel Date: Sun, 21 Jan 2024 16:35:33 +0100 Subject: [PATCH] v0.130.0 --- CHANGELOG.md | 19 ++++++++++ examples/babyagi-agent/package.json | 2 +- examples/basic/package.json | 2 +- examples/chatbot-next-js/package.json | 2 +- examples/cloudflare-workers/package.json | 2 +- .../middle-school-math-agent/package.json | 2 +- examples/nextjs/package.json | 2 +- examples/pdf-chat-terminal/package.json | 2 +- examples/pdf-to-tweet/package.json | 2 +- .../package.json | 2 +- examples/wikipedia-agent/package.json | 2 +- packages/@modelfusion-pinecone/package.json | 2 +- packages/@modelfusion-sqlite-vss/package.json | 2 +- packages/@modelfusion-vercel-ai/package.json | 2 +- .../modelfusion-experimental/package.json | 2 +- packages/modelfusion/package.json | 2 +- pnpm-lock.yaml | 38 +++++++++---------- test-environments/commonjs/package.json | 2 +- tools/google-custom-search-tool/package.json | 2 +- tools/mathjs-tool/package.json | 2 +- tools/mediawiki-search-tool/package.json | 2 +- tools/serpapi-tool/package.json | 2 +- 22 files changed, 58 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07211649..470e8db0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## v0.130.0 - 2024-01-21 + +### Changed + +- **breaking change**: updated `generateTranscription` interface. The function now takes a `mimeType` and `audioData` (base64-encoded string, `Uint8Array`, `Buffer` or `ArrayBuffer`). Example: + + ```ts + import { generateTranscription, openai } from "modelfusion"; + import fs from "node:fs"; + + const transcription = await generateTranscription({ + model: openai.Transcriber({ model: "whisper-1" }), + mimeType: "audio/mp3", + audioData: await fs.promises.readFile("data/test.mp3"), + }); + ``` + +- Images in instruction and chat prompts can be `Buffer` or `ArrayBuffer` instances (in addition to base64-encoded strings and `Uint8Array` instances). + ## v0.129.0 - 2024-01-20 ### Changed diff --git a/examples/babyagi-agent/package.json b/examples/babyagi-agent/package.json index 3ffd2447..0d868dac 100644 --- a/examples/babyagi-agent/package.json +++ b/examples/babyagi-agent/package.json @@ -12,7 +12,7 @@ "commander": "10.0.1", "dotenv": "16.3.1", "jsdom": "^22.1.0", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "serpapi": "^2.0.0" }, "devDependencies": { diff --git a/examples/basic/package.json b/examples/basic/package.json index 1635b199..7014d5b0 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -12,7 +12,7 @@ "@pinecone-database/pinecone": "0.1.6", "dotenv": "16.3.1", "secure-json-parse": "2.7.0", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "modelfusion-experimental": "0.5.0", "nanoid": "3.3.6", "better-sqlite3": "9.0.0", diff --git a/examples/chatbot-next-js/package.json b/examples/chatbot-next-js/package.json index 8cd6f3f6..fc0f92b8 100644 --- a/examples/chatbot-next-js/package.json +++ b/examples/chatbot-next-js/package.json @@ -20,7 +20,7 @@ "@emotion/styled": "11.10.8", "@mui/icons-material": "5.15.5", "@mui/material": "5.12.2", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "modelfusion-experimental": "0.5.0", "next": "13.5.1", "react": "18.2.0", diff --git a/examples/cloudflare-workers/package.json b/examples/cloudflare-workers/package.json index 301fba20..4d8b04f8 100644 --- a/examples/cloudflare-workers/package.json +++ b/examples/cloudflare-workers/package.json @@ -15,6 +15,6 @@ "wrangler": "^3.22.1" }, "dependencies": { - "modelfusion": "0.129.1" + "modelfusion": "0.130.0" } } diff --git a/examples/middle-school-math-agent/package.json b/examples/middle-school-math-agent/package.json index 6834a043..29c86922 100644 --- a/examples/middle-school-math-agent/package.json +++ b/examples/middle-school-math-agent/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@modelfusion/mathjs-tool": "0.1.1", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "dotenv": "16.3.1", "zod": "3.22.4" }, diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 99b3ee66..9feefe7f 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -15,7 +15,7 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.1.0", "lucide-react": "^0.312.0", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "modelfusion-experimental": "0.5.0", "next": "14.1.0", "react": "^18", diff --git a/examples/pdf-chat-terminal/package.json b/examples/pdf-chat-terminal/package.json index 67fbf14b..a6e38260 100644 --- a/examples/pdf-chat-terminal/package.json +++ b/examples/pdf-chat-terminal/package.json @@ -9,7 +9,7 @@ }, "private": true, "dependencies": { - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "commander": "10.0.1", "dotenv": "16.3.1", "pdfjs-dist": "3.6.172" diff --git a/examples/pdf-to-tweet/package.json b/examples/pdf-to-tweet/package.json index 41ca8f8c..7fd16a3a 100644 --- a/examples/pdf-to-tweet/package.json +++ b/examples/pdf-to-tweet/package.json @@ -9,7 +9,7 @@ }, "private": true, "dependencies": { - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "modelfusion-experimental": "0.5.0", "commander": "10.0.1", "dotenv": "16.3.1", diff --git a/examples/speech-streaming-vite-react-fastify/package.json b/examples/speech-streaming-vite-react-fastify/package.json index bf4bba83..4477302f 100644 --- a/examples/speech-streaming-vite-react-fastify/package.json +++ b/examples/speech-streaming-vite-react-fastify/package.json @@ -19,7 +19,7 @@ "clsx": "^2.0.0", "dotenv": "16.3.1", "fastify": "^4.23.2", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "modelfusion-experimental": "0.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/wikipedia-agent/package.json b/examples/wikipedia-agent/package.json index 706fcc75..fe3ee685 100644 --- a/examples/wikipedia-agent/package.json +++ b/examples/wikipedia-agent/package.json @@ -14,7 +14,7 @@ "dotenv": "16.3.1", "html-to-text": "9.0.5", "jsdom": "^22.1.0", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "modelfusion-experimental": "0.5.0", "zod": "3.22.4" }, diff --git a/packages/@modelfusion-pinecone/package.json b/packages/@modelfusion-pinecone/package.json index 145af454..8f317203 100644 --- a/packages/@modelfusion-pinecone/package.json +++ b/packages/@modelfusion-pinecone/package.json @@ -54,7 +54,7 @@ "@typescript-eslint/parser": "^6.1.0", "eslint": "^8.45.0", "eslint-config-prettier": "9.1.0", - "modelfusion": "0.129.1" + "modelfusion": "0.130.0" }, "peerDependencies": { "modelfusion": ">=0.72.0 <1.0.0-0", diff --git a/packages/@modelfusion-sqlite-vss/package.json b/packages/@modelfusion-sqlite-vss/package.json index ed448bec..ac424947 100644 --- a/packages/@modelfusion-sqlite-vss/package.json +++ b/packages/@modelfusion-sqlite-vss/package.json @@ -54,7 +54,7 @@ "@typescript-eslint/parser": "^6.1.0", "eslint": "^8.45.0", "eslint-config-prettier": "9.1.0", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "sqlite-vss": "^0.1.2", "better-sqlite3": "^9.0.0" }, diff --git a/packages/@modelfusion-vercel-ai/package.json b/packages/@modelfusion-vercel-ai/package.json index 8c5b6cc7..ee72c982 100644 --- a/packages/@modelfusion-vercel-ai/package.json +++ b/packages/@modelfusion-vercel-ai/package.json @@ -56,7 +56,7 @@ "ai": ">= 2.2.27", "eslint": "^8.45.0", "eslint-config-prettier": "9.1.0", - "modelfusion": "0.129.1" + "modelfusion": "0.130.0" }, "peerDependencies": { "modelfusion": ">=0.89.0", diff --git a/packages/modelfusion-experimental/package.json b/packages/modelfusion-experimental/package.json index 545bbb7a..a2ab8694 100644 --- a/packages/modelfusion-experimental/package.json +++ b/packages/modelfusion-experimental/package.json @@ -76,6 +76,6 @@ "eslint": "^8.45.0", "eslint-config-prettier": "9.1.0", "fastify": "^4.0.0", - "modelfusion": "0.129.1" + "modelfusion": "0.130.0" } } diff --git a/packages/modelfusion/package.json b/packages/modelfusion/package.json index ddd40c6d..d9d8cbc6 100644 --- a/packages/modelfusion/package.json +++ b/packages/modelfusion/package.json @@ -1,7 +1,7 @@ { "name": "modelfusion", "description": "The TypeScript library for building AI applications.", - "version": "0.129.1", + "version": "0.130.0", "author": "Lars Grammel", "license": "MIT", "keywords": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c27f09c5..c9b63b13 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -103,7 +103,7 @@ importers: specifier: ^22.1.0 version: 22.1.0 modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist serpapi: specifier: ^2.0.0 @@ -143,7 +143,7 @@ importers: specifier: 16.3.1 version: 16.3.1 modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -186,7 +186,7 @@ importers: specifier: 5.12.2 version: 5.12.2(@emotion/react@11.10.8)(@emotion/styled@11.10.8)(@types/react@18.2.15)(react-dom@18.2.0)(react@18.2.0) modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -229,7 +229,7 @@ importers: examples/cloudflare-workers: dependencies: modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist devDependencies: '@cloudflare/workers-types': @@ -251,7 +251,7 @@ importers: specifier: 16.3.1 version: 16.3.1 modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist zod: specifier: 3.22.4 @@ -282,7 +282,7 @@ importers: specifier: ^0.312.0 version: 0.312.0(react@18.2.0) modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -337,7 +337,7 @@ importers: specifier: 16.3.1 version: 16.3.1 modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist pdfjs-dist: specifier: 3.6.172 @@ -356,7 +356,7 @@ importers: specifier: 16.3.1 version: 16.3.1 modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -396,7 +396,7 @@ importers: specifier: ^4.23.2 version: 4.25.1 modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -478,7 +478,7 @@ importers: specifier: ^22.1.0 version: 22.1.0 modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -518,7 +518,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../modelfusion/dist publishDirectory: dist @@ -546,7 +546,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../modelfusion/dist sqlite-vss: specifier: ^0.1.2 @@ -577,7 +577,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../modelfusion/dist publishDirectory: dist @@ -662,7 +662,7 @@ importers: specifier: ^4.0.0 version: 4.25.1 modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../modelfusion/dist publishDirectory: dist @@ -672,7 +672,7 @@ importers: specifier: 16.3.1 version: 16.3.1 modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist test-environments/esm: @@ -702,7 +702,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist zod: specifier: 3.22.4 @@ -731,7 +731,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist zod: specifier: 3.22.4 @@ -756,7 +756,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist zod: specifier: 3.22.4 @@ -785,7 +785,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.129.1 + specifier: 0.130.0 version: link:../../packages/modelfusion/dist zod: specifier: 3.22.4 diff --git a/test-environments/commonjs/package.json b/test-environments/commonjs/package.json index f605bccf..7f370cb4 100644 --- a/test-environments/commonjs/package.json +++ b/test-environments/commonjs/package.json @@ -6,7 +6,7 @@ "start": "node src/index.js" }, "dependencies": { - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "dotenv": "16.3.1" } } diff --git a/tools/google-custom-search-tool/package.json b/tools/google-custom-search-tool/package.json index 2bf8a902..c9ca47b0 100644 --- a/tools/google-custom-search-tool/package.json +++ b/tools/google-custom-search-tool/package.json @@ -55,7 +55,7 @@ "@typescript-eslint/parser": "^6.1.0", "eslint": "^8.45.0", "eslint-config-prettier": "9.1.0", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "zod": "3.22.4" }, "peerDependencies": { diff --git a/tools/mathjs-tool/package.json b/tools/mathjs-tool/package.json index 62e28afc..228c9efa 100644 --- a/tools/mathjs-tool/package.json +++ b/tools/mathjs-tool/package.json @@ -58,7 +58,7 @@ "@typescript-eslint/parser": "^6.1.0", "eslint": "^8.45.0", "eslint-config-prettier": "9.1.0", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "zod": "3.22.4" }, "peerDependencies": { diff --git a/tools/mediawiki-search-tool/package.json b/tools/mediawiki-search-tool/package.json index d347d402..be9eb72a 100644 --- a/tools/mediawiki-search-tool/package.json +++ b/tools/mediawiki-search-tool/package.json @@ -56,7 +56,7 @@ "@typescript-eslint/parser": "^6.1.0", "eslint": "^8.45.0", "eslint-config-prettier": "9.1.0", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "zod": "3.22.4" }, "peerDependencies": { diff --git a/tools/serpapi-tool/package.json b/tools/serpapi-tool/package.json index 6ebfc8d6..fb72c402 100644 --- a/tools/serpapi-tool/package.json +++ b/tools/serpapi-tool/package.json @@ -58,7 +58,7 @@ "@typescript-eslint/parser": "^6.1.0", "eslint": "^8.45.0", "eslint-config-prettier": "9.1.0", - "modelfusion": "0.129.1", + "modelfusion": "0.130.0", "zod": "3.22.4" }, "peerDependencies": {