llm

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package llm provides LLM provider integration using the iris SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(provider core.Provider, opts ...core.ClientOption) *core.Client

NewClient creates an iris client from a provider.

func NewEmbeddingProvider

func NewEmbeddingProvider(providerType string) (core.EmbeddingProvider, error)

NewEmbeddingProvider creates an iris embedding provider based on the provider type. Returns the provider cast to core.EmbeddingProvider, or an error if the provider doesn't support embeddings.

func NewProvider

func NewProvider(providerType string) (core.Provider, error)

NewProvider creates an iris provider based on the provider type. API keys are read from standard environment variables: - openai: OPENAI_API_KEY - anthropic: ANTHROPIC_API_KEY - gemini: GEMINI_API_KEY or GOOGLE_API_KEY - voyageai: VOYAGEAI_API_KEY - ollama: no API key required (local)

Types

type EmbeddingProvider

type EmbeddingProvider = core.EmbeddingProvider

EmbeddingProvider is an alias for core.EmbeddingProvider.

type ProviderType

type ProviderType string

ProviderType identifies the LLM provider.

const (
	ProviderOpenAI    ProviderType = "openai"
	ProviderAnthropic ProviderType = "anthropic"
	ProviderGemini    ProviderType = "gemini"
	ProviderOllama    ProviderType = "ollama"
	ProviderVoyageAI  ProviderType = "voyageai"
)

Jump to

Keyboard shortcuts

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