有关如何在 RAG 期间通过服务器发送事件将中间 LlamaIndex 事件正确发送给 Vercel ai SDK 的教程。
有关如何在 RAG 期间通过服务器发送事件将中间 LlamaIndex 事件正确发送给 Vercel ai SDK 的教程。
In this tutorial, we'll see how to use LlamaIndex Instrumentation module to send intermediate steps in a RAG pipeline to the frontend for an intuitive user experience.
Full video tutorial under 3 minutes We use Server-Sent Events which will be recieved by Vercel AI SDK on the frontend.
First clone the repo:
git clone https://github.com/rsrohan99/rag-stream-intermediate-events-tutorial.git
cd rag-stream-intermediate-events-tutorialcd into the backend directory
cd backend.env from .env.examplecp .env.example .envOPENAI_API_KEY=****poetry installpoetry run python app/engine/generate.pypoetry run python main.pycd into the frontend directory
cd frontend.env from .env.examplecp .env.example .envnpm inpm run dev暂无开放 Issues,或尚未同步最近议题。