Files
nazarick-private/crates/lyra/src/lib.rs
T
Sithies b6a5618f78
CI / check (push) Successful in 3m13s
CI / test (push) Successful in 3m53s
CI / clippy (push) Failing after 3m15s
CI / deploy (push) Has been skipped
Fix
2026-04-25 18:59:24 +02:00

39 lines
1.0 KiB
Rust

use std::sync::Arc;
use nazarick_core::agent::base::{AgentConfig, BaseAgent};
use nazarick_core::agent::skill_registry::SkillRegistry;
use nazarick_core::memory::Memory;
use nazarick_core::summarizer::Summarizer;
use nazarick_core::traits::Agent;
use nazarick_core::types::AgentId;
use nazarick_core::llm::LlmProvider;
pub struct Lyra {
base: BaseAgent,
}
impl Lyra {
pub fn new(
config: AgentConfig,
llm: Box<dyn LlmProvider>,
registry: Arc<SkillRegistry>,
memory: Arc<dyn Memory>,
summarizer: Arc<dyn Summarizer>,
) -> Self {
Self {
base: BaseAgent::new(config, llm, registry, memory, summarizer),
}
}
pub async fn init(&mut self) -> nazarick_core::types::Result<()> {
self.base.init().await
}
pub async fn chat(&mut self, user_message: &str) -> nazarick_core::types::Result<String> {
self.base.chat(user_message).await
}
}
impl Agent for Lyra {
fn id(&self) -> AgentId { self.base.id }
fn name(&self) -> &str { "Lyra" }
}