🔍 Code Extractor

Browse Components

Showing 20 of 987 components

  • class QueryBasedExtractor

    A class that extracts relevant information from documents using a small LLM (Language Model), designed for Extensive and Full Reading modes in RAG systems.

    File: /tf/active/vicechatdev/docchat/rag_engine.py | Lines: 92-327

    information-extraction document-processing llm rag query-based
  • function matches_source_filter

    Checks if a document path matches any of the provided source filters using exact match, folder prefix match, path component sequence match, or filename match.

    File: /tf/active/vicechatdev/docchat/rag_engine.py | Lines: 31-89

    path-matching file-filtering document-filtering path-normalization string-matching
  • function check_configuration

    A comprehensive configuration verification function that checks and displays the status of all DocChat system settings, including API keys, models, ChromaDB connection, directories, and LLM initialization.

    File: /tf/active/vicechatdev/docchat/verify_setup.py | Lines: 13-141

    configuration verification diagnostics setup validation
  • function export_to_word

    Flask route handler that exports a chat conversation to a formatted Microsoft Word (.docx) document with styled headings, timestamps, and references.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1758-1834

    export word-document docx chat-history conversation-export
  • function list_custom_instructions

    Flask API endpoint that retrieves and returns a list of all custom instruction markdown files stored in the 'instructions' directory.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1740-1753

    flask api rest-api file-listing directory-scanning
  • function load_custom_instructions

    Flask API endpoint that loads and returns the content of custom instruction files from a designated instructions directory with security validation.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1716-1736

    flask api-endpoint file-loading security path-traversal-prevention
  • function save_custom_instructions

    Flask API endpoint that saves custom instructions to a markdown file in a designated instructions directory with filename sanitization.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1684-1712

    flask api-endpoint file-operations rest-api file-saving
  • function get_instruction_templates

    Flask API endpoint that returns a dictionary of predefined instruction templates for different document types including SOPs, work instructions, quality forms, and document comparison guidelines.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1530-1680

    flask api endpoint templates instructions
  • function internal_error

    Flask error handler that catches internal server errors (HTTP 500), logs them, and returns a standardized JSON error response.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1524-1526

    flask error-handler http-500 exception-handling logging
  • function view_document

    Flask route handler that serves documents for in-browser viewing by accepting a file path as a query parameter, validating security constraints, and returning the file with appropriate MIME types and CORS headers.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1426-1504

    flask file-serving document-viewer security path-validation
  • function api_index_progress

    Flask API endpoint that retrieves the current progress status of an asynchronous indexing task by its task ID.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1404-1422

    flask api rest-endpoint progress-tracking async-task
  • function api_index_folder

    Flask API endpoint that initiates a background task to index documents in a specified folder, tracking progress and returning a task ID for status monitoring.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1301-1400

    flask api endpoint background-task document-indexing
  • function api_clear_history

    Flask API endpoint that clears the chat history for the current user session by removing stored conversation data associated with the session ID.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1286-1297

    flask api endpoint chat history
  • function api_documents

    Flask API endpoint that retrieves statistics and metadata about indexed documents from a document indexer service.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1270-1281

    flask api rest-endpoint document-management statistics
  • function api_upload

    Flask API endpoint that handles file uploads, validates file types, saves files to a configured directory structure, and automatically indexes the uploaded document for search/retrieval.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1198-1266

    file-upload api-endpoint document-management rag indexing
  • function api_folders

    Flask API endpoint that returns a hierarchical JSON tree structure of all folders (excluding files) within the configured document folder, used for folder selection in upload interfaces.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1153-1193

    flask api endpoint folder-tree directory-structure
  • function api_document_tree

    Flask API endpoint that returns a hierarchical document tree structure from a configured document folder, supporting lazy loading and full expansion modes for efficient navigation and search.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1105-1149

    flask api rest-endpoint document-management tree-structure
  • function api_chat_status

    Flask API endpoint that retrieves the detailed status of a chat task by delegating to the api_task_status function using the provided task_id.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1099-1101

    flask api endpoint chat status
  • function api_task_status

    Flask API endpoint that retrieves and returns the status of asynchronous tasks (chat or indexing operations) by task ID.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1076-1095

    api flask rest-endpoint task-status async-polling
  • function process_full_reading_background

    Asynchronous background task processor that executes a full reading mode RAG (Retrieval-Augmented Generation) query, tracks progress, and stores results in session history.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1038-1072

    background-task async-processing rag full-reading-mode chat