adapters

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package adapters provides LLM adapters for different providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OmniLLMAdapter

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

OmniLLMAdapter adapts OmniLLM ChatClient to ADK's LLM interface.

func NewOmniLLMAdapter

func NewOmniLLMAdapter(providerName, apiKey, modelName string) (*OmniLLMAdapter, error)

NewOmniLLMAdapter creates a new OmniLLM adapter.

func NewOmniLLMAdapterWithConfig

func NewOmniLLMAdapterWithConfig(cfg OmniLLMAdapterConfig) (*OmniLLMAdapter, error)

NewOmniLLMAdapterWithConfig creates a new OmniLLM adapter with full configuration.

func (*OmniLLMAdapter) GenerateContent

func (m *OmniLLMAdapter) GenerateContent(ctx context.Context, req *model.LLMRequest, stream bool) iter.Seq2[*model.LLMResponse, error]

GenerateContent implements the LLM interface.

func (*OmniLLMAdapter) Name

func (m *OmniLLMAdapter) Name() string

Name returns the model name.

type OmniLLMAdapterConfig

type OmniLLMAdapterConfig struct {
	ProviderName      string
	APIKey            string
	ModelName         string
	ObservabilityHook omnillm.ObservabilityHook
}

OmniLLMAdapterConfig holds configuration for creating a OmniLLM adapter.

Jump to

Keyboard shortcuts

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