pub enum OutputBody {
JsonResponse {
created_at: Option<i64>,
error: Option<JsonResponseError>,
id: Option<String>,
model: Option<String>,
object: Option<JsonResponseObject>,
output: Vec<Map<String, Value>>,
status: Option<JsonResponseStatus>,
usage: Option<JsonResponseUsage>,
},
SseEventStream(Vec<SseEventStreamItem>),
}Expand description
Response payload, either a JSON response object or an SSE event stream represented as an array of event objects.
Variants§
JsonResponse
Fields
§
error: Option<JsonResponseError>§
object: Option<JsonResponseObject>Object type.
§
status: Option<JsonResponseStatus>Response status.
§
usage: Option<JsonResponseUsage>SseEventStream(Vec<SseEventStreamItem>)
Trait Implementations§
Source§impl Clone for OutputBody
impl Clone for OutputBody
Source§impl Debug for OutputBody
impl Debug for OutputBody
Source§impl<'de> Deserialize<'de> for OutputBody
impl<'de> Deserialize<'de> for OutputBody
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<Vec<SseEventStreamItem>> for OutputBody
impl From<Vec<SseEventStreamItem>> for OutputBody
Source§fn from(value: Vec<SseEventStreamItem>) -> Self
fn from(value: Vec<SseEventStreamItem>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for OutputBody
impl Freeze for OutputBodywhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Map<String, Value>>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
PhantomData<SseEventStreamItem>: Freeze,
impl Move for OutputBody
impl RefUnwindSafe for OutputBody
impl Send for OutputBody
impl Sync for OutputBody
impl Unpin for OutputBody
impl UnsafeUnpin for OutputBodywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Map<String, Value>>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
PhantomData<SseEventStreamItem>: UnsafeUnpin,
impl UnwindSafe for OutputBody
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