Interface AgentInvokeOnlyMethodRef1<A1,R>

Type Parameters:
A1 - The argument type of the call
R - The type of value returned by executing the call

@DoNotInherit public interface AgentInvokeOnlyMethodRef1<A1,R>
One argument agent component call representation, returning a detailed reply including token usage, not executed until invoked.

Not for user extension or instantiation, returned by the SDK component client

  • Method Details

    • invoke

      R invoke(A1 arg)
      Execute the call and block until the response is available.
      Parameters:
      arg - The method argument
      Returns:
      The agent reply including the result value
    • invokeAsync

      CompletionStage<R> invokeAsync(A1 arg)
      Execute the call asynchronously.
      Parameters:
      arg - The method argument
      Returns:
      A CompletionStage that completes with the agent reply including the result value
    • withDetailedReply

      AgentReplyInvokeOnlyMethodRef1<A1,R> withDetailedReply()
      Switch to a detailed reply mode that includes e.g. token usage information.
      Returns:
      A call representation that returns Agent.AgentReply