pub struct BigRag { /* private fields */ }Expand description
The bigRAG client.
§Examples
use bigrag::BigRag;
let client = BigRag::new("http://localhost:6100", "sk-...");
let collections = client.collections().list(None).await?;Implementations§
Source§impl BigRag
impl BigRag
Sourcepub fn new(base_url: &str, api_key: &str) -> Self
pub fn new(base_url: &str, api_key: &str) -> Self
Create a new client with a base URL and API key.
Sourcepub fn from_env() -> Result<Self, BigRagError>
pub fn from_env() -> Result<Self, BigRagError>
Create a new client from environment variables.
Reads BIGRAG_BASE_URL (default: http://localhost:6100) and
BIGRAG_API_KEY (optional).
Sourcepub fn builder() -> BigRagBuilder
pub fn builder() -> BigRagBuilder
Create a builder for fine-grained configuration.
Sourcepub fn collections(&self) -> Collections<'_>
pub fn collections(&self) -> Collections<'_>
Access the collections resource.
Sourcepub fn collection(&self, name: &str) -> CollectionClient<'_>
pub fn collection(&self, name: &str) -> CollectionClient<'_>
Create a collection-scoped client for convenience.
Sourcepub async fn health(&self) -> Result<HealthResponse, BigRagError>
pub async fn health(&self) -> Result<HealthResponse, BigRagError>
Check API health.
Sourcepub async fn readiness(&self) -> Result<ReadinessResponse, BigRagError>
pub async fn readiness(&self) -> Result<ReadinessResponse, BigRagError>
Check API readiness (includes dependency health).
Sourcepub async fn stats(&self) -> Result<PlatformStatsResponse, BigRagError>
pub async fn stats(&self) -> Result<PlatformStatsResponse, BigRagError>
Get platform-wide statistics.
Sourcepub async fn embedding_models(
&self,
) -> Result<EmbeddingModelListResponse, BigRagError>
pub async fn embedding_models( &self, ) -> Result<EmbeddingModelListResponse, BigRagError>
List available embedding models.
Sourcepub async fn analytics(
&self,
collection: &str,
) -> Result<AnalyticsResponse, BigRagError>
pub async fn analytics( &self, collection: &str, ) -> Result<AnalyticsResponse, BigRagError>
Get analytics for a collection.
Auto Trait Implementations§
impl Freeze for BigRag
impl !RefUnwindSafe for BigRag
impl Send for BigRag
impl Sync for BigRag
impl Unpin for BigRag
impl UnsafeUnpin for BigRag
impl !UnwindSafe for BigRag
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more