integrations

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AIModelFactory

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

AIModelFactory creates AI model integrations based on provider type

func NewAIModelFactory

func NewAIModelFactory(toolRepo interfaces.ToolRepository, logger *zap.Logger) *AIModelFactory

NewAIModelFactory creates a new AI model factory

func (*AIModelFactory) CreateModelIntegration

func (f *AIModelFactory) CreateModelIntegration(agent *entities.Agent, provider *entities.Provider, apiKey string) (interfaces.AIModelIntegration, error)

CreateModelIntegration creates an AI model integration based on the agent configuration

type AIModelIntegration

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

AIModelIntegration implements the Base API

func NewAIModelIntegration

func NewAIModelIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*AIModelIntegration, error)

NewAIModelIntegration creates a new Base integration

func NewGenericAIModelIntegration

func NewGenericAIModelIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*AIModelIntegration, error)

For a generic Base-compatible API

func (*AIModelIntegration) GenerateResponse

func (m *AIModelIntegration) GenerateResponse(ctx context.Context, messages []*entities.Message, toolList []*entities.Tool, options map[string]any, callback interfaces.MessageCallback) ([]*entities.Message, error)

func (*AIModelIntegration) GetLastUsage added in v1.8.0

func (m *AIModelIntegration) GetLastUsage() (*entities.Usage, error)

GetLastUsage returns the usage from the last API call

func (*AIModelIntegration) GetUsage

func (m *AIModelIntegration) GetUsage() (*entities.Usage, error)

GetUsage returns the total token usage statistics

func (*AIModelIntegration) ModelName

func (m *AIModelIntegration) ModelName() string

ModelName returns the name of the model being used

func (*AIModelIntegration) ProviderType

func (m *AIModelIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

type AnthropicIntegration

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

AnthropicIntegration implements the Anthropic Claude API

func NewAnthropicIntegration

func NewAnthropicIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*AnthropicIntegration, error)

NewAnthropicIntegration creates a new Anthropic integration

func (*AnthropicIntegration) GenerateResponse

func (m *AnthropicIntegration) GenerateResponse(ctx context.Context, messages []*entities.Message, toolList []*entities.Tool, options map[string]any, callback interfaces.MessageCallback) ([]*entities.Message, error)

GenerateResponse generates a response from the Anthropic API with incremental saving

func (*AnthropicIntegration) GetLastUsage added in v1.8.0

func (m *AnthropicIntegration) GetLastUsage() (*entities.Usage, error)

GetLastUsage returns the usage from the last API call

func (*AnthropicIntegration) GetUsage

func (m *AnthropicIntegration) GetUsage() (*entities.Usage, error)

GetUsage returns usage information

func (*AnthropicIntegration) ModelName

func (m *AnthropicIntegration) ModelName() string

ModelName returns the name of the model being used

func (*AnthropicIntegration) ProviderType

func (m *AnthropicIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

type DeepseekIntegration

type DeepseekIntegration struct {
	*AIModelIntegration
}

DeepseekIntegration implements the Deepseek API For now, we'll use Base implementation as DeepSeek uses an Base-compatible API, but in the future this could have DeepSeek-specific customizations

func NewDeepseekIntegration

func NewDeepseekIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*DeepseekIntegration, error)

NewDeepseekIntegration creates a new DeepSeek integration

func (*DeepseekIntegration) ProviderType

func (m *DeepseekIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

type DrujensenIntegration added in v1.8.0

type DrujensenIntegration struct {
	*AIModelIntegration
}

DrujensenIntegration implements the Drujensen API Uses OpenAI-compatible API

func NewDrujensenIntegration added in v1.8.0

func NewDrujensenIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*DrujensenIntegration, error)

NewDrujensenIntegration creates a new Drujensen integration

func (*DrujensenIntegration) ProviderType added in v1.8.0

func (m *DrujensenIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

type GenericIntegration

type GenericIntegration struct {
	*AIModelIntegration
}

GenericIntegration implements the Generic API For now, we'll use Base implementation as DeepSeek uses an Base-compatible API, but in the future this could have DeepSeek-specific customizations

func NewGenericIntegration

func NewGenericIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*GenericIntegration, error)

NewGenericIntegration creates a new DeepSeek integration

func (*GenericIntegration) ProviderType

func (m *GenericIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

type GoogleIntegration

type GoogleIntegration struct {
	*AIModelIntegration
}

GoogleIntegration implements the Google Gemini API For now, we'll use Base implementation as a temporary measure, but in a real implementation this would use the Gemini API

func NewGoogleIntegration

func NewGoogleIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*GoogleIntegration, error)

NewGoogleIntegration creates a new Google integration

func (*GoogleIntegration) ProviderType

func (m *GoogleIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

type GroqIntegration

type GroqIntegration struct {
	*AIModelIntegration
}

GroqIntegration implements the Groq API For now, we'll use Base implementation as DeepSeek uses an Base-compatible API, but in the future this could have DeepSeek-specific customizations

func NewGroqIntegration

func NewGroqIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*GroqIntegration, error)

NewGroqIntegration creates a new DeepSeek integration

func (*GroqIntegration) ProviderType

func (m *GroqIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

type MistralIntegration

type MistralIntegration struct {
	*AIModelIntegration
}

func NewMistralIntegration

func NewMistralIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*MistralIntegration, error)

func (*MistralIntegration) ProviderType

func (m *MistralIntegration) ProviderType() entities.ProviderType

type OllamaIntegration

type OllamaIntegration struct {
	*AIModelIntegration
}

OllamaIntegration implements the Ollama API For now, we'll use Base implementation as Ollama can use an Base-compatible API, but in the future this would have Ollama-specific customizations

func NewOllamaIntegration

func NewOllamaIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*OllamaIntegration, error)

NewOllamaIntegration creates a new Ollama integration

func (*OllamaIntegration) ProviderType

func (m *OllamaIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

type OpenAIIntegration

type OpenAIIntegration struct {
	*AIModelIntegration
}

OpenAIIntegration implements the OpenAI API For now, we'll use Base implementation as DeepSeek uses an Base-compatible API, but in the future this could have DeepSeek-specific customizations

func NewOpenAIIntegration

func NewOpenAIIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*OpenAIIntegration, error)

NewOpenAIIntegration creates a new DeepSeek integration

func (*OpenAIIntegration) ProviderType

func (m *OpenAIIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

type TogetherIntegration

type TogetherIntegration struct {
	*AIModelIntegration
}

TogetherIntegration implements the Together API For now, we'll use Base implementation as DeepSeek uses an Base-compatible API, but in the future this could have DeepSeek-specific customizations

func NewTogetherIntegration

func NewTogetherIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*TogetherIntegration, error)

NewTogetherIntegration creates a new DeepSeek integration

func (*TogetherIntegration) ProviderType

func (m *TogetherIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

type XAIIntegration

type XAIIntegration struct {
	*AIModelIntegration
}

XAIIntegration implements the X.AI (Grok) API For now, we'll use Base implementation as the API is similar, but in the future, this would have X.AI-specific customizations

func NewXAIIntegration

func NewXAIIntegration(baseURL, apiKey, model string, toolRepo interfaces.ToolRepository, logger *zap.Logger) (*XAIIntegration, error)

NewXAIIntegration creates a new X.AI integration

func (*XAIIntegration) ProviderType

func (m *XAIIntegration) ProviderType() entities.ProviderType

ProviderType returns the type of provider

Jump to

Keyboard shortcuts

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