ocr

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MistralPricePerPage

func MistralPricePerPage() float64

Types

type MistralClient

type MistralClient struct {
	// contains filtered or unexported fields
}

func NewMistralClient

func NewMistralClient(apiKey string) *MistralClient

func NewMistralClientFromEnv

func NewMistralClientFromEnv() (*MistralClient, error)

func (*MistralClient) OCRFile

func (c *MistralClient) OCRFile(ctx context.Context, filePath string, fileType string) ([]PageResult, error)

func (*MistralClient) PricePerPage

func (c *MistralClient) PricePerPage() float64

type PageResult

type PageResult struct {
	PageIndex int
	Markdown  string
}

type Provider

type Provider interface {
	OCRFile(ctx context.Context, filePath string, fileType string) ([]PageResult, error)
	PricePerPage() float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL