objectiveai_sdk/agent/
response.rs1use serde::{Deserialize, Serialize};
4use schemars::JsonSchema;
5
6#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
8#[schemars(rename = "agent.ListAgentResponse")]
9pub struct ListAgentResponse {
10 pub data: Vec<ListAgentItem>,
12}
13
14pub type ListAgentItem = crate::RemotePath;
16
17#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
19#[schemars(rename = "agent.GetAgentResponse")]
20pub struct GetAgentResponse {
21 #[serde(flatten)]
22 #[schemars(schema_with = "crate::flatten_schema::<crate::RemotePath>")]
23 pub path: crate::RemotePath,
24 #[serde(flatten)]
26 #[schemars(schema_with = "crate::flatten_schema::<super::RemoteAgentWithFallbacks>")]
27 pub inner: super::RemoteAgentWithFallbacks,
28}
29
30#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
32#[schemars(rename = "agent.UsageAgentResponse")]
33pub struct UsageAgentResponse {
34 pub requests: u64,
36 pub completion_tokens: u64,
38 pub prompt_tokens: u64,
40 #[serde(deserialize_with = "crate::serde_util::decimal")]
42 #[schemars(with = "f64")]
43 pub total_cost: rust_decimal::Decimal,
44}