MCPcopy Create free account

hub / github.com/TAMustafa/Local_Chat_RAG / functions

Functions46 in github.com/TAMustafa/Local_Chat_RAG

↓ 10 callersFunctionsafe_log_gotcha
Log a gotcha, error, or operational event to gotchas.md in the project root. Appends timestamped entries for traceability and compliance.
backend/app/log_utils.py:5
↓ 1 callersFunctionHeader
()
frontend/src/components/Layout/Header.tsx:5
↓ 1 callersMethod_get_text_splitter
Use MarkdownHeaderTextSplitter if markdown, else fallback to RecursiveCharacterTextSplitter.
backend/app/rag/pipeline.py:31
↓ 1 callersFunctionchat_service
Handles chat logic: retrieves relevant docs (hybrid/vector/keyword/MMR), constructs prompt, calls LLM, logs history.
backend/app/services/chat_service.py:9
↓ 1 callersFunctionclear_all_service
Danger: Delete ALL files and chat history from DB and vectorstore. Requires admin-token.
backend/app/services/admin_service.py:8
↓ 1 callersFunctiondeleteFile
(fileId: number)
frontend/src/api/filesApi.ts:25
↓ 1 callersFunctionfetchFiles
()
frontend/src/api/filesApi.ts:16
↓ 1 callersFunctionfetchHealth
()
frontend/src/api/healthApi.ts:2
↓ 1 callersFunctiongetFileExt
(filename?: string)
frontend/src/components/Files/components/FilePill.tsx:6
↓ 1 callersFunctionget_db
()
backend/app/db/session.py:30
↓ 1 callersFunctionhandleSend
()
frontend/src/components/Chat/components/ChatInput.tsx:18
↓ 1 callersMethodingest
Ingests a file using adaptive chunking (header-based for markdown, otherwise character-based).
backend/app/rag/pipeline.py:61
↓ 1 callersFunctioninit_db
()
backend/app/db/session.py:14
↓ 1 callersFunctionloadFiles
()
frontend/src/components/Files/components/FilesSidebar.tsx:20
↓ 1 callersMethodload_document
(self, file_path: str)
backend/app/rag/pipeline.py:44
↓ 1 callersMethodretrieve
Hybrid retrieval: combines vector search, keyword, and metadata filtering. Always uses strict top-k retrieval (no MMR). :param query:
backend/app/rag/pipeline.py:77
↓ 1 callersFunctionsendChat
( optsOrFileId: ChatOptions | string | null, question?: string )
frontend/src/api/chatApi.ts:11
↓ 1 callersFunctionuploadFile
(file: File)
frontend/src/api/filesApi.ts:3
↓ 1 callersFunctionuseFileUpload
()
frontend/src/components/Files/hooks/useFileUpload.ts:9
FunctionAdminPanel
()
frontend/src/components/Admin/AdminPanel.tsx:7
FunctionApp
()
frontend/src/App.tsx:6
FunctionChatArea
()
frontend/src/components/Chat/components/ChatArea.tsx:9
FunctionChatBubble
({ message }: { message: ChatMessage })
frontend/src/components/Chat/components/ChatBubble.tsx:18
FunctionChatInput
()
frontend/src/components/Chat/components/ChatInput.tsx:8
FunctionFileErrorAlert
({ error })
frontend/src/components/Files/components/FileErrorAlert.tsx:8
FunctionFilePill
({ file, onDelete, deleting }: FilePillProps)
frontend/src/components/Files/components/FilePill.tsx:18
FunctionFileUpload
()
frontend/src/components/Files/components/FileUpload.tsx:7
FunctionFilesList
({ files, loading, deletingId, onDelete })
frontend/src/components/Files/components/FilesList.tsx:13
FunctionFilesSidebar
()
frontend/src/components/Files/components/FilesSidebar.tsx:9
FunctionLLMStatus
()
frontend/src/components/Layout/LLMStatus.tsx:4
FunctionMainLayout
()
frontend/src/components/Layout/MainLayout.tsx:7
Method__init__
:param vector_db_path: Path for ChromaDB persistence :param chunking_strategy: 'auto', 'header', or 'character'. If 'auto', use heade
backend/app/rag/pipeline.py:19
Functionchat
Chat endpoint: supports hybrid retrieval (keywords, metadata, MMR, k). Accepts ChatRequest body or legacy query params.
backend/app/main.py:190
Functionclear_all
Danger: Delete ALL files and chat history from DB and vectorstore. Delegates business logic to admin_service. Validates admin token length (8
backend/app/main.py:51
Functiondelete_file
Delete a file: removes from DB and disk, attempts vectorstore cleanup. Delegates business logic to file_service for DB/disk, keeps vectorstore lo
backend/app/main.py:156
Functiondelete_file
(file_id: int, db: Session = Depends())
backend/app/services/file_service.py:37
Functiongeneric_exception_handler
(request: Request, exc: Exception)
backend/app/error_handlers.py:22
FunctionhandleClearAll
()
frontend/src/components/Admin/AdminPanel.tsx:13
FunctionhandleDelete
(id: number)
frontend/src/components/Files/components/FilesSidebar.tsx:36
Functionhealth_check
Health check endpoint: verifies DB, vectorstore, and LLM health.
backend/app/main.py:68
Functionhttp_exception_handler
(request: Request, exc: HTTPException)
backend/app/error_handlers.py:9
Functionlist_files
List all files in the database. Delegates business logic to file_service.
backend/app/main.py:139
Functionlist_files
(db: Session = Depends())
backend/app/services/file_service.py:33
Functionsqlalchemy_exception_handler
(request: Request, exc: SQLAlchemyError)
backend/app/error_handlers.py:15
Functionupload_file
Upload a file and ingest into the RAG pipeline. Delegates business logic to file_service. Validates file extension against SUPPORTED_EXTENSIO
backend/app/main.py:116
Functionupload_file
(file: UploadFile = File(...), db: Session = Depends())
backend/app/services/file_service.py:14