Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnthropicProvider ¶
type AnthropicProvider struct {
// contains filtered or unexported fields
}
AnthropicProvider implements types.LLMProvider for Anthropic Claude.
func NewAnthropicProvider ¶
func NewAnthropicProvider(config *types.LLMConfig) (*AnthropicProvider, error)
NewAnthropicProvider creates a new Anthropic Claude provider.
func (*AnthropicProvider) ExtractGraph ¶
func (p *AnthropicProvider) ExtractGraph(ctx context.Context, text string, schema string) (*types.ExtractionResult, error)
ExtractGraph sends text to Claude and parses the structured extraction.
func (*AnthropicProvider) Health ¶
func (p *AnthropicProvider) Health(ctx context.Context) error
Health performs a lightweight check against the Anthropic API.
func (*AnthropicProvider) Name ¶
func (p *AnthropicProvider) Name() string
Name returns the provider identifier.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages LLM provider selection and extraction
func (*Client) ExtractGraph ¶
func (c *Client) ExtractGraph(ctx context.Context, text string, schema string) (*types.ExtractionResult, error)
ExtractGraph implements types.LLMProvider. The schema parameter is forwarded to the underlying provider; if empty, the default schema is used.
type LocalProvider ¶
type LocalProvider struct {
// contains filtered or unexported fields
}
LocalProvider implements types.LLMProvider for Ollama / llama.cpp.
func NewLocalProvider ¶
func NewLocalProvider(config *types.LLMConfig) (*LocalProvider, error)
NewLocalProvider creates a new local LLM provider.
func (*LocalProvider) ExtractGraph ¶
func (p *LocalProvider) ExtractGraph(ctx context.Context, text string, schema string) (*types.ExtractionResult, error)
ExtractGraph sends text to Ollama and parses the structured extraction result.
func (*LocalProvider) Health ¶
func (p *LocalProvider) Health(ctx context.Context) error
Health checks if the Ollama endpoint is reachable.
func (*LocalProvider) Name ¶
func (p *LocalProvider) Name() string
Name returns the provider identifier.
type OpenAIProvider ¶
type OpenAIProvider struct {
// contains filtered or unexported fields
}
OpenAIProvider implements types.LLMProvider for OpenAI-compatible APIs.
func NewOpenAIProvider ¶
func NewOpenAIProvider(config *types.LLMConfig) (*OpenAIProvider, error)
NewOpenAIProvider creates a new OpenAI provider.
func (*OpenAIProvider) ExtractGraph ¶
func (p *OpenAIProvider) ExtractGraph(ctx context.Context, text string, schema string) (*types.ExtractionResult, error)
ExtractGraph sends text to the OpenAI chat completions endpoint with JSON schema enforcement and parses the structured extraction result.
func (*OpenAIProvider) Health ¶
func (p *OpenAIProvider) Health(ctx context.Context) error
Health checks if the OpenAI-compatible endpoint is reachable.
func (*OpenAIProvider) Name ¶
func (p *OpenAIProvider) Name() string
Name returns the provider identifier.