🔍 Code Extractor

Browse Components

Showing 20 of 451 components

  • 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 not_found

    Flask error handler that returns a JSON response with a 404 status code when a requested resource is not found.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1519-1520

    flask error-handler http-404 json-response web-api
  • function health

    Flask route handler that provides a health check endpoint returning the operational status of the application and its core components (RAG engine and document indexer).

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 1508-1515

    health-check monitoring diagnostics flask rest-api
  • 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
  • function api_chat

    Flask API endpoint that handles chat requests asynchronously, processing user queries through a RAG (Retrieval-Augmented Generation) engine with support for multiple modes, memory, web search, and custom configurations.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 962-1035

    flask api chat async rag
  • function get_session_history

    Flask API endpoint that retrieves the chat message history for the current user's session.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 950-957

    flask api rest-endpoint session-management chat-history
  • function save_session_settings

    Flask API endpoint that saves user-provided settings for the current session by retrieving the session ID from Flask's session object and updating the session settings in the backend.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 937-945

    flask api-endpoint session-management settings configuration
  • function get_session_settings

    Flask API endpoint that retrieves saved settings for the current user's session from the session store.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 926-933

    flask api session-management settings rest-api
  • function api_update_system_config

    Flask API endpoint that allows administrators to update system configuration settings including system role, expertise, domain context, custom instructions, output style, and query languages, with persistence to disk.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 860-921

    admin configuration system-settings api-endpoint flask
  • function api_get_system_config

    Flask API endpoint that retrieves current system configuration settings for admin users only, returning configuration values like system role, expertise, domain context, and supported languages.

    File: /tf/active/vicechatdev/docchat/app.py | Lines: 840-855

    flask api admin configuration system-settings