rag_toolchain/clients/
mod.rs

1/// # Clients
2/// This module will contain all of the client code for different services
3/// that can be used to interact with Gen AI models.
4#[cfg(feature = "openai")]
5mod open_ai;
6
7#[cfg(feature = "anthropic")]
8mod anthropic;
9
10mod traits;
11mod types;
12
13#[cfg(feature = "openai")]
14pub use self::open_ai::{
15    CompletionStreamValue, OpenAIChatCompletionClient, OpenAICompletionStream,
16    OpenAIEmbeddingClient, OpenAIError, OpenAIModel,
17};
18
19#[cfg(feature = "anthropic")]
20pub use self::anthropic::{AnthropicChatCompletionClient, AnthropicError, AnthropicModel};
21
22pub use self::traits::{
23    AsyncChatClient, AsyncEmbeddingClient, AsyncStreamedChatClient, ChatCompletionStream,
24};
25pub use self::types::PromptMessage;
26
27// Export the trait mocks for use in testing
28#[cfg(test)]
29pub use traits::{MockAsyncChatClient, MockAsyncStreamedChatClient, MockChatCompletionStream};