MCPcopy Create free account
hub / github.com/cloudwego/eino-examples / ChatItem

Struct ChatItem

quickstart/chatwitheino/server/server.go:54–58  ·  view source on GitHub ↗

ChatItem is the item type for TurnLoop. Each user query or approval decision is pushed as a ChatItem.

Source from the content-addressed store, hash-verified

52// ChatItem is the item type for TurnLoop. Each user query or approval decision
53// is pushed as a ChatItem.
54type ChatItem struct {
55 Query string // user message text (empty for approval items)
56 ApprovalResult *commontool.ApprovalResult // non-nil when this item carries an approval decision
57 InterruptID string // which interrupt this approval resolves
58}
59
60// errInterrupted is returned by OnAgentEvents when the agent is interrupted
61// for approval. The TurnLoop exits with this as ExitReason.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected