pub enum CreateChatCompletionRequestResponseFormat {
Text(ResponseFormatText),
JsonSchema(ResponseFormatJsonSchema),
JsonObject(ResponseFormatJsonObject),
}Expand description
An object specifying the format that the model must output. Setting to { "type": "json_schema", "json_schema": {...} } enables Structured Outputs which guarantees the model will match your supplied JSON schema. Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON.
JSON schema
{
"description": "An object specifying the format that the model must output. Setting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which guarantees the model will match your supplied JSON schema. Setting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which ensures the message the model generates is valid JSON.\n",
"oneOf": [
{
"$ref": "#/definitions/ResponseFormatText"
},
{
"$ref": "#/definitions/ResponseFormatJsonSchema"
},
{
"$ref": "#/definitions/ResponseFormatJsonObject"
}
]
}Variants§
Trait Implementations§
Source§impl Clone for CreateChatCompletionRequestResponseFormat
impl Clone for CreateChatCompletionRequestResponseFormat
Source§fn clone(&self) -> CreateChatCompletionRequestResponseFormat
fn clone(&self) -> CreateChatCompletionRequestResponseFormat
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<'de> Deserialize<'de> for CreateChatCompletionRequestResponseFormat
impl<'de> Deserialize<'de> for CreateChatCompletionRequestResponseFormat
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
Source§impl From<ResponseFormatJsonObject> for CreateChatCompletionRequestResponseFormat
impl From<ResponseFormatJsonObject> for CreateChatCompletionRequestResponseFormat
Source§fn from(value: ResponseFormatJsonObject) -> Self
fn from(value: ResponseFormatJsonObject) -> Self
Converts to this type from the input type.
Source§impl From<ResponseFormatJsonSchema> for CreateChatCompletionRequestResponseFormat
impl From<ResponseFormatJsonSchema> for CreateChatCompletionRequestResponseFormat
Source§fn from(value: ResponseFormatJsonSchema) -> Self
fn from(value: ResponseFormatJsonSchema) -> Self
Converts to this type from the input type.
Source§impl From<ResponseFormatText> for CreateChatCompletionRequestResponseFormat
impl From<ResponseFormatText> for CreateChatCompletionRequestResponseFormat
Source§fn from(value: ResponseFormatText) -> Self
fn from(value: ResponseFormatText) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CreateChatCompletionRequestResponseFormat
impl RefUnwindSafe for CreateChatCompletionRequestResponseFormat
impl Send for CreateChatCompletionRequestResponseFormat
impl Sync for CreateChatCompletionRequestResponseFormat
impl Unpin for CreateChatCompletionRequestResponseFormat
impl UnsafeUnpin for CreateChatCompletionRequestResponseFormat
impl UnwindSafe for CreateChatCompletionRequestResponseFormat
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