objectiveai-sdk 2.1.0

ObjectiveAI SDK, definitions, and utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! `ToolMessageLog` — on-disk shape of [`super::ToolMessage`].
//! `content` is replaced by [`super::RichContentLog`] (extracted-to-files);
//! tool_call_id + metadata stay inline.

use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

use super::{RichContentLog, ToolResponseMetadata};

#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[schemars(rename = "agent.completions.message.ToolMessageLog")]
pub struct ToolMessageLog {
    pub content: RichContentLog,
    pub tool_call_id: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    #[schemars(extend("omitempty" = true))]
    pub metadata: Option<ToolResponseMetadata>,
}