llm

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig struct {
	Name         string
	Template     string
	Runtime      string
	Model        string
	Dependencies []string
	TestCoverage string
	Capabilities []string
	Ports        []Port
	Environment  []Environment
}

AgentConfig represents a complete agent configuration

type AgentDeployer

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

AgentDeployer deploys and tests agents locally

func NewAgentDeployer

func NewAgentDeployer() *AgentDeployer

NewAgentDeployer creates a new agent deployer

func (*AgentDeployer) AgentExists

func (d *AgentDeployer) AgentExists(agentName string) bool

AgentExists checks if an agent project exists

func (*AgentDeployer) BuildAgent

func (d *AgentDeployer) BuildAgent(agentName string) error

BuildAgent builds the agent container

func (*AgentDeployer) DeployAgent

func (d *AgentDeployer) DeployAgent(agentName string) (*ContainerInfo, error)

DeployAgent deploys the agent locally

func (*AgentDeployer) RunTests

func (d *AgentDeployer) RunTests(agentName string) (*TestResults, error)

RunTests runs the agent test suite

func (*AgentDeployer) ValidateAgent

func (d *AgentDeployer) ValidateAgent(agentName string) (*ValidationResult, error)

ValidateAgent validates the agent functionality

type AgentTemplate

type AgentTemplate struct {
	Name         string
	Description  string
	Capabilities []string
	Code         string
	Tests        string
	Config       string
	Dependencies []string
}

AgentTemplate represents a template for creating agents

type BenchmarkResult

type BenchmarkResult struct {
	ModelName           string
	AverageResponseTime string
	MemoryUsage         string
	Throughput          string
	QualityScore        string
	CostEfficiency      string
	Tasks               []TaskResult
}

BenchmarkResult represents the result of a model benchmark

type BenchmarkTask

type BenchmarkTask struct {
	Name        string
	Prompt      string
	Expected    string
	MaxTokens   int
	Temperature float64
}

BenchmarkTask represents a benchmark task

type ContainerInfo

type ContainerInfo struct {
	ID    string
	Name  string
	Port  string
	Ports []PortMapping
}

ContainerInfo represents container information

type Environment

type Environment struct {
	Name  string
	Value string
}

Environment represents an environment variable

type IntelligentAgentCreator

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

IntelligentAgentCreator creates intelligent, fully functional agents

func NewIntelligentAgentCreator

func NewIntelligentAgentCreator() *IntelligentAgentCreator

NewIntelligentAgentCreator creates a new intelligent agent creator

func (*IntelligentAgentCreator) CreateAgent

func (c *IntelligentAgentCreator) CreateAgent(useCase, model string) (*AgentConfig, error)

CreateAgent creates a complete intelligent agent

func (*IntelligentAgentCreator) GetCapabilities

func (c *IntelligentAgentCreator) GetCapabilities(useCase string) []string

GetCapabilities gets the capabilities for a use case

func (*IntelligentAgentCreator) GetRecommendedModel

func (c *IntelligentAgentCreator) GetRecommendedModel(useCase string) (string, error)

GetRecommendedModel gets the recommended model for a use case

func (*IntelligentAgentCreator) ValidateUseCase

func (c *IntelligentAgentCreator) ValidateUseCase(useCase string) error

ValidateUseCase validates if a use case is supported

type LocalLLMManager

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

LocalLLMManager handles local LLM operations

func NewLocalLLMManager

func NewLocalLLMManager() *LocalLLMManager

NewLocalLLMManager creates a new local LLM manager

func (*LocalLLMManager) CheckOllamaAvailability

func (m *LocalLLMManager) CheckOllamaAvailability() error

CheckOllamaAvailability checks if Ollama is running

func (*LocalLLMManager) GetModelInfo

func (m *LocalLLMManager) GetModelInfo(modelName string) (*LocalModel, error)

GetModelInfo gets detailed information about a local model

func (*LocalLLMManager) GetModelSize

func (m *LocalLLMManager) GetModelSize(modelName string) string

GetModelSize gets the size of a model in human-readable format

func (*LocalLLMManager) GetRecommendedModels

func (m *LocalLLMManager) GetRecommendedModels() map[string][]string

GetRecommendedModels returns a list of recommended models for different use cases

func (*LocalLLMManager) IsModelAvailable

func (m *LocalLLMManager) IsModelAvailable(modelName string) bool

IsModelAvailable checks if a specific model is available

func (*LocalLLMManager) ListLocalModels

func (m *LocalLLMManager) ListLocalModels() ([]LocalModel, error)

ListLocalModels lists all available local models

func (*LocalLLMManager) PullModel

func (m *LocalLLMManager) PullModel(modelName string) error

PullModel pulls a model from Ollama

func (*LocalLLMManager) RemoveModel

func (m *LocalLLMManager) RemoveModel(modelName string) error

RemoveModel removes a local model

func (*LocalLLMManager) TestModel

func (m *LocalLLMManager) TestModel(modelName string) error

TestModel tests if a local model is working

func (*LocalLLMManager) ValidateModelName

