Documentation
¶
Overview ¶
Package clienttool is the client-tool plumbing the AG-UI adapter (sdk/agui) needs from an sdk.Conversation and that is not part of the public SDK API: settling an answer now, as the model will be given it.
Package sdk registers the lookup in its init, so the adapter can reach a conversation's Settler without the methods being exported on it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Settler ¶
type Settler interface {
// HasToolResultRewriters reports whether the conversation has a tool hook
// that rewrites tool results.
HasToolResultRewriters() bool
// SettleClientTool answers the deferred client tool call callID and
// prepares the tool result the model will be given for it; answered is
// false for a call that already has an answer.
SettleClientTool(ctx context.Context, callID string, result any, failure error) (
prepared types.MessageToolResult, answered bool, err error)
// SettleClientToolRejection is SettleClientTool for a rejection.
SettleClientToolRejection(ctx context.Context, callID, reason string) (
prepared types.MessageToolResult, answered bool, err error)
}
Settler settles client tool answers on a conversation.