Select Page
Flowise vs. 其他 AI 代理工具:哪個更適合您的需求?

Flowise vs. 其他 AI 代理工具:哪個更適合您的需求?

Flowise 是一款開源的低代碼工具,一般人也可以輕易地使用,用於構建自定義的大語言模型(LLM)編排流程和 AI 代理。透過直觀的拖放介面,使用者可以輕鬆設計複雜的 AI 工作流程,無需深入的程式設計知識。

Flowise 的主要特點:

  • 開源且免費:Flowise 完全開源,使用者可自由使用並進行二次開發,無需擔心授權問題。 GitHub
  • 低代碼開發:透過簡單的拖放介面,使用者可以快速構建 LLM 應用,縮短開發週期。 Flowise AI Docs
  • 多代理支援:Flowise 提供多代理系統,允許使用者設計可與外部工具和資料來源互動的代理,實現更高效的任務處理。 Flowise AI Docs
  • 靈活的工作流程設計:使用者可以根據需求,自定義工作流程的邏輯和順序,滿足不同場景的應用需求。 

Flowise 與其他 AI 代理工具的差異:

  1. Langflow 的比較:Langflow 專注於自然語言處理,提供可視化介面來構建和調試語言處理流程。相比之下,Flowise 更強調 LLM 的編排和代理的靈活性,適用範圍更廣。 
  2. Dify 的比較:Dify 致力於簡化 AI 應用的部署,提供一站式解決方案。而 Flowise 更專注於工作流程的設計和代理的構建,提供更大的自定義空間。 
  3. 與其他工具的比較:Flowise 的開源性和低代碼特性,使其在靈活性和可擴展性方面具有優勢,適合需要快速迭代和自定義需求的開發者。 

參考資料

手把手教學安裝 anything-llm (不使用 docker)

手把手教學安裝 anything-llm (不使用 docker)

AnythingLLM是一款全功能的應用程序,支持使用商業或開源的大語言模型(LLM)和向量數據庫建構私有ChatGPT。用戶可以在本地或遠端運行該系統,並利用已有文檔進行智能對話。此應用將文檔分類至稱為工作區的容器中,確保不同工作區間的資料隔離,保持清晰的上下文管理。

特點:多用戶支持、權限管理、內置智能代理(可執行網頁瀏覽、代碼運行等功能)、可嵌入到網站的聊天窗口、多種文檔格式支持、向量數據庫的簡易管理界面、聊天和查詢兩種對話模式、引用文檔內容的展示,以及完善的API支持客戶端定制整合。此外,該系統支持100%雲端部署,Docker部署,且在處理超大文檔時效率高,成本低。

安裝 Anything llm

注意,以下要用 linux 平台安裝,windows 用戶可以用 WSL,推薦用 Ubuntu OS

在自己的 home 目錄下,到 GitHub 中下載原始碼

git clone https://github.com/Mintplex-Labs/anything-llm.git

利用 yarn 作設定資源

cd anything-llm
yarn setup

把環境變數建立起來,後端主機是 NodeJS express

cp server/.env.example server/.env
nano server/.env

密文需要最少12位的字元,檔案的存放路徑也記得改成自己的

JWT_SECRET="my-random-string-for-seeding"
STORAGE_DIR="/your/absolute/path/to/server/storage"

前端的環境變數,先把/api打開即可

# VITE_API_BASE='http://localhost:3001/api' # Use this URL when developing locally
# VITE_API_BASE="https://$CODESPACE_NAME-3001.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN/api" # for Github Codespaces
VITE_API_BASE='/api' # Use this URL deploying on non-localhost address OR in docker.

如果你在設定的時候,遇到更新請求,可以跟我著我下面的方法作

把 prisma 更新好

yarn add --dev prisma@latest
yarn add @prisma/client@latest

前端的程式碼

先編譯前端程式碼,前端是由 viteJS + React

cd frontend && yarn build

將編譯好的資料放到 server 的目錄下

cp -R frontend/dist/* server/public/

選項,如果需要用到本地端的 LLM 模型,就把 llama-cpp 下載下來

cd server && npx --no node-llama-cpp download

把資料庫建立好

cd server && npx prisma generate --schema=./prisma/schema.prisma
cd server && npx prisma migrate deploy --schema=./prisma/schema.prisma

Server端是用來處理 api 以及進行向量資料庫的管理以及跟 LLM 交互

Collector 是一個 NodeJS express server,用來作UI處理和解析文檔

cd server && NODE_ENV=production node index.js &
cd collector && NODE_ENV=production node index.js &

更新的指令碼

現在 anything llm 更新速度超快,把這一段指令碼複製起來,方便未來作更新的動作

#!/bin/bash

cd $HOME/anything-llm &&\
git checkout . &&\
git pull origin master &&\
echo "HEAD pulled to commit $(git log -1 --pretty=format:"%h" | tail -n 1)"

echo "Freezing current ENVs"
curl -I "http://localhost:3001/api/env-dump" | head -n 1|cut -d$' ' -f2

echo "Rebuilding Frontend"
cd $HOME/anything-llm/frontend && yarn && yarn build && cd $HOME/anything-llm

echo "Copying to Sever Public"
rm -rf server/public
cp -r frontend/dist server/public

echo "Killing node processes"
pkill node

echo "Installing collector dependencies"
cd $HOME/anything-llm/collector && yarn

echo "Installing server dependencies & running migrations"
cd $HOME/anything-llm/server && yarn
cd $HOME/anything-llm/server && npx prisma migrate deploy --schema=./prisma/schema.prisma
cd $HOME/anything-llm/server && npx prisma generate

echo "Booting up services."
truncate -s 0 /logs/server.log # Or any other log file location.
truncate -s 0 /logs/collector.log

cd $HOME/anything-llm/server
(NODE_ENV=production node index.js) &> /logs/server.log &

cd $HOME/anything-llm/collector
(NODE_ENV=production node index.js) &> /logs/collector.log &