use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq)]
pub struct Entity {
pub name: String,
#[serde(rename = "entityType")]
pub entity_type: String,
pub observations: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq)]
pub struct Relation {
pub from: String,
pub to: String,
#[serde(rename = "relationType")]
pub relation_type: String,
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct KnowledgeGraph {
pub entities: Vec<Entity>,
pub relations: Vec<Relation>,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct ObservationInput {
#[serde(rename = "entityName")]
pub entity_name: String,
pub contents: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct ObservationResult {
#[serde(rename = "entityName")]
pub entity_name: String,
#[serde(rename = "addedObservations")]
pub added_observations: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct ObservationDeletion {
#[serde(rename = "entityName")]
pub entity_name: String,
pub observations: Vec<String>,
}