pub struct TurnStartParams { /* private fields */ }Expand description
Parameters for turn/start.
The thread and the input are required. The other fields override the
thread’s settings for this turn and, per the protocol, later ones. Fields
this type does not name can be set with param.
Implementations§
Source§impl TurnStartParams
impl TurnStartParams
Sourcepub fn new(thread_id: impl Into<String>, input: Vec<UserInput>) -> Self
pub fn new(thread_id: impl Into<String>, input: Vec<UserInput>) -> Self
A turn on thread_id with the given input.
Sourcepub fn text(thread_id: impl Into<String>, prompt: impl Into<String>) -> Self
pub fn text(thread_id: impl Into<String>, prompt: impl Into<String>) -> Self
A turn on thread_id whose input is one text prompt.
Sourcepub fn effort(self, effort: impl Into<String>) -> Self
pub fn effort(self, effort: impl Into<String>) -> Self
The reasoning effort for this turn. The valid values depend on the model, so this is a string.
Sourcepub fn output_schema(self, schema: Value) -> Self
pub fn output_schema(self, schema: Value) -> Self
A JSON Schema the final message must follow.
Sourcepub fn approval_policy(self, policy: ApprovalPolicy) -> Self
pub fn approval_policy(self, policy: ApprovalPolicy) -> Self
When the server asks before running a command or applying a change.
Trait Implementations§
Source§impl Clone for TurnStartParams
impl Clone for TurnStartParams
Source§impl Debug for TurnStartParams
impl Debug for TurnStartParams
Auto Trait Implementations§
impl Freeze for TurnStartParams
impl RefUnwindSafe for TurnStartParams
impl Send for TurnStartParams
impl Sync for TurnStartParams
impl Unpin for TurnStartParams
impl UnsafeUnpin for TurnStartParams
impl UnwindSafe for TurnStartParams
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