Help us shape the future of Go! Take the 2026 Go Developer Survey

chathistory

package
v0.4.45 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChatHistory

func NewChatHistory(cfg ChatHistoryConfig, deps ChatHistoryDeps) (agentkit.Tool, error)

NewChatHistory registers tool/chat-history: read transport chat history on demand.

Types

type ChatHistoryConfig

type ChatHistoryConfig struct {
	DefaultLimit int `json:"defaultLimit"`
	MaxLimit     int `json:"maxLimit"`
}

type ChatHistoryDeps

type ChatHistoryDeps struct {
	// History is typically platform.default; adapted to chathistory.Router at init.
	History agentkit.Platform `json:"history"`
}

type ChatHistoryInput

type ChatHistoryInput struct {
	SessionID string `json:"sessionId,omitempty" jsonschema:"Optional delivery target; defaults to the current inbox"`
	UserID    string `json:"userId,omitempty" jsonschema:"Optional user target when sessionId is omitted"`
	Limit     int    `json:"limit,omitempty" jsonschema:"Maximum messages to return"`
	Before    string `json:"before,omitempty" jsonschema:"Pagination cursor from a previous response"`
	After     string `json:"after,omitempty" jsonschema:"Only messages after this unix timestamp (seconds)"`
	Order     string `json:"order,omitempty" jsonschema:"Sort order: asc or desc (default desc)"`
	Query     string `json:"query,omitempty" jsonschema:"Optional keyword filter applied to message content"`
	Thread    *bool  `` /* 189-byte string literal not displayed */
}

type ChatHistoryOutput

type ChatHistoryOutput struct {
	Messages []chathistory.Message `json:"messages"`
	HasMore  bool                  `json:"hasMore"`
	Cursor   string                `json:"cursor,omitempty"`
	Source   string                `json:"source,omitempty"`
	Count    int                   `json:"count"`
}

Jump to

Keyboard shortcuts

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