-
Notifications
You must be signed in to change notification settings - Fork 59
CLI, 100% TS, fixed various issues and added new models #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
krizic
wants to merge
4
commits into
DocumindHQ:main
Choose a base branch
from
krizic:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added TS support
Adds a command-line interface for document processing and structured data extraction. Includes commands for extracting data, converting documents to markdown or plaintext, and listing available templates. Also sets up new CLI options for using local LLMs and adds associated documentation. These changes streamline the extraction and conversion processes and makes Documind functionality accessible from the command line.
Extends file validation to check local file paths, verifying both extension and existence. This change allows the application to process files directly from the file system, in addition to URLs.
Introduces options to control image quality, max width, and OCR language for document processing, enhancing performance and accuracy, allowing to reduce image size for LLM vision. Updates core library to optimize image conversion with lower DPI and JPG format for better compression. Extends CLI with options for image quality, max width, and OCR language. Adds new local models for extraction
PR Description updated to latest commit (141fe50) |
PR Overview: CLI, TypeScript Migration, and Enhanced Document ProcessingCore Changes1. TypeScript Migration & Type Safety
2. New CLI Implementation
3. Enhanced Image Processing & OCR
4. Architectural Improvements
Technical SpecificationsNew CLI Features# Extraction with auto-schema
documind extract -f invoice.pdf --auto-schema
# Custom schema extraction
documind extract -f doc.pdf -s schema.json -o output.json
# Local LLM integration
documind extract -f doc.pdf -m llama3.2-vision --base-url http://localhost:11434/v1 Enhanced Configuration Options
Type Systeminterface SchemaField {
name: string;
type: 'string' | 'number' | 'boolean' | 'enum' | 'object' | 'array';
description?: string;
values?: string[];
children?: SchemaField[];
} Key Benefits
Integration Points
This PR represents a significant maturity step for the codebase, transitioning from a library-focused approach to a comprehensive toolchain with enterprise-grade features and developer tooling. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Type
Enhancement, Documentation
Description
Added comprehensive CLI tool for document processing
Converted JavaScript codebase to TypeScript with type definitions
Enhanced image optimization with OCR language support
Improved local file validation and processing capabilities
Changes walkthrough 📝
42 files
Converted to TypeScript with improved formatting
Refactored with TypeScript and better error handling
Added TypeScript types and image optimization parameters
Enhanced enum validation and TypeScript conversion
Improved PDF validation and TypeScript support
Refactored with TypeScript and better error handling
Converted to TypeScript with better type safety
Added new local models and TypeScript types
Code formatting and TypeScript conversion
Code formatting and TypeScript conversion
Added local file path validation support
New CLI command for document extraction
Added OCR language support and image optimization
New TypeScript extract service with enhanced options
TypeScript implementation of schema generation
TypeScript schema validation with proper types
TypeScript implementation with proper type definitions
TypeScript formatter service with improved error handling
TypeScript Google extractor with proper typing
TypeScript templates service with SchemaField types
TypeScript extractors index with new model support
Added new local models and configuration options
TypeScript Ollama extractor implementation
TypeScript OpenAI extractor implementation
New file helper utilities for CLI
TypeScript implementation of text conversion
New CLI command for document conversion
TypeScript file validator with local path support
New CLI command for template management
New TypeScript document converter service
TypeScript PDF validator implementation
New CLI logger utility with colored output
Added new configuration options and exports
Added TypeScript exports and type definitions
Updated import paths for TypeScript
TypeScript implementation of base schema
TypeScript implementation of secondary schema
TypeScript implementation of schema field cleaning
Updated import paths for TypeScript
Updated import paths for TypeScript
Updated import paths for TypeScript
New CLI entry point with command structure
6 files
Code formatting improvements
Code formatting improvements
Code formatting improvements
Code formatting improvements
Code formatting improvements
Code formatting improvements
21 files
Type definitions for extract service
Type definitions for Zod schema conversion
Type definitions for secondary schema
Type definitions for auto schema generation
Type definitions for extractors
Type definitions for Ollama extractor
Type definitions for OpenAI extractor
Type definitions for Google extractor
Type definitions for formatter service
Type definitions for templates service
Type definitions for schema validator
Type definitions for markdown generation
Type definitions for schema field cleaning
Type definitions for base schema
Type definitions for file validator
Type definitions for PDF validator
Type definitions for text conversion
Source map for extract service types
Source map for extractors types
Source map for Zod schema types
Comprehensive CLI documentation and usage guide
3 files
Updated build scripts and TypeScript configuration
Added CLI workspace and updated build process
New CLI package configuration
40 files