func (m *LocalLLMManager) ValidateModelName(modelName string) error

ValidateModelName validates if a model name is valid for Ollama

type LocalModel

type LocalModel struct {
	Name       string            `json:"name"`
	Size       string            `json:"size"`
	ModifiedAt string            `json:"modified_at"`
	Digest     string            `json:"digest"`
	Details    map[string]string `json:"details,omitempty"`
	Backend    string            `json:"backend"`
	Status     string            `json:"status"`
}

LocalModel represents a local LLM model

type LocalModelResponse

type LocalModelResponse struct {
	Models []LocalModel `json:"models"`
}

LocalModelResponse represents Ollama API response

type ModelAnalysis

type ModelAnalysis struct {
	ModelName        string
	Architecture     ModelArchitecture
	Performance      ModelPerformance
	Capabilities     []string
	Limitations      []string
	BestUseCases     []string
	OptimizationTips []string
}

ModelAnalysis represents a comprehensive model analysis

type ModelAnalyzer

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

ModelAnalyzer analyzes model capabilities and limitations

func NewModelAnalyzer

func NewModelAnalyzer() *ModelAnalyzer

NewModelAnalyzer creates a new model analyzer

func (*ModelAnalyzer) AnalyzeModel

func (a *ModelAnalyzer) AnalyzeModel(modelName string) (*ModelAnalysis, error)

AnalyzeModel performs comprehensive analysis of a model

func (*ModelAnalyzer) IsModelAvailable

func (a *ModelAnalyzer) IsModelAvailable(modelName string) bool

IsModelAvailable checks if a model is available

type ModelArchitecture

type ModelArchitecture struct {
	ModelType     string
	Parameters    string
	ContextWindow string
	TrainingData  string
}

ModelArchitecture represents model architecture information

type ModelBenchmarker

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

ModelBenchmarker runs comprehensive benchmarks on models

func NewModelBenchmarker

func NewModelBenchmarker() *ModelBenchmarker

NewModelBenchmarker creates a new model benchmarker

func (*ModelBenchmarker) GenerateRecommendations

func (b *ModelBenchmarker) GenerateRecommendations(results []*BenchmarkResult) []string

GenerateRecommendations generates recommendations based on benchmark results

func (*ModelBenchmarker) GetAvailableModels

func (b *ModelBenchmarker) GetAvailableModels() ([]string, error)

GetAvailableModels gets all available models for benchmarking

func (*ModelBenchmarker) RunBenchmarks

func (b *ModelBenchmarker) RunBenchmarks(modelNames []string) ([]*BenchmarkResult, error)

RunBenchmarks runs comprehensive benchmarks on all models

type ModelOptimizer

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

ModelOptimizer optimizes models for specific use cases

func NewModelOptimizer

func NewModelOptimizer() *ModelOptimizer

NewModelOptimizer creates a new model optimizer

func (*ModelOptimizer) IsModelAvailable

func (o *ModelOptimizer) IsModelAvailable(modelName string) bool

IsModelAvailable checks if a model is available

func (*ModelOptimizer) OptimizeForUseCase

func (o *ModelOptimizer) OptimizeForUseCase(modelName, useCase string) (*OptimizationResult, error)

OptimizeForUseCase optimizes a model for a specific use case

type ModelPerformance

type ModelPerformance struct {
	ResponseTime string
	MemoryUsage  string
	Throughput   string
}

ModelPerformance represents model performance characteristics

type OptimizationResult

type OptimizationResult struct {
	ModelName               string
	UseCase                 string
	ResponseTimeImprovement string
	MemoryOptimization      string
	QualityImprovement      string
	Parameters              map[string]interface{}
	SystemMessage           string
	ConfigPath              string
}

OptimizationResult represents the result of model optimization

type Port

type Port struct {
	Container int
	Host      int
}

Port represents a port mapping

type PortMapping

type PortMapping struct {
	Host      string
	Container string
}

PortMapping represents a port mapping

type TaskResult

type TaskResult struct {
	TaskName     string
	ResponseTime time.Duration
	Accuracy     float64
	MemoryUsed   string
	Success      bool
	Error        string
}

TaskResult represents the result of a specific benchmark task

type TemplateManager

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

TemplateManager manages agent templates

func NewTemplateManager

func NewTemplateManager() *TemplateManager

NewTemplateManager creates a new template manager

func (*TemplateManager) GetTemplate

func (tm *TemplateManager) GetTemplate(name string) (*AgentTemplate, error)

GetTemplate gets a template by name

type TestDetail

type TestDetail struct {
	Name    string
	Status  string
	Message string
}

TestDetail represents a single test result

type TestResults

type TestResults struct {
	Passed  int
	Total   int
	Details []TestDetail
}

TestResults represents test execution results

type ValidationResult

type ValidationResult struct {
	Status       string
	Issues       int
	IssueDetails []string
	ResponseTime string
	MemoryUsage  string
	CPUUsage     string
}

ValidationResult represents agent validation results

Jump to

Keyboard shortcuts

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