- 删除 6 个手写 provider 文件、LlmProvider trait、动态分发、HTTP 客户端工厂与门面死代码 - llm 模块收敛为 rig 门面 + 提示词/解析/思考状态四个模块 - 移除 reqwest(0.12) 与 async-trait 直接依赖(futures-util 由流式消费保留) - 依赖树确认无 rig-agent/fastembed/lancedb/milvus 等组件
15 lines
375 B
Rust
15 lines
375 B
Rust
pub mod parsing;
|
|
pub mod prompts;
|
|
pub mod rig;
|
|
pub mod thinking;
|
|
|
|
pub use parsing::GeneratedCommit;
|
|
|
|
use anyhow::Result;
|
|
|
|
/// Test LLM connection
|
|
pub async fn test_connection(manager: &crate::config::manager::ConfigManager) -> Result<String> {
|
|
let client = crate::llm::rig::LlmClient::from_config(manager).await?;
|
|
client.generate(None, "Say 'Hello, World!'").await
|
|
}
|