pub enum FormatSetting {
String(String),
Schema(Value),
}Expand description
Format setting for generate requests
Controls the output format of the model response. Can be a string (like “json”) or a JSON schema object.
§Examples
use ollama_oxide::FormatSetting;
let json = FormatSetting::json();
let schema = FormatSetting::schema(serde_json::json!({
"type": "object",
"properties": { "name": { "type": "string" } }
}));Variants§
String(String)
Simple format string (e.g., “json”)
Schema(Value)
JSON schema object for structured output
Implementations§
Trait Implementations§
Source§impl Clone for FormatSetting
impl Clone for FormatSetting
Source§fn clone(&self) -> FormatSetting
fn clone(&self) -> FormatSetting
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 FormatSetting
impl Debug for FormatSetting
Source§impl<'de> Deserialize<'de> for FormatSetting
impl<'de> Deserialize<'de> for FormatSetting
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<&str> for FormatSetting
impl From<&str> for FormatSetting
Source§impl From<Value> for FormatSetting
impl From<Value> for FormatSetting
Source§impl PartialEq for FormatSetting
impl PartialEq for FormatSetting
Source§impl Serialize for FormatSetting
impl Serialize for FormatSetting
impl StructuralPartialEq for FormatSetting
Auto Trait Implementations§
impl Freeze for FormatSetting
impl RefUnwindSafe for FormatSetting
impl Send for FormatSetting
impl Sync for FormatSetting
impl Unpin for FormatSetting
impl UnsafeUnpin for FormatSetting
impl UnwindSafe for FormatSetting
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