Package akka.javasdk.client
Interface AgentInvokeOnlyMethodRef<R>
- Type Parameters:
R- The type of value returned by executing the call
@DoNotInherit
public interface AgentInvokeOnlyMethodRef<R>
Zero 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 Summary
Modifier and TypeMethodDescriptioninvoke()Execute the call and block until the response is available.Execute the call asynchronously.Switch to a detailed reply mode that includes e.g.
-
Method Details
-
invoke
R invoke()Execute the call and block until the response is available.- Returns:
- The agent reply including the result value
-
invokeAsync
CompletionStage<R> invokeAsync()Execute the call asynchronously.- Returns:
- A CompletionStage that completes with the agent reply including the result value
-
withDetailedReply
AgentReplyInvokeOnlyMethodRef<R> withDetailedReply()Switch to a detailed reply mode that includes e.g. token usage information.- Returns:
- A call representation that returns
Agent.AgentReply
-