在……里面;在……期间内存Runner

An in-memory implementation of a Runner that manages the lifecycle of a BaseAgent execution.

It provides default in-memory implementations for session, artifact, and memory services. It can be constructed either directly from a root agent or from an App.

Inheritors

构造函数(Constructors)

Link copied to clipboard
constructor(agent: BaseAgent, appName: String = "InMemoryRunner", sessionService: SessionService = InMemorySessionService(), artifactService: ArtifactService? = InMemoryArtifactService(), memoryService: MemoryService? = InMemoryMemoryService(), plugins: List<Plugin> = emptyList())

创建一个…… InMemoryRunner 从根节点开始 代理;工作人员,它的 插件(plugins)以及默认的内存服务(in-memory services)。

constructor(app: App, sessionService: SessionService = InMemorySessionService(), artifactService: ArtifactService? = InMemoryArtifactService(), memoryService: MemoryService? = InMemoryMemoryService(), skipClosingPlugins: Boolean = false)

创建一个…… InMemoryRunner from an 应用程序(App)(该名称/术语的)来源/出处是…… App.appName, App.rootAgent, App.plugins,以及 App.resumabilityConfig.

类型

Link copied to clipboard
class Builder

Fluent Builder for InMemoryRunner该功能主要为 Java 语言的调用者提供支持;如果某个属性未被设置,其值将默认使用构造函数中指定的默认值。

Link copied to clipboard
object Companion

属性(Properties)

Link copied to clipboard
override val agent: BaseAgent

该代理由当前运行的程序所使用;对于以节点为根的运行环境来说,这个代理就是位于正在运行的节点上的 `NodeViewAgent`。

Link copied to clipboard
override val appName: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override val node: Node?

该运行器所执行的节点是在节点图中被指定为“根节点”时确定的。`go-forward` 字段:一旦被设置后,该字段的值将保持不变。 代理;工作人员 如果该组件被移除,那么每个参赛者(runner)的运行数据(running unit)就无法被记录或保存了。

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

函数

Link copied to clipboard
open override fun close()

关闭这个运行器(runner),释放其所占用的资源。

Link copied to clipboard
open suspend override fun rewindAsync(userId: String, sessionId: String, rewindBeforeInvocationId: String)

将会话状态恢复到之前的状态(即“回滚”会话)。 Runner.rewindAsync 首先进行描述(description),然后执行清除操作(flush)。 sessionService 因此,之前的操作(比如“倒带”功能)会被保留下来(即不会被撤销)。

Link copied to clipboard
open override fun run(userId: String, sessionId: String, newMessage: Content, runConfig: RunConfig? = null): Iterator<Event>

用于本地测试及方便使用的同步接口。

Link copied to clipboard
open override fun runAsync(userId: String, sessionId: String, invocationId: String? = null, newMessage: Content? = null, stateDelta: Map<String, Any>? = null, runConfig: RunConfig? = null): Flow<Event>

用于在此运行器中启动代理程序的主要入口方法。

Link copied to clipboard
open override fun runLive(userId: String, sessionId: String, liveRequestQueue: LiveRequestQueue, runConfig: RunConfig? = null): Flow<Event>

以实时模式运行代理程序。 Runner.runLive 描述了该功能的作用:即“刷新”(Flush)数据或资源。 sessionService 每个回合中,当回合结束时,或者当控制权移交给其他代理或进入下一个步骤时,以及当整个流程完成或失败时,系统都会执行相应的操作。每次操作都有明确的边界(即操作的范围是有限的);因此,如果某个会话服务出现故障,整个流程会立即终止(而不是继续运行并导致系统陷入无限循环)。