diff --git a/CHANGELOG.md b/CHANGELOG.md index e656253e5..6183bc29f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## v0.125.0 - 2024-01-14 + +### Added + +- Perplexity AI chat completion support. Example: + + ```ts + import { openaicompatible, streamText } from "modelfusion"; + + const textStream = await streamText({ + model: openaicompatible + .ChatTextGenerator({ + api: openaicompatible.PerplexityApi(), + provider: "openaicompatible-perplexity", + model: "pplx-70b-online", // online model with access to web search + maxGenerationTokens: 500, + }) + .withTextPrompt(), + + prompt: "What is RAG in AI?", + }); + ``` + ## v0.124.0 - 2024-01-13 ### Added @@ -2022,3 +2045,7 @@ Since this change already affected all JSON generation calls and tools, I includ 1. Recursive Character Splitter: A feature to split text into characters recursively for more detailed text analysis. 1. Recursive Text Mapping: This enables recursive mapping of text, beneficial for tasks like summarization or extraction. 1. Split-Map-Filter-Reduce for Text Processing: A process chain developed for sophisticated text handling, allowing operations to split, map, filter, and reduce text data. + +``` + +``` diff --git a/examples/babyagi-agent/package.json b/examples/babyagi-agent/package.json index 5f108a226..0b86608cf 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.124.0", + "modelfusion": "0.125.0", "serpapi": "^2.0.0" }, "devDependencies": { diff --git a/examples/basic/package.json b/examples/basic/package.json index 0e4529e31..90a8da008 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.124.0", + "modelfusion": "0.125.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 8c86ad0c9..a15a6af17 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.11.16", "@mui/material": "5.12.2", - "modelfusion": "0.124.0", + "modelfusion": "0.125.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 39cef42db..a22713656 100644 --- a/examples/cloudflare-workers/package.json +++ b/examples/cloudflare-workers/package.json @@ -15,6 +15,6 @@ "wrangler": "^3.22.1" }, "dependencies": { - "modelfusion": "0.124.0" + "modelfusion": "0.125.0" } } diff --git a/examples/image-generator-next-js/package.json b/examples/image-generator-next-js/package.json index 5fe48c04d..a7d58b917 100644 --- a/examples/image-generator-next-js/package.json +++ b/examples/image-generator-next-js/package.json @@ -20,7 +20,7 @@ "dependencies": { "@emotion/react": "^11.11.0", "@emotion/styled": "^11.11.0", - "modelfusion": "0.124.0", + "modelfusion": "0.125.0", "next": "13.5.1", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/examples/middle-school-math-agent/package.json b/examples/middle-school-math-agent/package.json index 347841144..e1668a596 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.124.0", + "modelfusion": "0.125.0", "dotenv": "16.3.1", "zod": "3.22.4" }, diff --git a/examples/pdf-chat-terminal/package.json b/examples/pdf-chat-terminal/package.json index 2e6bd5b32..12560107f 100644 --- a/examples/pdf-chat-terminal/package.json +++ b/examples/pdf-chat-terminal/package.json @@ -9,7 +9,7 @@ }, "private": true, "dependencies": { - "modelfusion": "0.124.0", + "modelfusion": "0.125.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 443eb6c0e..73ba033c4 100644 --- a/examples/pdf-to-tweet/package.json +++ b/examples/pdf-to-tweet/package.json @@ -9,7 +9,7 @@ }, "private": true, "dependencies": { - "modelfusion": "0.124.0", + "modelfusion": "0.125.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 3da99d6db..3a836f053 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.124.0", + "modelfusion": "0.125.0", "modelfusion-experimental": "0.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/voice-recording-next-js/package.json b/examples/voice-recording-next-js/package.json index 0627083bb..6417dfb18 100644 --- a/examples/voice-recording-next-js/package.json +++ b/examples/voice-recording-next-js/package.json @@ -18,7 +18,7 @@ "@emotion/styled": "11.10.8", "@mui/icons-material": "5.11.16", "@mui/material": "5.12.2", - "modelfusion": "0.124.0", + "modelfusion": "0.125.0", "modelfusion-experimental": "0.5.0", "formidable": "2.1.1", "next": "13.5.1", diff --git a/examples/wikipedia-agent/package.json b/examples/wikipedia-agent/package.json index 64224ed52..a5ffeeca1 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.124.0", + "modelfusion": "0.125.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 a82d57233..3aec35bdd 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.124.0" + "modelfusion": "0.125.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 3526481c0..ac71346fb 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.124.0", + "modelfusion": "0.125.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 1494bc33b..13dabdb24 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.124.0" + "modelfusion": "0.125.0" }, "peerDependencies": { "modelfusion": ">=0.89.0", diff --git a/packages/modelfusion-experimental/package.json b/packages/modelfusion-experimental/package.json index d6b70495d..29ec339a2 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.124.0" + "modelfusion": "0.125.0" } } diff --git a/packages/modelfusion/package.json b/packages/modelfusion/package.json index 50964ee42..653265a56 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.124.0", + "version": "0.125.0", "author": "Lars Grammel", "license": "MIT", "keywords": [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 273258212..8313c2a9c 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.124.0 + specifier: 0.125.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.124.0 + specifier: 0.125.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.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -229,7 +229,7 @@ importers: examples/cloudflare-workers: dependencies: modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist devDependencies: '@cloudflare/workers-types': @@ -251,7 +251,7 @@ importers: specifier: ^11.11.0 version: 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.15)(react@18.2.0) modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist next: specifier: 13.5.1 @@ -291,7 +291,7 @@ importers: specifier: 16.3.1 version: 16.3.1 modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist zod: specifier: 3.22.4 @@ -310,7 +310,7 @@ importers: specifier: 16.3.1 version: 16.3.1 modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist pdfjs-dist: specifier: 3.6.172 @@ -329,7 +329,7 @@ importers: specifier: 16.3.1 version: 16.3.1 modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -369,7 +369,7 @@ importers: specifier: ^4.23.2 version: 4.25.1 modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -448,7 +448,7 @@ importers: specifier: 2.1.1 version: 2.1.1 modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -494,7 +494,7 @@ importers: specifier: ^22.1.0 version: 22.1.0 modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist modelfusion-experimental: specifier: 0.5.0 @@ -534,7 +534,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../modelfusion/dist publishDirectory: dist @@ -562,7 +562,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../modelfusion/dist sqlite-vss: specifier: ^0.1.2 @@ -593,7 +593,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../modelfusion/dist publishDirectory: dist @@ -675,7 +675,7 @@ importers: specifier: ^4.0.0 version: 4.25.1 modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../modelfusion/dist publishDirectory: dist @@ -685,7 +685,7 @@ importers: specifier: 16.3.1 version: 16.3.1 modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist test-environments/esm: @@ -715,7 +715,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist zod: specifier: 3.22.4 @@ -744,7 +744,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist zod: specifier: 3.22.4 @@ -769,7 +769,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.124.0 + specifier: 0.125.0 version: link:../../packages/modelfusion/dist zod: specifier: 3.22.4 @@ -798,7 +798,7 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@8.56.0) modelfusion: - specifier: 0.124.0 + specifier: 0.125.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 8dec808c9..b618ec727 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.124.0", + "modelfusion": "0.125.0", "dotenv": "16.3.1" } } diff --git a/tools/google-custom-search-tool/package.json b/tools/google-custom-search-tool/package.json index 84c69ea29..cac78f2f8 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.124.0", + "modelfusion": "0.125.0", "zod": "3.22.4" }, "peerDependencies": { diff --git a/tools/mathjs-tool/package.json b/tools/mathjs-tool/package.json index a17fba028..426a30037 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.124.0", + "modelfusion": "0.125.0", "zod": "3.22.4" }, "peerDependencies": { diff --git a/tools/mediawiki-search-tool/package.json b/tools/mediawiki-search-tool/package.json index a905e842a..c58cc80ab 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.124.0", + "modelfusion": "0.125.0", "zod": "3.22.4" }, "peerDependencies": { diff --git a/tools/serpapi-tool/package.json b/tools/serpapi-tool/package.json index b008af9b5..9d9fb4102 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.124.0", + "modelfusion": "0.125.0", "zod": "3.22.4" }, "peerDependencies": {