Versions in this module Expand all Collapse all v1 v1.8.0 Oct 15, 2026 v1.5.0 Oct 12, 2026 Changes in this version + type APIError struct + Body string + Status int + func (e *APIError) Error() string + type Chunk struct + Captions []string + ChunkIndex int + DocItems []string + Filename string + Headings []string + Metadata map[string]any + NumTokens *int + PageNumbers []int + RawText string + Text string + type ChunkOptions struct + ConvertOptions ConvertOptions + ImagePlaceholder string + IncludeRawText *bool + MaxTokens int + MergePeers *bool + Tokenizer string + UseMarkdownImages *bool + UseMarkdownTables *bool + type ChunkParser func(rawBody []byte) ([]Chunk, error) + type ConversionResult struct + Images []ExtractedImage + Markdown string + PageCount int + type ConvertOptions struct + AbortOnError *bool + DoOCR *bool + DoTableStructure *bool + DocumentTimeoutSec *float64 + ForceOCR *bool + FromFormats []string + ImageExportMode string + ImagesScale *float64 + IncludeImages *bool + IncludePageImages *bool + OCRLang []string + PDFBackend string + Pipeline string + TableMode string + ToFormats []string + type ConvertParser func(rawBody []byte) (*ConversionResult, error) + type Converter interface + ConvertBytes func(ctx context.Context, data []byte, filename string) (*ConversionResult, error) + ConvertFile func(ctx context.Context, filePath string) (*ConversionResult, error) + ConvertURL func(ctx context.Context, docURL string) (*ConversionResult, error) + type DoclingClient struct + func NewDoclingClient(baseURL string, opts ...Option) *DoclingClient + func (c *DoclingClient) ChunkHybrid(ctx context.Context, filename string, r io.Reader, opts ChunkOptions) ([]Chunk, error) + func (c *DoclingClient) ChunkHybridBytes(ctx context.Context, data []byte, filename string, opts ChunkOptions) ([]Chunk, error) + func (c *DoclingClient) ChunkHybridFile(ctx context.Context, filePath string, opts ChunkOptions) ([]Chunk, error) + func (c *DoclingClient) ConvertBytes(ctx context.Context, data []byte, filename string) (*ConversionResult, error) + func (c *DoclingClient) ConvertBytesWithOptions(ctx context.Context, data []byte, filename string, opts ConvertOptions) (*ConversionResult, error) + func (c *DoclingClient) ConvertFile(ctx context.Context, filePath string) (*ConversionResult, error) + func (c *DoclingClient) ConvertFileWithOptions(ctx context.Context, filePath string, opts ConvertOptions) (*ConversionResult, error) + func (c *DoclingClient) ConvertURL(ctx context.Context, docURL string) (*ConversionResult, error) + func (c *DoclingClient) IsAvailable(ctx context.Context) bool + type ExtractedImage struct + Base64 string + Filename string + MimeType string + type GenericClient struct + func NewGenericClient(cfg GenericConfig) (*GenericClient, error) + func (g *GenericClient) ChunkHybridBytes(ctx context.Context, data []byte, filename string, opts ChunkOptions) ([]Chunk, error) + func (g *GenericClient) ChunkHybridFile(ctx context.Context, filePath string, opts ChunkOptions) ([]Chunk, error) + func (g *GenericClient) ConvertBytes(ctx context.Context, data []byte, filename string) (*ConversionResult, error) + func (g *GenericClient) ConvertFile(ctx context.Context, filePath string) (*ConversionResult, error) + func (g *GenericClient) ConvertURL(context.Context, string) (*ConversionResult, error) + func (g *GenericClient) IsAvailable(ctx context.Context) bool + type GenericConfig struct + APIKey string + BaseURL string + ChunkFields func(ChunkOptions) map[string]string + ChunkPath string + ConvertPath string + FileField string + HTTPClient *http.Client + HealthCacheTTL *time.Duration + HealthPath string + MaxResponseBytes int64 + ParseChunk ChunkParser + ParseConvert ConvertParser + Retry RetryConfig + TenantID string + Timeout time.Duration + UserAgent string + type HealthChecker interface + IsAvailable func(ctx context.Context) bool + type HybridChunker interface + ChunkHybridBytes func(ctx context.Context, data []byte, filename string, opts ChunkOptions) ([]Chunk, error) + type Option func(*DoclingClient) + func WithAPIKey(key string) Option + func WithHTTPClient(client *http.Client) Option + func WithHealthCacheTTL(ttl time.Duration) Option + func WithMaxResponseBytes(n int64) Option + func WithRetry(maxAttempts int, baseDelay, maxDelay time.Duration) Option + func WithTenantID(id string) Option + func WithTimeout(d time.Duration) Option + func WithUserAgent(userAgent string) Option + type RetryConfig struct + BaseDelay time.Duration + MaxAttempts int + MaxDelay time.Duration