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 ChatHistoryDeps ¶
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 `json:"thread,omitempty" jsonschema:"When true, scope to the current thread when available (default true)"`
}
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"`
}
func Dispatch ¶
func Dispatch(ctx context.Context, deps ChatHistoryDeps, cfg ChatHistoryConfig, input ChatHistoryInput) (ChatHistoryOutput, error)
Click to show internal directories.
Click to hide internal directories.