pub struct OllamaChatResponse {
pub message: OllamaMessageResponse,
pub prompt_eval_count: u32,
pub eval_count: u32,
pub total_duration: u64,
}Expand description
Response structure from Ollama chat API
This struct represents the response format from Ollama’s chat API endpoint. It’s made public to allow testing and direct parsing of Ollama responses.
Fields§
§message: OllamaMessageResponseThe message content from the model
prompt_eval_count: u32Number of tokens evaluated in the prompt (defaults to 0 if not present)
eval_count: u32Number of tokens generated in the response (defaults to 0 if not present)
total_duration: u64Total duration of the request in nanoseconds (defaults to 0 if not present)
Trait Implementations§
Source§impl Debug for OllamaChatResponse
impl Debug for OllamaChatResponse
Source§impl<'de> Deserialize<'de> for OllamaChatResponse
impl<'de> Deserialize<'de> for OllamaChatResponse
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
Auto Trait Implementations§
impl Freeze for OllamaChatResponse
impl RefUnwindSafe for OllamaChatResponse
impl Send for OllamaChatResponse
impl Sync for OllamaChatResponse
impl Unpin for OllamaChatResponse
impl UnwindSafe for OllamaChatResponse
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