history

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentBlock

type ContentBlock struct {
	Type      string          `json:"type"`
	Text      string          `json:"text,omitempty"`
	ID        string          `json:"id,omitempty"`
	ToolUseID string          `json:"tool_use_id,omitempty"`
	Name      string          `json:"name,omitempty"`
	Input     json.RawMessage `json:"input,omitempty"`
	Content   interface{}     `json:"content,omitempty"`
}

ContentBlock represents a block of content in a message

type HistoryMessage

type HistoryMessage struct {
	Role    string         `json:"role"`
	Content []ContentBlock `json:"content"`
}

HistoryMessage implements the llm.Message interface for stored messages

func (*HistoryMessage) GetContent

func (m *HistoryMessage) GetContent() string

func (*HistoryMessage) GetRole

func (m *HistoryMessage) GetRole() string

func (*HistoryMessage) GetToolCalls

func (m *HistoryMessage) GetToolCalls() []llm.ToolCall

func (*HistoryMessage) GetToolResponseID

func (m *HistoryMessage) GetToolResponseID() string

func (*HistoryMessage) GetUsage

func (m *HistoryMessage) GetUsage() (int, int)

func (*HistoryMessage) IsToolResponse

func (m *HistoryMessage) IsToolResponse() bool

type HistoryToolCall

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

HistoryToolCall implements llm.ToolCall for stored tool calls

func (*HistoryToolCall) GetArguments

func (t *HistoryToolCall) GetArguments() map[string]interface{}

func (*HistoryToolCall) GetID

func (t *HistoryToolCall) GetID() string

func (*HistoryToolCall) GetName

func (t *HistoryToolCall) GetName() string

Jump to

Keyboard shortcuts

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