-
public final class AIToolCallPartA tool the agent called, run by the agent's backend or by a person's device.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classAIToolCallPart.StatusWhere a tool call is. An open set: compare against the statuses you know, and treat the rest as still in progress.
public final classAIToolCallPart.ExecutorWho runs a tool. An open set: compare against the executors you know.
-
Field Summary
Fields Modifier and Type Field Description private final BooleanisDeclinedprivate final DoubledurationSecondsprivate final Stringidprivate final Stringnameprivate final StringdisplayTitleprivate final AIToolCallPart.Statusstatusprivate final AIToolCallPart.Executorexecutorprivate final StringtargetUserIdprivate final StringtargetClientIdprivate final Stringargumentsprivate final Stringsummaryprivate final IntegerdurationMsprivate final AIToolApprovalapproval
-
Constructor Summary
Constructors Constructor Description AIToolCallPart(String id, String name, String displayTitle, AIToolCallPart.Status status, AIToolCallPart.Executor executor, String targetUserId, String targetClientId, String arguments, String summary, Integer durationMs, AIToolApproval approval)
-
Method Summary
Modifier and Type Method Description final BooleangetIsDeclined()final DoublegetDurationSeconds()final StringgetId()final StringgetName()final StringgetDisplayTitle()final AIToolCallPart.StatusgetStatus()final AIToolCallPart.ExecutorgetExecutor()final StringgetTargetUserId()final StringgetTargetClientId()final StringgetArguments()final StringgetSummary()final IntegergetDurationMs()final AIToolApprovalgetApproval()final BooleanisAwaiting(String userId, String clientId)Whether this call is waiting for this device: a client tool, still awaiting its result, targeted at this person and this install. final BooleanisAwaitingApproval(String userId, String clientId)Whether this call is waiting for this person to allow it, on this device: still awaiting approval, targeted at this person, and at this install when it names one (a client tool does; a server tool's question may be answered from any of their devices). -
-
Constructor Detail
-
AIToolCallPart
AIToolCallPart(String id, String name, String displayTitle, AIToolCallPart.Status status, AIToolCallPart.Executor executor, String targetUserId, String targetClientId, String arguments, String summary, Integer durationMs, AIToolApproval approval)
- Parameters:
id- The model provider's tool-call ID.name- The tool's name, as the agent declared it.displayTitle- What the call is doing, in words for people, such as "Checking your location".status- Where the call is.executor- Who runs the tool.targetUserId- The person whose device must run a client tool.targetClientId- The install that must run a client tool, from the custom data of the person's triggering message.arguments- The call's arguments as JSON text with sorted keys, present for client tools, which need them to run.summary- A short, shareable outcome, such as "Found your location".durationMs- How long the call took, in milliseconds.approval- What the call asks the person it waits for before it runs, and how they answered, when its tool asks first.
-
-
Method Detail
-
getIsDeclined
final Boolean getIsDeclined()
-
getDurationSeconds
final Double getDurationSeconds()
-
getDisplayTitle
final String getDisplayTitle()
-
getStatus
final AIToolCallPart.Status getStatus()
-
getExecutor
final AIToolCallPart.Executor getExecutor()
-
getTargetUserId
final String getTargetUserId()
-
getTargetClientId
final String getTargetClientId()
-
getArguments
final String getArguments()
-
getSummary
final String getSummary()
-
getDurationMs
final Integer getDurationMs()
-
getApproval
final AIToolApproval getApproval()
-
isAwaiting
final Boolean isAwaiting(String userId, String clientId)
Whether this call is waiting for this device: a client tool, still awaiting its result, targeted at this person and this install.
- Parameters:
userId- The person signed in on this device.clientId- This install, from AIClientIdentity.installId.
-
isAwaitingApproval
final Boolean isAwaitingApproval(String userId, String clientId)
Whether this call is waiting for this person to allow it, on this device: still awaiting approval, targeted at this person, and at this install when it names one (a client tool does; a server tool's question may be answered from any of their devices).
- Parameters:
userId- The person signed in on this device.clientId- This install, from AIClientIdentity.installId.
-
-
-
-