-
Notifications
You must be signed in to change notification settings - Fork 60
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
Author
|
PR Description updated to latest commit (141fe50) |
Author
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/v1Enhanced 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 formattingRefactored with TypeScript and better error handlingAdded TypeScript types and image optimization parametersEnhanced enum validation and TypeScript conversionImproved PDF validation and TypeScript supportRefactored with TypeScript and better error handlingConverted to TypeScript with better type safetyAdded new local models and TypeScript typesCode formatting and TypeScript conversionCode formatting and TypeScript conversionAdded local file path validation supportNew CLI command for document extractionAdded OCR language support and image optimizationNew TypeScript extract service with enhanced optionsTypeScript implementation of schema generationTypeScript schema validation with proper typesTypeScript implementation with proper type definitionsTypeScript formatter service with improved error handlingTypeScript Google extractor with proper typingTypeScript templates service with SchemaField typesTypeScript extractors index with new model supportAdded new local models and configuration optionsTypeScript Ollama extractor implementationTypeScript OpenAI extractor implementationNew file helper utilities for CLITypeScript implementation of text conversionNew CLI command for document conversionTypeScript file validator with local path supportNew CLI command for template managementNew TypeScript document converter serviceTypeScript PDF validator implementationNew CLI logger utility with colored outputAdded new configuration options and exportsAdded TypeScript exports and type definitionsUpdated import paths for TypeScriptTypeScript implementation of base schemaTypeScript implementation of secondary schemaTypeScript implementation of schema field cleaningUpdated import paths for TypeScriptUpdated import paths for TypeScriptUpdated import paths for TypeScriptNew CLI entry point with command structure6 files
Code formatting improvementsCode formatting improvementsCode formatting improvementsCode formatting improvementsCode formatting improvementsCode formatting improvements21 files
Type definitions for extract serviceType definitions for Zod schema conversionType definitions for secondary schemaType definitions for auto schema generationType definitions for extractorsType definitions for Ollama extractorType definitions for OpenAI extractorType definitions for Google extractorType definitions for formatter serviceType definitions for templates serviceType definitions for schema validatorType definitions for markdown generationType definitions for schema field cleaningType definitions for base schemaType definitions for file validatorType definitions for PDF validatorType definitions for text conversionSource map for extract service typesSource map for extractors typesSource map for Zod schema typesComprehensive CLI documentation and usage guide3 files
Updated build scripts and TypeScript configurationAdded CLI workspace and updated build processNew CLI package configuration40 files