#[non_exhaustive]pub enum ResponseTextFormat {
Text,
JsonObject,
JsonSchema {
name: String,
schema: Value,
description: Option<String>,
strict: Option<bool>,
},
}Expand description
EN: Text output format configuration. 中文:文本输出格式配置。
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text
EN: Plain text output. 中文:纯文本输出。
JsonObject
EN: JSON object output. 中文:JSON 对象输出。
JsonSchema
EN: JSON Schema structured output. 中文:JSON Schema 结构化输出。
Fields
Implementations§
Source§impl ResponseTextFormat
impl ResponseTextFormat
Sourcepub fn json_schema(
name: impl Into<String>,
schema: Value,
) -> ResponseTextJsonSchemaFormat
pub fn json_schema( name: impl Into<String>, schema: Value, ) -> ResponseTextJsonSchemaFormat
EN: Starts a JSON Schema text format configuration. 中文:开始构建 JSON Schema 文本格式配置。
Trait Implementations§
Source§impl Clone for ResponseTextFormat
impl Clone for ResponseTextFormat
Source§fn clone(&self) -> ResponseTextFormat
fn clone(&self) -> ResponseTextFormat
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 ResponseTextFormat
impl Debug for ResponseTextFormat
Source§impl From<ResponseTextJsonSchemaFormat> for ResponseTextFormat
impl From<ResponseTextJsonSchemaFormat> for ResponseTextFormat
Source§fn from(format: ResponseTextJsonSchemaFormat) -> Self
fn from(format: ResponseTextJsonSchemaFormat) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ResponseTextFormat
impl PartialEq for ResponseTextFormat
Source§fn eq(&self, other: &ResponseTextFormat) -> bool
fn eq(&self, other: &ResponseTextFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ResponseTextFormat
impl Serialize for ResponseTextFormat
impl StructuralPartialEq for ResponseTextFormat
Auto Trait Implementations§
impl Freeze for ResponseTextFormat
impl RefUnwindSafe for ResponseTextFormat
impl Send for ResponseTextFormat
impl Sync for ResponseTextFormat
impl Unpin for ResponseTextFormat
impl UnsafeUnpin for ResponseTextFormat
impl UnwindSafe for ResponseTextFormat
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