pub struct RequestReceipt {Show 22 fields
pub sender: String,
pub request_id: String,
pub service_id: String,
pub max_est_cost: u64,
pub timestamp: i64,
pub finish_reason: String,
pub prompt_tokens: u64,
pub completion_tokens: u64,
pub amount: u64,
pub token_mint: String,
pub model_name: String,
pub cache_discount: u64,
pub streamed: Option<bool>,
pub cancelled: Option<bool>,
pub latency: Option<i64>,
pub generation_time: Option<i64>,
pub moderation_latency: Option<i64>,
pub num_media_prompt: Option<u64>,
pub num_media_completion: Option<u64>,
pub num_search_results: Option<u64>,
pub app_id: Option<String>,
pub origin: Option<String>,
}Fields§
§sender: String§request_id: String§service_id: String§max_est_cost: u64§timestamp: i64§finish_reason: String§prompt_tokens: u64§completion_tokens: u64§amount: u64§token_mint: String§model_name: String§cache_discount: u64§streamed: Option<bool>§cancelled: Option<bool>§latency: Option<i64>§generation_time: Option<i64>§moderation_latency: Option<i64>§num_media_prompt: Option<u64>§num_media_completion: Option<u64>§num_search_results: Option<u64>§app_id: Option<String>§origin: Option<String>Implementations§
Source§impl RequestReceipt
impl RequestReceipt
pub fn new() -> Self
pub fn sender(self, sender: Pubkey) -> Self
pub fn request_id(self, request_id: Pubkey) -> Self
pub fn service_id(self, service_id: impl Into<String>) -> Self
pub fn max_est_cost(self, max_est_cost: u64) -> Self
pub fn timestamp(self, timestamp: i64) -> Self
pub fn finish_reason(self, finish_reason: impl Into<String>) -> Self
pub fn prompt_tokens(self, prompt_tokens: u64) -> Self
pub fn completion_tokens(self, completion_tokens: u64) -> Self
pub fn amount(self, amount: u64) -> Self
pub fn token_mint(self, token_mint: impl Into<String>) -> Self
pub fn model_name(self, model_name: impl Into<String>) -> Self
pub fn cache_discount(self, cache_discount: u64) -> Self
pub fn streamed(self, streamed: bool) -> Self
pub fn cancelled(self, cancelled: bool) -> Self
pub fn latency(self, latency: i64) -> Self
pub fn generation_time(self, generation_time: i64) -> Self
pub fn moderation_latency(self, moderation_latency: i64) -> Self
pub fn num_media_prompt(self, num_media_prompt: u64) -> Self
pub fn num_media_completion(self, num_media_completion: u64) -> Self
pub fn num_search_results(self, num_search_results: u64) -> Self
pub fn app_id(self, app_id: impl Into<String>) -> Self
pub fn origin(self, origin: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for RequestReceipt
impl Clone for RequestReceipt
Source§fn clone(&self) -> RequestReceipt
fn clone(&self) -> RequestReceipt
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 RequestReceipt
impl Debug for RequestReceipt
Source§impl Default for RequestReceipt
impl Default for RequestReceipt
Source§fn default() -> RequestReceipt
fn default() -> RequestReceipt
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RequestReceipt
impl<'de> Deserialize<'de> for RequestReceipt
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 RequestReceipt
impl RefUnwindSafe for RequestReceipt
impl Send for RequestReceipt
impl Sync for RequestReceipt
impl Unpin for RequestReceipt
impl UnwindSafe for RequestReceipt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more