Files
DevFlow/crates/df-ai-core/src/lib.rs
绝尘 2d6eff66a7 重构: 拆provider.rs df-ai-core核心类型(strategy核心库)
- 新建 df-ai-core/types.rs(221行): 13类型(CompletionRequest/ContentPart/ChatMessage/MessageRole/ToolDefinition/ToolCall/TokenUsage/StreamChunk/ToolCallDelta等) + now_millis_i64
- provider.rs 572→369: pub use crate::types::* re-export透明 + impl/LlmProvider trait保留
- lib.rs: pub mod types
主代兜底(独立 -p df-ai-core 避 df-ai anthropic_compat 其他会话E0599): cargo check 0 + test 24
strategy: 核心库自底向上, 纯类型抽离, re-export稳定(df_ai::provider::* 与 df_ai_core::provider::限定路径双通, df-ideas印证)
git add指定(df-ai-core/*)
核心库拆分完整: context/anthropic/openai/scan/model_fetch/migrations/executor/model_probe/provider 八大文件
2026-06-19 04:57:13 +08:00

14 lines
529 B
Rust
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//! df-ai-core: LLM Provider trait + AI 数据结构(轻量 crate零 HTTP 依赖)
//!
//! 从 df-ai 下沉的全局 AI 接入标准。df-ai 保留 HTTP impl 与业务逻辑
//! ContextManager / AiToolRegistry / build_provider 等),通过 re-export
//! 保持 `df_ai::provider::*` 路径不变。df-ideas 等轻消费方直接依赖本 crate
//! 的 trait 即可接 LLM不引入 reqwest / eventsource-stream 等重依赖。
pub mod model;
pub mod provider;
pub mod types;
pub use model::*;
pub use provider::*;