pub struct LlmOutput {
pub message: Option<ChatMessage>,
pub usage: Option<u32>,
}Fields§
§message: Option<ChatMessage>§usage: Option<u32>Implementations§
Source§impl LlmOutput
impl LlmOutput
pub fn get_message(&self) -> Option<&ChatMessage>
pub fn get_content(&self) -> &str
pub fn get_usage(&self) -> Option<u32>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LlmOutput
impl<'de> Deserialize<'de> for LlmOutput
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<OpenAiChatResponse> for LlmOutput
impl From<OpenAiChatResponse> for LlmOutput
Source§fn from(response: OpenAiChatResponse) -> Self
fn from(response: OpenAiChatResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LlmOutput
impl RefUnwindSafe for LlmOutput
impl Send for LlmOutput
impl Sync for LlmOutput
impl Unpin for LlmOutput
impl UnwindSafe for LlmOutput
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