skills

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CapabilityType

type CapabilityType string

CapabilityType defines a model capability.

const (
	// CapTextGeneration indicates the model can generate text.
	CapTextGeneration CapabilityType = "text_generation"

	// CapToolCalling indicates the model supports function/tool calling.
	CapToolCalling CapabilityType = "tool_calling"

	// CapJSONMode indicates the model can output structured JSON.
	CapJSONMode CapabilityType = "json_mode"

	// CapEmbedding indicates the model can generate embeddings.
	CapEmbedding CapabilityType = "embedding"

	// CapVision indicates the model supports image input.
	CapVision CapabilityType = "vision"
)

type GenerateRequest

type GenerateRequest struct {
	// Messages is the conversation history.
	Messages []Message

	// Tools is the list of available tools for tool calling.
	Tools []ToolDefinition

	// MaxTokens limits the response length.
	MaxTokens int

	// Temperature controls randomness (0.0-2.0).
	Temperature float64

	// JSONSchema for structured output (if CapJSONMode).
	JSONSchema *JSONSchema
}

GenerateRequest is the input to a model generation call.

type GenerateResponse

type GenerateResponse struct {
	// Content is the generated text.
	Content string

	// ToolCalls contains any tool invocations.
	ToolCalls []ToolCall

	// Usage tracks token consumption.
	Usage TokenUsage

	// FinishReason indicates why generation stopped.
	FinishReason string

	// Latency is the actual response time.
	Latency time.Duration
}

GenerateResponse is the output from a model generation call.

type JSONSchema

type JSONSchema struct {
	Type       string                 `json:"type,omitempty"`
	Properties map[string]*JSONSchema `json:"properties,omitempty"`
	Required   []string               `json:"required,omitempty"`
}

JSONSchema is a simplified JSON Schema representation.

type Message

type Message struct {
	Role    string // "system", "user", "assistant", "tool"
	Content string
	Name    string // for tool messages
}

Message represents a single message in the conversation.

type ModelConstraints

type ModelConstraints struct {
	// MaxLatencyMs is the maximum acceptable latency in milliseconds.
	MaxLatencyMs int64

	// Privacy indicates data handling requirements.
	// Values: "public", "internal", "private"
	Privacy string

	// PreferredProvider hints at a specific provider if available.
	PreferredProvider string
}

ModelConstraints defines routing constraints for model selection.

type TokenUsage

type TokenUsage struct {
	PromptTokens     int
	CompletionTokens int
	TotalTokens      int
}

TokenUsage tracks token consumption.

type ToolCall

type ToolCall struct {
	ID        string
	Name      string
	Arguments string // JSON string
}

ToolCall represents a single tool invocation by the model.

type ToolDefinition

type ToolDefinition struct {
	Name        string
	Description string
	Parameters  *JSONSchema
}

ToolDefinition describes a tool available to the model.

Jump to

Keyboard shortcuts

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