Package akka.javasdk.client
Interface AgentMethodRef1<A1,R>
- Type Parameters:
A1- The argument type of the callR- The type of value returned by executing the call
- All Superinterfaces:
ComponentDeferredMethodRef1<A1,R>
One argument agent component call representation.
Extends ComponentMethodRef1 with the ability to get a detailed reply including token
usage through withDetailedReply().
Not for user extension or instantiation, returned by the SDK component client
-
Method Summary
Modifier and TypeMethodDescriptioninvokeAsync(A1 arg) Switch to a detailed reply mode that includes e.g.withMetadata(Metadata metadata) withRetry(int maxRetries) Set the retry settings for this call.withRetry(akka.pattern.RetrySettings retrySettings) Set the retry settings for this call.Methods inherited from interface akka.javasdk.client.ComponentDeferredMethodRef1
deferred
-
Method Details
-
withMetadata
- Specified by:
withMetadatain interfaceComponentDeferredMethodRef1<A1,R>
-
withRetry
Set the retry settings for this call.- Parameters:
retrySettings- The retry settings- Returns:
- A new call with the retry settings set
-
withRetry
Set the retry settings for this call. A predefined backoff strategy will be calculated based on the number of maxRetries.- Parameters:
maxRetries- The number of retries to make- Returns:
- A new call with the retry settings set
-
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
-
invokeAsync
-
invoke
-