Add Maritime/Logistics support assistant with safety/eval layer

This commit is contained in:
majid
2026-09-19 18:01:28 +02:00
parent 93e92a1210
commit 6b737a3295
58 changed files with 7570 additions and 69 deletions
+16
View File
@@ -0,0 +1,16 @@
//! Turns a Rust type into the JSON Schema object Anthropic expects as a
//! tool's `input_schema`.
use schemars::{schema_for, JsonSchema};
use serde_json::Value;
pub fn schema_value<T: JsonSchema>() -> Value {
let mut value = schema_for!(T).as_value().clone();
if let Some(object) = value.as_object_mut() {
// Anthropic's tool schema validator doesn't need (and can be
// confused by) the JSON-Schema-dialect metadata schemars adds.
object.remove("$schema");
object.remove("title");
}
value
}