use crate::functions;
use serde::{Deserialize, Serialize};
use schemars::JsonSchema;
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "functions.ListFunctionResponse")]
pub struct ListFunctionResponse {
pub data: Vec<ListFunctionItem>,
}
pub type ListFunctionItem = crate::RemotePath;
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "functions.GetFunctionResponse")]
pub struct GetFunctionResponse {
#[serde(flatten)]
#[schemars(schema_with = "crate::flatten_schema::<crate::RemotePath>")]
pub path: crate::RemotePath,
#[serde(flatten)]
#[schemars(schema_with = "crate::flatten_schema::<functions::FullRemoteFunction>")]
pub inner: functions::FullRemoteFunction,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "functions.UsageFunctionResponse")]
pub struct UsageFunctionResponse {
pub requests: u64,
pub completion_tokens: u64,
pub prompt_tokens: u64,
#[serde(deserialize_with = "crate::serde_util::decimal")]
#[schemars(with = "f64")]
pub total_cost: rust_decimal::Decimal,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "functions.ListFunctionProfilePairResponse")]
pub struct ListFunctionProfilePairResponse {
pub data: Vec<ListFunctionProfilePairItem>,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "functions.ListFunctionProfilePairItem")]
pub struct ListFunctionProfilePairItem {
pub function: ListFunctionItem,
pub profile: functions::profiles::response::ListProfileItem,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "functions.GetFunctionProfilePairResponse")]
pub struct GetFunctionProfilePairResponse {
pub function: GetFunctionResponse,
pub profile: functions::profiles::response::GetProfileResponse,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "functions.UsageFunctionProfilePairResponse")]
pub struct UsageFunctionProfilePairResponse {
pub requests: u64,
pub completion_tokens: u64,
pub prompt_tokens: u64,
#[serde(deserialize_with = "crate::serde_util::decimal")]
#[schemars(with = "f64")]
pub total_cost: rust_decimal::Decimal,
}