类:SingleFlow
java.lang.Object
com.google.adk.flows.llmflows.BaseLlmFlow
com.google.adk.flows.llmflows.SingleFlow
- All Implemented Interfaces:
BaseFlow
- Direct Known Subclasses:
AutoFlow
基于基本的大型语言模型(LLM)的流程,使用固定的请求处理器和响应处理器。
-
字段摘要
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> -
构造函数概述
ConstructorsModifierConstructorDescriptionprotectedSingleFlow(List<RequestProcessor> requestProcessors, List<ResponseProcessor> responseProcessors, Optional<Integer> maxSteps) SingleFlow(Optional<Integer> maxSteps) -
方法概述
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) 在从大型语言模型(LLM)接收到响应后,会对该响应进行后处理。io.reactivex.rxjava3.core.Flowable<Event> run(InvocationContext invocationContext) 通过反复调用相关函数,执行整个大型语言模型(LLM)的运行流程。BaseLlmFlow.runOneStep(Context, InvocationContext)直到收到最终的回复为止。io.reactivex.rxjava3.core.Flowable<Event> runLive(InvocationContext invocationContext) 以流式模式执行大型语言模型(LLM)的相关流程。
-
字段详情
-
REQUEST_PROCESSORS
-
RESPONSE_PROCESSORS
protected static final com.google.common.collect.ImmutableList<ResponseProcessor> RESPONSE_PROCESSORS
-
-
构造函数详细信息
-
SingleFlow
public SingleFlow() -
SingleFlow
-
SingleFlow
protected SingleFlow(List<RequestProcessor> requestProcessors, List<ResponseProcessor> responseProcessors, Optional<Integer> maxSteps)
-