-
public final class AIToolApproverThe person answering tool calls' questions on this device, and how their answer reaches your backend, which holds each call until it gets one.
The approver keeps where each answer is, so create it where it outlives the screen, such as a ViewModel. It is confined to the main thread: pass a scope that runs on it, such as a
viewModelScope.
-
-
Constructor Summary
Constructors Constructor Description AIToolApprover(String userId, String clientId, CoroutineScope scope, SuspendFunction2<AIToolCallPart, Boolean, Unit> decide)
-
Method Summary
Modifier and Type Method Description final StringgetUserId()final StringgetClientId()-
-
Constructor Detail
-
AIToolApprover
AIToolApprover(String userId, String clientId, CoroutineScope scope, SuspendFunction2<AIToolCallPart, Boolean, Unit> decide)
- Parameters:
userId- The person signed in, matched against a call'starget_user_id.clientId- This install, matched against a client tool call'starget_client_id.scope- Where answers are sent.decide- Sends the answer.
-
-
Method Detail
-
getClientId
final String getClientId()
-
-
-
-