types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conflict

type Conflict struct {
	ID              string
	Type            ConflictType
	Description     string
	InvolvedAgents  []string // List of agent IDs
	RelatedTaskID   string
	StartTime       time.Time
	ResolutionTime  *time.Time
	Status          string
	Resolution      ResolutionStrategy
	Context         map[string]interface{}
	ResolutionNotes string
}

Conflict represents a conflict between agents

type ConflictType

type ConflictType string

ConflictType represents different types of conflicts that can occur

const (
	// TaskExecutionConflict occurs when agents disagree on task execution approach
	TaskExecutionConflict ConflictType = "task_execution"
	// ResourceConflict occurs when multiple agents compete for resources
	ResourceConflict ConflictType = "resource"
	// PriorityConflict occurs when there's disagreement about task priorities
	PriorityConflict ConflictType = "priority"
	// CapabilityConflict occurs when there's disagreement about agent capabilities
	CapabilityConflict ConflictType = "capability"
	// DecisionConflict occurs when agents disagree on decisions
	DecisionConflict ConflictType = "decision"
)

type Function

type Function struct {
	Name        string                         `json:"name"`
	Description string                         `json:"description"`
	Parameters  map[string]ParameterDefinition `json:"parameters"`
	Required    []string                       `json:"required,omitempty"`
}

Function represents a callable function definition for LLM function calling

type FunctionCall

type FunctionCall struct {
	Name      string
	Arguments string
}

FunctionCall represents a function call in the conversation

type FunctionDefinition

type FunctionDefinition struct {
	Name        string
	Description string
	Parameters  map[string]interface{}
}

FunctionDefinition represents an OpenAI function definition

type ImageContent

type ImageContent struct {
	Path        string
	Description string
}

ImageContent represents an image in the conversation

type LLMConfig

type LLMConfig struct {
	Model       string
	Temperature float64
	MaxTokens   int
	TopP        float64
	TopK        int
}

LLMConfig represents configuration for an LLM provider

type Message

type Message struct {
	Role    string
	Content string
}

Message represents a chat message

type ParameterDefinition

type ParameterDefinition struct {
	Type        string   `json:"type"`
	Description string   `json:"description"`
	Required    bool     `json:"required"`
	Enum        []string `json:"enum,omitempty"`
}

ParameterDefinition defines a parameter for function calling

type ResolutionStrategy

type ResolutionStrategy string

ResolutionStrategy defines how to resolve a conflict

const (
	// ConsensusResolution uses voting to reach agreement
	ConsensusResolution ResolutionStrategy = "consensus"
	// HierarchicalResolution escalates to manager for decision
	HierarchicalResolution ResolutionStrategy = "hierarchical"
	// MediationResolution uses a third-party agent to mediate
	MediationResolution ResolutionStrategy = "mediation"
	// CompromiseResolution attempts to find middle ground
	CompromiseResolution ResolutionStrategy = "compromise"
	// FallbackResolution uses predefined fallback approach
	FallbackResolution ResolutionStrategy = "fallback"
)

type TaskOutput

type TaskOutput struct {
	TaskID      string
	Description string
	Status      tasks.TaskStatus
	Result      string
	Context     map[string]interface{}
	Metadata    map[string]interface{}
	StartedAt   *time.Time
	CompletedAt *time.Time
	Error       string
}

TaskOutput represents the complete output of a task execution

type TaskProgress

type TaskProgress struct {
	TaskID       string
	AgentID      string
	Status       tasks.TaskStatus
	Progress     float64
	Messages     []string
	StartTime    time.Time
	EndTime      *time.Time
	Requirements *TaskRequirements
}

TaskProgress tracks the progress of a task

type TaskRequirements

type TaskRequirements struct {
	Required map[string]int
	Optional map[string]int
	Priority int
	Deadline *time.Time
}

TaskRequirements defines what capabilities are needed for a task

func NewTaskRequirements

func NewTaskRequirements() *TaskRequirements

NewTaskRequirements creates a new task requirements instance

type ToolCall

type ToolCall struct {
	Tool  string
	Input string
}

ToolCall represents a request to execute a tool

Jump to

Keyboard shortcuts

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