Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MobilaName/local-rag-mcp
/ functions
Functions
26 in github.com/MobilaName/local-rag-mcp
⨍
Functions
26
◇
Types & classes
2
↓ 3 callers
Function
build_index
Build FAISS index from documents.
src/rag/build_index.py:14
↓ 2 callers
Function
_ensure_index_exists
Ensure FAISS index exists, build it if it doesn't.
src/rag/query.py:26
↓ 2 callers
Method
_send
Send JSON-RPC message and receive response.
src/mcp/client.py:23
↓ 2 callers
Function
ask_llm
Query Ollama LLM.
src/rag/query.py:128
↓ 2 callers
Function
build_prompt
Build prompt with retrieved context.
src/rag/query.py:93
↓ 2 callers
Function
chunk_documents
Chunk all documents into smaller pieces.
src/rag/chunk.py:25
↓ 2 callers
Method
close
Clean up resources.
src/assistant.py:161
↓ 2 callers
Function
embed_chunks
Generate embeddings for all chunks.
src/rag/embed.py:13
↓ 2 callers
Function
ingest_documents
Ingest all documents from the documents directory.
src/rag/ingest.py:30
↓ 2 callers
Method
query
Answer a question using RAG and optionally MCP tools.
src/assistant.py:120
↓ 2 callers
Function
retrieve
Retrieve relevant chunks for a query.
src/rag/query.py:76
↓ 1 callers
Method
_call_mcp_tool
Call an MCP tool with given name and arguments.
src/assistant.py:109
↓ 1 callers
Method
_init_mcp
Initialize MCP client.
src/assistant.py:22
↓ 1 callers
Method
_llm_decide_mcp_usage
Ask LLM if MCP tools are needed based on query and retrieved contexts.
src/assistant.py:35
↓ 1 callers
Function
ask
Answer a question using RAG.
src/rag/query.py:141
↓ 1 callers
Method
call_tool
Call an MCP tool.
src/mcp/client.py:51
↓ 1 callers
Function
chunk_text
Split text into chunks with overlap.
src/rag/chunk.py:12
↓ 1 callers
Method
initialize
Initialize MCP connection.
src/mcp/client.py:35
↓ 1 callers
Function
load_document
Load document content based on file type.
src/rag/ingest.py:14
↓ 1 callers
Function
main
Main entry point for the assistant.
src/main.py:9
Method
__init__
(self)
src/assistant.py:17
Method
__init__
(self, cmd)
src/mcp/client.py:9
Method
close
Close the MCP connection.
src/mcp/client.py:66
Function
list_documents
Lists all available documents in the knowledge base.
src/mcp/server.py:30
Function
read_document
Reads a document from the knowledge base.
src/mcp/server.py:13
Function
search_documents
Searches for documents by name (case-insensitive).
src/mcp/server.py:51