25 lines
647 B
Rust
25 lines
647 B
Rust
use async_trait::async_trait;
|
|
|
|
/// Trait for entities that can be embedded as vectors into Qdrant.
|
|
#[async_trait]
|
|
pub trait Embeddable {
|
|
fn entity_type(&self) -> &'static str;
|
|
fn to_text(&self) -> String;
|
|
fn entity_id(&self) -> String;
|
|
}
|
|
|
|
/// Input struct for batch memory embedding into per-room Qdrant collections.
|
|
#[derive(Debug, Clone)]
|
|
pub struct EmbedMemoryInput {
|
|
pub message_id: String,
|
|
pub seq: i64,
|
|
pub content: String,
|
|
pub project_name: String,
|
|
pub room_id: String,
|
|
pub user_id: Option<String>,
|
|
pub sender_type: String,
|
|
}
|
|
|
|
/// Input struct for batch tag embedding.
|
|
pub use models::TagEmbedInput;
|