Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI Copilot Doc — RAG for FastAPI Documentation

1. Project Description

FastAPI Copilot Doc is an offline Retrieval-Augmented Generation (RAG) system that indexes FastAPI markdown documentation and answers developer questions by grounding responses in the indexed docs.

2. Project features

3. LangChain concepts used

4. Steps to run this project locally

Prerequisites

Install & run (using uv package manager as provided)

  1. Install dependencies:
uv install
  1. Index the docs (creates / updates ./faiss_index):
uv run python -m src.indexing

This runs src.indexing.initiate_indexing_process which loads markdown files and calls src.indexing.vector_store.

  1. Run the interactive QA bot:
uv run python -m src.rag

Notes:

  • If you prefer not to use uv, you can use your system python (e.g., python -m src.indexing).
  • Ensure environment variables for your LLM provider are set in .env before running the agent.

5. LangSmith compatibility

  • The project uses LangChain agents and middleware (src.agent, src.middleware), so it is straightforward to plug into LangSmith for monitoring and run management.
  • To use LangSmith:
    • Configure a LangSmith-compatible LLM or client in src.agent.agent.
    • Set LANGSMITH_API_KEY (and other LangSmith settings) in .env.
    • Optionally route agent run logs / traces to LangSmith for inspection and debugging.
  • Because the project splits retrieval (src.vector_store) and agent logic (src.agent + src.middleware), swapping to a LangSmith-orchestrated workflow is localized and minimal.

Files of interest:

About

Copilot Agent for FastAPI Docs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages