Package 

Class AIToolApprover


  • 
    public final class AIToolApprover
    
                        

    The 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 Detail

      • AIToolApprover

        AIToolApprover(String userId, String clientId, CoroutineScope scope, SuspendFunction2<AIToolCallPart, Boolean, Unit> decide)
        Parameters:
        userId - The person signed in, matched against a call's target_user_id.
        clientId - This install, matched against a client tool call's target_client_id.
        scope - Where answers are sent.
        decide - Sends the answer.