java.lang.Object
com.agentforge4j.llm.RetryingLlmClient
- All Implemented Interfaces:
LlmClient
Wraps an LLM client with retry logic for transient failures (decorrelated jitter backoff).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(LlmExecutionRequest request) Executes an LLM request and returns the response.Returns the provider id this client executes against (lowercase, such as"openai").The retry policy this client requests, ornullif it has none.
-
Constructor Details
-
RetryingLlmClient
-
-
Method Details
-
getProviderName
Description copied from interface:LlmClientReturns the provider id this client executes against (lowercase, such as"openai").- Specified by:
getProviderNamein interfaceLlmClient- Returns:
- non-blank provider id
-
getRetryPolicy
Description copied from interface:LlmClientThe retry policy this client requests, ornullif it has none. Callers that need a policy either way should fall back toLlmRetryPolicy.defaults()on anullreturn.- Specified by:
getRetryPolicyin interfaceLlmClient- Returns:
- the requested retry policy, or
nullwhen this client has none
-
execute
Description copied from interface:LlmClientExecutes an LLM request and returns the response.
-