pub struct RecordedExchange {
pub messages: Vec<Message>,
pub response: LLMResult,
pub tools: Option<Vec<ToolDefinition>>,
}Expand description
一次录制的请求/响应对,序列化为 JSONL 一行。
Fields§
§messages: Vec<Message>请求(含 system/user/assistant/tool 历史)。
response: LLMResult完整响应。
tools: Option<Vec<ToolDefinition>>请求侧绑定的工具定义(bind_tools 绑定后非空)。
#[serde(default)] 让旧 fixture(无 tools 字段)读成 None,零改动兼容;
skip_serializing_if 让未绑定工具的录播文件保持旧格式。
Trait Implementations§
Source§impl Clone for RecordedExchange
impl Clone for RecordedExchange
Source§fn clone(&self) -> RecordedExchange
fn clone(&self) -> RecordedExchange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecordedExchange
impl Debug for RecordedExchange
Source§impl<'de> Deserialize<'de> for RecordedExchange
impl<'de> Deserialize<'de> for RecordedExchange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RecordedExchange
impl RefUnwindSafe for RecordedExchange
impl Send for RecordedExchange
impl Sync for RecordedExchange
impl Unpin for RecordedExchange
impl UnsafeUnpin for RecordedExchange
impl UnwindSafe for RecordedExchange
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more