#[non_exhaustive]pub struct CreateThreadAndRunRequestBuilder { /* private fields */ }Expand description
EN: Builder for create-thread-and-run requests. 中文:创建线程并运行请求的构建器。
Implementations§
Source§impl CreateThreadAndRunRequestBuilder
impl CreateThreadAndRunRequestBuilder
Sourcepub fn assistant_id(self, assistant_id: impl Into<String>) -> Self
pub fn assistant_id(self, assistant_id: impl Into<String>) -> Self
EN: Sets the Assistant id. 中文:设置 Assistant ID。
Sourcepub fn thread(self, thread: Value) -> Self
pub fn thread(self, thread: Value) -> Self
EN: Sets the thread descriptor to create. 中文:设置要创建的线程描述。
Sourcepub fn model(self, model: impl Into<String>) -> Self
pub fn model(self, model: impl Into<String>) -> Self
EN: Sets an optional model override. 中文:设置可选模型覆盖值。
Sourcepub fn instructions(self, instructions: impl Into<String>) -> Self
pub fn instructions(self, instructions: impl Into<String>) -> Self
EN: Sets optional run instructions. 中文:设置可选 Run 指令。
Sourcepub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> Self
EN: Adds a metadata key/value pair. 中文:添加一个元数据键值对。
Sourcepub fn extra(self, name: impl Into<String>, value: Value) -> Self
pub fn extra(self, name: impl Into<String>, value: Value) -> Self
EN: Adds a forward-compatible JSON field. 中文:添加前向兼容的 JSON 字段。
Sourcepub fn build(self) -> Result<CreateThreadAndRunRequest, LingerError>
pub fn build(self) -> Result<CreateThreadAndRunRequest, LingerError>
EN: Builds and validates the request. 中文:构建并校验请求。
Trait Implementations§
Source§impl Clone for CreateThreadAndRunRequestBuilder
impl Clone for CreateThreadAndRunRequestBuilder
Source§fn clone(&self) -> CreateThreadAndRunRequestBuilder
fn clone(&self) -> CreateThreadAndRunRequestBuilder
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 Default for CreateThreadAndRunRequestBuilder
impl Default for CreateThreadAndRunRequestBuilder
Source§fn default() -> CreateThreadAndRunRequestBuilder
fn default() -> CreateThreadAndRunRequestBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreateThreadAndRunRequestBuilder
impl RefUnwindSafe for CreateThreadAndRunRequestBuilder
impl Send for CreateThreadAndRunRequestBuilder
impl Sync for CreateThreadAndRunRequestBuilder
impl Unpin for CreateThreadAndRunRequestBuilder
impl UnsafeUnpin for CreateThreadAndRunRequestBuilder
impl UnwindSafe for CreateThreadAndRunRequestBuilder
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