Class SingleFlow
java.lang.Object
com.google.adk.flows.llmflows.BaseLlmFlow
com.google.adk.flows.llmflows.SingleFlow
- All Implemented Interfaces:
BaseFlow
- Direct Known Subclasses:
AutoFlow
Basic LLM flow with fixed request and response processors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.google.common.collect.ImmutableList<RequestProcessor> protected static final com.google.common.collect.ImmutableList<ResponseProcessor> Fields inherited from class BaseLlmFlow
maxSteps, requestProcessors, responseProcessorsModifier and TypeFieldDescriptionprotected final intprotected final List<RequestProcessor> protected final List<ResponseProcessor> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSingleFlow(List<RequestProcessor> requestProcessors, List<ResponseProcessor> responseProcessors, Optional<Integer> maxSteps) SingleFlow(Optional<Integer> maxSteps) -
Method Summary
Methods inherited from class BaseLlmFlow
postprocess, run, runLiveModifier and TypeMethodDescriptionprotected io.reactivex.rxjava3.core.Flowable<Event> postprocess(InvocationContext context, Event baseEventForLlmResponse, LlmRequest llmRequest, LlmResponse llmResponse, io.opentelemetry.context.Context parentContext) Post-processes the LLM response after receiving it from the LLM.io.reactivex.rxjava3.core.Flowable<Event> run(InvocationContext invocationContext) Executes the full LLM flow by repeatedly callingBaseLlmFlow.runOneStep(Context, InvocationContext)until a final response is produced.io.reactivex.rxjava3.core.Flowable<Event> runLive(InvocationContext invocationContext) Executes the LLM flow in streaming mode.
-
Field Details
-
REQUEST_PROCESSORS
-
RESPONSE_PROCESSORS
protected static final com.google.common.collect.ImmutableList<ResponseProcessor> RESPONSE_PROCESSORS
-
-
Constructor Details
-
SingleFlow
public SingleFlow() -
SingleFlow
-
SingleFlow
protected SingleFlow(List<RequestProcessor> requestProcessors, List<ResponseProcessor> responseProcessors, Optional<Integer> maxSteps)
-