objectiveai_sdk/agent/
response.rs1use schemars::JsonSchema;
4use serde::{Deserialize, Serialize};
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, PartialEq, 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(
27 schema_with = "crate::flatten_schema::<super::RemoteAgentWithFallbacks>"
28 )]
29 pub inner: super::RemoteAgentWithFallbacks,
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
34#[schemars(rename = "agent.UsageAgentResponse")]
35pub struct UsageAgentResponse {
36 pub requests: u64,
38 pub completion_tokens: u64,
40 pub prompt_tokens: u64,
42 #[serde(deserialize_with = "crate::serde_util::decimal")]
44 #[schemars(with = "f64")]
45 pub total_cost: rust_decimal::Decimal,
46}