🔍 Code Extractor

Browse Components

Showing 20 of 491 components

  • function setup_test_logging

    Configures Python logging with both console and file output for test execution, returning a logger instance for the calling module.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_local_document.py | Lines: 22-32

    logging testing configuration setup file-output
  • function test_extraction_methods

    A test function that compares two PDF text extraction methods (regular llmsherpa and OCR-based Tesseract) on a specific purchase order document from FileCloud, checking for vendor name detection.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_extraction_methods.py | Lines: 14-134

    testing pdf-extraction ocr document-processing text-extraction
  • function test_document_processor

    A test function that validates the DocumentProcessor component's ability to extract text from PDF files with improved error handling and llmsherpa integration.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_improved_processor.py | Lines: 16-67

    testing document-processing pdf-extraction text-extraction integration-test
  • function validate_azure_token

    Validates an Azure AD token by parsing the JWT id_token and extracting user information such as user ID, email, name, and preferred username.

    File: /tf/active/vicechatdev/docchat/auth/azure_auth.py | Lines: 168-231

    azure authentication jwt token-validation oauth
  • function setup_azure_sso

    Initializes and configures an Azure SSO (Single Sign-On) instance by loading credentials and settings from a configuration module.

    File: /tf/active/vicechatdev/docchat/auth/azure_auth.py | Lines: 121-166

    azure sso authentication oauth azure-ad
  • class AzureSSO

    A class that handles Azure Active Directory (Azure AD) Single Sign-On (SSO) authentication using OAuth 2.0 authorization code flow.

    File: /tf/active/vicechatdev/docchat/auth/azure_auth.py | Lines: 18-119

    azure authentication sso oauth2 azure-ad
  • class GPT5Validator

    A comprehensive testing and validation class for OpenAI GPT models, with special support for GPT-5 family models using the Responses API.

    File: /tf/active/vicechatdev/docchat/test_gpt5_readiness.py | Lines: 32-255

    testing validation openai gpt-5 api-testing
  • function integrate_docchat

    One-line integration function that configures and registers the DocChat component into a Flask application, handling dependency checking, configuration, and blueprint registration.

    File: /tf/active/vicechatdev/docchat/integration.py | Lines: 187-229

    flask integration setup configuration blueprint
  • function get_integration_status

    Retrieves the integration status of the DocChat blueprint within a Flask application, including registration status, configuration details, and dependency checks.

    File: /tf/active/vicechatdev/docchat/integration.py | Lines: 156-183

    flask blueprint integration status-check diagnostics
  • function configure_docchat

    Configures DocChat module settings by overriding default configuration values from a Flask application instance and optional keyword arguments.

    File: /tf/active/vicechatdev/docchat/integration.py | Lines: 108-153

    configuration flask setup chromadb openai
  • function check_dependencies

    Validates the installation status of all required Python packages for the DocChat application by attempting to import each dependency and logging the results.

    File: /tf/active/vicechatdev/docchat/integration.py | Lines: 62-105

    dependency-check validation installation package-management flask
  • function register_docchat

    Registers a DocChat Flask blueprint with a Flask application instance, handling path configuration and error logging.

    File: /tf/active/vicechatdev/docchat/integration.py | Lines: 22-59

    flask blueprint registration web-framework initialization
  • function get_llm_instance

    Factory function that creates and returns an appropriate LLM (Large Language Model) instance based on the specified model name, automatically detecting the provider (OpenAI, Azure OpenAI, or Anthropic) and configuring it with the given parameters.

    File: /tf/active/vicechatdev/docchat/llm_factory.py | Lines: 171-208

    llm factory-pattern openai azure anthropic
  • class AzureOpenAIChatLLM

    Adapter class for interacting with Azure OpenAI's Chat Completions API, providing a simplified interface for generating chat responses using Azure-hosted OpenAI models.

    File: /tf/active/vicechatdev/docchat/llm_factory.py | Lines: 111-168

    azure openai chat llm api-adapter
  • class OpenAIChatLLM

    Adapter class for interacting with OpenAI's Chat Completions API, supporting both GPT-4 and GPT-5 model families with automatic parameter adjustment based on model type.

    File: /tf/active/vicechatdev/docchat/llm_factory.py | Lines: 75-108

    openai llm chat-completion gpt-4 gpt-5
  • class OpenAIResponsesLLM

    Adapter class for OpenAI's Responses API, specifically designed for GPT-5 family models with automatic fallback mechanisms to stable models when responses fail.

    File: /tf/active/vicechatdev/docchat/llm_factory.py | Lines: 22-72

    openai llm gpt-5 responses-api adapter
  • class LLMMessage

    A simple dataclass that represents a message for Large Language Model (LLM) interactions, containing only the message content as a string.

    File: /tf/active/vicechatdev/docchat/llm_factory.py | Lines: 18-19

    dataclass message llm data-container language-model
  • function test_incremental_indexing

    Comprehensive test function that validates incremental indexing functionality of a document indexing system, including initial indexing, change detection, re-indexing, and force re-indexing scenarios.

    File: /tf/active/vicechatdev/docchat/test_incremental_indexing.py | Lines: 32-207

    testing incremental-indexing document-indexing integration-test file-system
  • function modify_test_document

    Modifies the content of a test document file by writing new content to it, with a built-in delay to ensure the file's modification time changes.

    File: /tf/active/vicechatdev/docchat/test_incremental_indexing.py | Lines: 25-29

    testing file-operations file-modification test-utilities mtime
  • function create_test_document

    Creates a text file at the specified path with the given content, primarily used for testing purposes.

    File: /tf/active/vicechatdev/docchat/test_incremental_indexing.py | Lines: 20-22

    testing file-creation test-utilities file-io document-creation