llmparse

package
v2.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EndpointDeepSeek   = "https://api.deepseek.com"
	EndpointOpenRouter = "https://openrouter.ai/api/v1"
	EndpointOpenAI     = "https://api.openai.com/v1"
	EndpointGemini     = "https://generativelanguage.googleapis.com/v1beta/openai/"
	EndpointOllama     = "http://localhost:11434/v1"
)

API Endpoints

Variables

View Source
var ErrNoAPIKey = errors.New("no valid API key found")

ErrNoAPIKey is returned when no valid API key is found for LLM parsing.

Functions

This section is empty.

Types

type BackendConfig added in v2.10.0

type BackendConfig struct {
	Name    string
	BaseURL string
	EnvKey  string
	Headers map[string]string
}

type Converter

type Converter interface {
	// Convert takes raw text pages and returns a single Markdown string.
	Convert(ctx context.Context, pages []string) (string, error)
	// Name returns the backend name for logging (e.g. "gemini", "openrouter", "deepseek").
	Name() string
}

Converter converts raw PDF page text into structured Markdown via an LLM.

func New

func New(model string, contextWindow int) (Converter, error)

New creates a Converter for the given model name.

Jump to

Keyboard shortcuts

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