pub struct ScriptedTurn {
pub text: Option<String>,
pub tool_calls: Vec<ScriptedToolCall>,
}Expand description
A pre-scripted turn that the ScriptedLlm will return.
Each turn represents one complete LLM response. It can contain text content, tool calls, or both — mirroring real LLM behavior where a response may include reasoning text followed by tool invocations.
§Wire Format
Serializes to/from JSON for use in fixture files:
{
"text": "Let me search for that.",
"tool_calls": [
{ "name": "web_search", "input": {"query": "rust"}, "id": "tc_001" }
]
}Fields§
§text: Option<String>Text response content (if any).
tool_calls: Vec<ScriptedToolCall>Tool calls to make (if any).
Trait Implementations§
Source§impl Clone for ScriptedTurn
impl Clone for ScriptedTurn
Source§fn clone(&self) -> ScriptedTurn
fn clone(&self) -> ScriptedTurn
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 ScriptedTurn
impl Debug for ScriptedTurn
Source§impl<'de> Deserialize<'de> for ScriptedTurn
impl<'de> Deserialize<'de> for ScriptedTurn
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 ScriptedTurn
impl RefUnwindSafe for ScriptedTurn
impl Send for ScriptedTurn
impl Sync for ScriptedTurn
impl Unpin for ScriptedTurn
impl UnsafeUnpin for ScriptedTurn
impl UnwindSafe for ScriptedTurn
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