Expand description
§wabot-feature-chat-bot
Rust port of wabot-ts/src/feature/chat-bot. Owns the canonical
Chat / ChatConnection / ChatMessage data types (Phase 4
relocation: previously in wabot-feature-chat-controller), the
ChatMemory + ChatAdapter traits, and the ChatBot
orchestrator that wires a mindset to an LLM provider.
Phase 4a wires the framework end-to-end with the Anthropic adapter
(wabot-addon-chat-bot-anthropic). Subsequent sessions add OpenAI /
Google / DeepSeek / OpenRouter adapters under the same trait.
Re-exports§
pub use adapter::ChatAdapter;pub use adapter::ChatAdapterError;pub use adapter::ChatAdapterRequest;pub use adapter::ChatAdapterResponse;pub use adapter::LanguageModelUsage;pub use adapter::ModelRef;pub use adapter::ToolDefinition;pub use adapter::ToolParameter;pub use attachments::analyzable_documents;pub use attachments::analyzable_images;pub use attachments::extract_chat_message_text;pub use attachments::file_url;pub use attachments::is_chat_message_empty;pub use attachments::SupportedMedia;pub use audio::register_synthesizer;pub use audio::register_transcriber;pub use audio::union_synthesizer;pub use audio::union_transcriber;pub use audio::AudioAdapterRegistry;pub use audio::AudioError;pub use audio::AudioFormat;pub use audio::AudioSource;pub use audio::AudioSpeechSynthesizer;pub use audio::AudioTranscriber;pub use audio::Speech;pub use audio::SynthesizeRequest;pub use audio::TranscribeRequest;pub use audio::Transcription;pub use bot::BotReplyFn;pub use bot::ChatBot;pub use bot::ChatBotError;pub use bot::DEFAULT_HISTORY_WINDOW;pub use chat::chat_from_connection;pub use chat::fresh_chat_id;pub use chat::Chat;pub use chat::ChatData;pub use chat::ChatRepository;pub use chat::ChatResolver;pub use chat::InMemoryChatRepository;pub use chat_item::ChatItem;pub use chat_item::FunctionCall;pub use memory::ChatMemory;pub use memory::InMemoryChatMemory;pub use types::ChatConnection;pub use types::ChatMessage;pub use types::ChatMessageFile;pub use types::ChatType;pub use async_trait;
Modules§
- adapter
ChatAdapter— what every LLM addon implements. MirrorsIChatAdapter/IChatAdapterNextItemsReq/IChatAdapterNextItemsResin TS.- attachments
- What an adapter does with an image or a document. Port of
extractChatMessageTextin wabot-ts. - audio
- Voice in, voice out. Port of
IAudioTranscriber,IAudioSpeechSynthesizer,AudioAdapterRegistryand the twoUnion*adapters in wabot-ts. - bot
ChatBotorchestrator — mirrorsChatBot.processLoopin TS.- chat
- Chat entity + in-memory ChatRepository + ChatResolver.
- chat_
item ChatItem— one entry in a chat’s memory. MirrorsIChatItem(IBotMessageItem | IHumanMessageItem | IFunctionCallItem) and theChatItemEntity class from TS.- memory
ChatMemory— append-and-tail-read storage forChatItems, per chat. MirrorsChatMemory/IChatMemoryin TS.- types
- Connection + message data types shared by every chat surface.