- billing.rs: 修复参数传递 (model_id -> version_id) - billing.rs: 新增 BillingResult 枚举支持 InsufficientBalance 错误 - billing.rs: 实现级联扣费 (优先 project 余额,不足时 fallback 到 workspace) - billing.rs: 余额不足时创建系统消息并持久化 - chat/service.rs: 捕获 InsufficientBalance 错误并调用 create_system_message - client/mod.rs: 超时时间从 60s 改为 120s
46 lines
1.6 KiB
Rust
46 lines
1.6 KiB
Rust
pub mod agent;
|
|
pub mod billing;
|
|
pub mod chat;
|
|
pub mod client;
|
|
pub mod compact;
|
|
pub mod embed;
|
|
pub mod error;
|
|
pub mod model;
|
|
pub mod perception;
|
|
pub mod react;
|
|
pub mod skills;
|
|
pub mod sync;
|
|
pub mod task;
|
|
pub mod tokent;
|
|
pub mod tool;
|
|
pub use billing::{BillingRecord, BillingResult, record_ai_usage};
|
|
pub use sync::list_accessible_models;
|
|
pub use task::TaskService;
|
|
pub use tokent::{TokenUsage, resolve_usage};
|
|
pub use perception::{PerceptionService, SkillContext, SkillEntry, ToolCallEvent};
|
|
pub use skills::{
|
|
BuiltInSkill, SKILL_TEMPLATES, all_skill_slugs, all_skills,
|
|
get_skill, get_skill_by_tool, is_built_in_skill, match_skill_by_keyword, skills_by_category,
|
|
};
|
|
pub use chat::{
|
|
AiContextSenderType, AiRequest, AiStreamChunk, ChatService, Mention, RoomMessageContext,
|
|
StreamCallback,
|
|
};
|
|
pub use client::{AiCallResponse, AiClientConfig, call_with_params, call_with_retry};
|
|
pub use client::types::ChatRequestMessage;
|
|
pub use compact::{CompactConfig, CompactLevel, CompactService, CompactSummary, MessageSummary};
|
|
pub use embed::{
|
|
EmbedClient, EmbedMemoryInput, EmbedService, QdrantClient, SearchResult, TagEmbedInput, new_embed_client,
|
|
};
|
|
pub use error::{AgentError, Result};
|
|
pub use react::{ReactConfig, ReactStep, DEFAULT_SYSTEM_PROMPT};
|
|
pub use tool::{
|
|
ToolCall, ToolCallRecord, ToolCallRecorder, ToolCallResult, ToolContext, ToolDefinition, ToolError, ToolExecutor, ToolHandler, ToolParam,
|
|
ToolRegistry, ToolResult, ToolSchema,
|
|
};
|
|
|
|
#[cfg(feature = "rig")]
|
|
pub use agent::RigAgentService;
|
|
#[cfg(feature = "rig")]
|
|
pub use tool::{RigToolSet, RecordingTool, is_retryable_tool_error};
|