Skip to main content

Crate robit_ai

Crate robit_ai 

Source
Expand description

robit-ai: LLM API layer for the Robit framework.

Provides a unified LlmClient for interacting with multiple LLM providers through the OpenAI-compatible protocol. Configuration is loaded from .robit/config.toml (project-local) or ~/.robit/config.toml (global).

Re-exports§

pub use client::LlmClient;
pub use config::load_config;
pub use config::load_env;
pub use config::AppConfig;
pub use config::BotConfig;
pub use config::ChannelsConfig;
pub use config::ConfirmKeywordsConfig;
pub use config::ContextConfig;
pub use config::ModelConfig;
pub use config::ProviderConfig;
pub use config::QqBotConfig;
pub use config::ResolvedModel;
pub use config::RetryConfig;
pub use config::RobitConfig;
pub use error::LlmError;

Modules§

client
LlmClient: a thin wrapper around async-openai with unified config support.
config
Configuration loading for config.toml.
error
Error types for the robit-ai crate.

Structs§

ChatCompletionMessageToolCall
ChatCompletionRequestAssistantMessage
ChatCompletionRequestMessageContentPartImage
ChatCompletionRequestMessageContentPartText
ChatCompletionRequestSystemMessage
ChatCompletionRequestUserMessage
CompletionUsage
Usage statistics for the completion request.
CreateChatCompletionResponse
Represents a chat completion response returned by model, based on the provided input.
CreateChatCompletionStreamResponse
Represents a streamed chunk of a chat completion response returned by the model, based on the provided input. Learn more.

Enums§

ChatCompletionRequestMessage
ChatCompletionRequestUserMessageContent
ChatCompletionRequestUserMessageContentPart
ChatCompletionTools
Role

Type Aliases§

ChatCompletionResponseStream
Parsed server side events stream until an [DONE] is received from server.