🔍 Code Extractor

Browse Components

Showing 20 of 2098 components

  • class AnnotationInfo

    A dataclass that stores comprehensive information about a detected annotation in a PDF document, including its type, visual properties, location, and associated text content.

    File: /tf/active/vicechatdev/e-ink-llm/annotation_detector.py | Lines: 18-26

    dataclass annotation pdf metadata document-analysis
  • class RemarkableRestFileWatcher

    A file watcher class that monitors a specific folder on a reMarkable tablet using the REST API, polling for new files at regular intervals and triggering callbacks when new files are detected.

    File: /tf/active/vicechatdev/e-ink-llm/remarkable_rest_client.py | Lines: 778-872

    file-watcher polling async remarkable-tablet rest-api
  • class RemarkableRestClient

    Direct REST API client for reMarkable Cloud without external dependencies

    File: /tf/active/vicechatdev/e-ink-llm/remarkable_rest_client.py | Lines: 22-775

    class remarkablerestclient
  • function test_auto_continuation_workflow

    Comprehensive test function that validates the auto-continuation workflow for multi-turn conversations, including session detection from PDFs, conversation context preservation, and automatic conversation switching.

    File: /tf/active/vicechatdev/e-ink-llm/test_auto_continuation.py | Lines: 12-110

    testing async workflow session-management conversation-continuation
  • function demo_improvement_comparison

    A demonstration function that displays a before-and-after comparison of response formatting improvements, showing the evolution from verbose to compact, symbol-rich formatting optimized for e-ink displays.

    File: /tf/active/vicechatdev/e-ink-llm/test_improvements.py | Lines: 136-193

    demonstration comparison formatting e-ink console-output
  • function test_session_manager

    A comprehensive test function that validates the SessionManager class functionality including conversation creation, exchange tracking, filename generation, and context retrieval.

    File: /tf/active/vicechatdev/e-ink-llm/test_improvements.py | Lines: 63-134

    testing session-management database conversation-tracking unit-test
  • function test_compact_formatter

    A test function that demonstrates the CompactResponseFormatter's ability to compress verbose LLM responses by converting a lengthy mathematical explanation into a more compact format.

    File: /tf/active/vicechatdev/e-ink-llm/test_improvements.py | Lines: 13-61

    testing unit-test formatter compression text-processing
  • function demo_placeholder_parsing

    Demonstrates the parsing of graphics placeholders embedded in text by extracting and displaying placeholder metadata including type, description, ID, and parameters.

    File: /tf/active/vicechatdev/e-ink-llm/demo_hybrid_mode.py | Lines: 176-205

    demo testing placeholder-parsing graphics text-processing
  • function demo_hybrid_response

    Demonstrates end-to-end hybrid response processing by converting an LLM response containing text and graphics placeholders into a formatted PDF document.

    File: /tf/active/vicechatdev/e-ink-llm/demo_hybrid_mode.py | Lines: 97-174

    demo hybrid-response pdf-generation graphics-processing async
  • function demo_graphics_generation

    Demonstrates the generation of three types of graphics (bar chart, process diagram, and mathematical illustration) using the GraphicsGenerator class with e-ink optimized styling.

    File: /tf/active/vicechatdev/e-ink-llm/demo_hybrid_mode.py | Lines: 16-95

    demo graphics-generation async visualization chart
  • class InputProcessor

    A class that handles extraction and encoding of images from various input formats including PDFs (single or multi-page) and standard image files, converting them to base64-encoded strings with metadata.

    File: /tf/active/vicechatdev/e-ink-llm/input_processor.py | Lines: 13-151

    image-processing pdf-extraction base64-encoding document-processing multi-page
  • function process_single_file

    Asynchronously processes a single file (likely PDF) through an LLM pipeline, generating a response PDF with optional conversation continuity, multi-page support, and editing workflow capabilities.

    File: /tf/active/vicechatdev/e-ink-llm/processor.py | Lines: 458-493

    async file-processing pdf llm openai
  • class EInkLLMProcessor

    Main processor class that handles the complete workflow

    File: /tf/active/vicechatdev/e-ink-llm/processor.py | Lines: 61-455

    class einkllmprocessor
  • class EInkFileHandler

    A file system event handler that monitors a directory for new files and automatically processes them asynchronously when detected.

    File: /tf/active/vicechatdev/e-ink-llm/processor.py | Lines: 29-59

    file-system event-handler async file-monitoring watchdog
  • function load_onedrive_config

    Loads OneDrive configuration from a JSON file and returns it as a dictionary, with error handling for missing or invalid files.

    File: /tf/active/vicechatdev/e-ink-llm/main.py | Lines: 136-144

    configuration file-loading json onedrive cloud-storage
  • function load_remarkable_config

    Loads reMarkable tablet configuration from a JSON file, returning an empty dictionary if the file doesn't exist or cannot be loaded.

    File: /tf/active/vicechatdev/e-ink-llm/main.py | Lines: 126-134

    configuration file-loading json remarkable error-handling
  • function validate_api_key

    Validates the presence of an OpenAI API key by checking function parameters and environment variables, returning the key or exiting with an error message if not found.

    File: /tf/active/vicechatdev/e-ink-llm/main.py | Lines: 111-124

    validation api-key openai authentication environment-variables
  • function setup_environment

    Loads environment variables from a .env file located in the same directory as the script, if the file exists.

    File: /tf/active/vicechatdev/e-ink-llm/main.py | Lines: 104-109

    environment-variables configuration setup initialization dotenv
  • class HybridPromptEnhancer

    A utility class that enhances LLM prompts by adding instructions and formatting guidelines to encourage hybrid text+graphics responses with embedded graphic placeholders.

    File: /tf/active/vicechatdev/e-ink-llm/hybrid_response_handler.py | Lines: 204-300

    prompt-engineering llm graphics hybrid-output text-enhancement
  • class HybridResponseHandler

    Orchestrates the complete workflow for generating hybrid PDF documents that combine LLM text responses with dynamically generated graphics (charts, diagrams, illustrations).

    File: /tf/active/vicechatdev/e-ink-llm/hybrid_response_handler.py | Lines: 39-202

    pdf-generation hybrid-content graphics-generation async document-assembly