Current Round
@Serializable
表示当前正在进行的一个轮次,由一条用户消息开启,LLM 将在一个轮次中进行工具调用 - 推理 - 工具调用的循环。
如果 LLM 在一次响应中没有调用任何工具,这个轮次就会被归档为 CompletedRound。
Constructors
Link copied to clipboard
constructor(userMessage: UUID, turns: List<AgentContextIndex.Turn>?, assistantMessage: UUID?, finishedToolCalls: List<AgentContextIndex.Turn.Tool>?, pendingToolCalls: List<@Serializable(with = UuidSerializer::class ) UUID>?)
Properties
Link copied to clipboard
这个字段承载刚刚完成的 LLM 请求,接下来如果未生成工具调用,轮次归档,变为 CompletedRound.finalAssistantMessage,如果生成了工具调用(即使无效或失败),assistantMessage 连同工具调用的请求和结果都将进入一个 Turn,assistantMessage / finishedToolCalls / pendingToolCalls 清空,并继续开始推理。
Link copied to clipboard
这个字段承载已完成的工具调用,此时仍有 pendingToolCalls 或正在进行的工具调用,无法创建 Turn。
Link copied to clipboard
这个字段承载校验通过、等待用户审批的工具调用,这里索引的 AgentMessage.Tool.Call 所有字段都必然非空,可在向用户展示后通过 io.github.autotweaker.api.adapter.Agent.approve 批准或拒绝。
Link copied to clipboard
用户发送的消息,参见 AgentMessage.User。