Next-Langchain-Tauri is a desktop application that combines the power of Next.js for frontend development, Langchain.js for AI processing, and Tauri for packaging the application as a desktop app.
Click the Key Setting
button to enter API keys, which are only stored in your computer, and then start to chat.
-
Ensure you have Node.js v20, npm, rust, and cargo installed on your system.
-
Installation
pnpm install
- use yao-pkg to pack the server into a single executable file and make it as a sidecar binary for Tauri, before packing you need to check your computer arch by running:
rustc -Vv | grep host | cut -f2 -d' '
then change the word server-aarch64-apple-darwin
to server-yours
in packages.json, for example server-x86_64-apple-darwin
save and run:
pnpm install -g @yao-pkg/pkg
pnpm pkg-server
-
Change 'next.config.mjs' to the part for tarui
-
Build
pnpm tauri build
This project was inspired by and incorporates code from the following repositories: