Documentation
¶
Overview ¶
Command rag shows bring-your-own retrieval: a trivial in-memory Retriever wired two ways. WithRetrieval is classic RAG (the top-k documents for the user's message are added, as a user message of JSON-quoted documents, to every model call of the run, and journaled so a resumed run sees the same ones); RetrievalTool is agentic RAG (the model decides when to search and with what query). Bide ships no vector store or embedder: you implement Retrieve against your own infrastructure. This example uses naive substring matching to stay offline-runnable.
OPENROUTER_API_KEY=sk-... go run ./examples/rag
Click to show internal directories.
Click to hide internal directories.