pub struct ResponseCreateRequestBuilder { /* private fields */ }Expand description
表示 Responses 创建构建器。
Implementations§
Source§impl ResponseCreateRequestBuilder
impl ResponseCreateRequestBuilder
Sourcepub fn input_text(self, input: impl Into<String>) -> Self
pub fn input_text(self, input: impl Into<String>) -> Self
直接设置输入文本。
Sourcepub fn input_items(self, items: Vec<ResponseInputItemPayload>) -> Self
pub fn input_items(self, items: Vec<ResponseInputItemPayload>) -> Self
设置输入项数组。
Sourcepub fn input(self, input: impl Into<ResponseInputPayload>) -> Self
pub fn input(self, input: impl Into<ResponseInputPayload>) -> Self
直接设置输入载荷。
Sourcepub fn temperature(self, temperature: f32) -> Self
pub fn temperature(self, temperature: f32) -> Self
设置温度。
Sourcepub fn tool(self, tool: ChatToolDefinition) -> Self
pub fn tool(self, tool: ChatToolDefinition) -> Self
追加工具定义。
Sourcepub fn extra_body(
self,
key: impl Into<String>,
value: impl Into<JsonPayload>,
) -> Self
pub fn extra_body( self, key: impl Into<String>, value: impl Into<JsonPayload>, ) -> Self
追加请求体字段。
Sourcepub fn provider_option(
self,
key: impl Into<String>,
value: impl Into<JsonPayload>,
) -> Self
pub fn provider_option( self, key: impl Into<String>, value: impl Into<JsonPayload>, ) -> Self
追加 provider 选项。
Sourcepub fn extra_header(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn extra_header( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
添加额外请求头。
Sourcepub fn extra_query(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn extra_query( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
添加额外查询参数。
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
覆盖最大重试次数。
Sourcepub fn cancellation_token(self, token: CancellationToken) -> Self
pub fn cancellation_token(self, token: CancellationToken) -> Self
设置取消令牌。
Sourcepub async fn send_with_meta(self) -> Result<ApiResponse<Response>>
pub async fn send_with_meta(self) -> Result<ApiResponse<Response>>
Trait Implementations§
Source§impl Clone for ResponseCreateRequestBuilder
impl Clone for ResponseCreateRequestBuilder
Source§fn clone(&self) -> ResponseCreateRequestBuilder
fn clone(&self) -> ResponseCreateRequestBuilder
Returns a duplicate of the value. Read more
1.0.0 · 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 ResponseCreateRequestBuilder
impl Debug for ResponseCreateRequestBuilder
Source§impl Default for ResponseCreateRequestBuilder
impl Default for ResponseCreateRequestBuilder
Source§fn default() -> ResponseCreateRequestBuilder
fn default() -> ResponseCreateRequestBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResponseCreateRequestBuilder
impl !RefUnwindSafe for ResponseCreateRequestBuilder
impl Send for ResponseCreateRequestBuilder
impl Sync for ResponseCreateRequestBuilder
impl Unpin for ResponseCreateRequestBuilder
impl UnsafeUnpin for ResponseCreateRequestBuilder
impl !UnwindSafe for ResponseCreateRequestBuilder
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