etrobot / next-langchain-tauri

Langchain desktop app @multi-Agent
https://aicube.fun
MIT License
17 stars 3 forks source link

Next-Langchain-Tauri

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.

image

How to use

Click the Key Setting button to enter API keys, which are only stored in your computer, and then start to chat.

Screenshot 2024-03-06 at 12 00 48 AM

Development

  1. Ensure you have Node.js v20, npm, rust, and cargo installed on your system.

  2. Installation

    pnpm install
  3. 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
  1. Change 'next.config.mjs' to the part for tarui

  2. Build

    pnpm tauri build

Credits

This project was inspired by and incorporates code from the following repositories: