Skip to main content

ceres_client/
lib.rs

1//! Ceres Client - HTTP clients for external APIs
2//!
3//! This crate provides HTTP clients for interacting with:
4//!
5//! - [`ckan`] - CKAN open data portals
6//! - [`portal`] - Unified portal client factory (enum dispatch over portal types)
7//! - [`gemini`] - Google Gemini embeddings API
8//! - [`openai`] - OpenAI embeddings API
9//! - [`ollama`] - Ollama local embeddings
10//!
11//! # Overview
12//!
13//! The clients handle authentication, request building, response parsing,
14//! and error handling for their respective APIs.
15//!
16//! # Portal Clients
17//!
18//! Multiple portal types are supported via [`PortalClientEnum`]:
19//!
20//! | Portal Type | Status | API |
21//! |-------------|--------|-----|
22//! | CKAN | Supported | [CKAN API](https://docs.ckan.org/en/2.9/api/) |
23//! | DCAT-AP (udata REST) | Supported | [DCAT-AP](https://joinup.ec.europa.eu/collection/semantic-interoperability-community-semic/solution/dcat-application-profile-data-portals-europe) |
24//! | Socrata | Planned | [Socrata API](https://dev.socrata.com/) |
25//!
26//! # Embedding Providers
27//!
28//! Multiple embedding providers are supported:
29//!
30//! | Provider | Model | Dimensions |
31//! |----------|-------|------------|
32//! | Gemini | gemini-embedding-001 | 768 |
33//! | OpenAI | text-embedding-3-small | 1536 |
34//! | OpenAI | text-embedding-3-large | 3072 |
35//! | Ollama | nomic-embed-text | 768 |
36//! | Ollama | mxbai-embed-large | 1024 |
37
38pub mod ckan;
39pub mod dcat;
40pub mod gemini;
41pub mod ollama;
42pub mod openai;
43pub mod portal;
44pub mod provider;
45
46// Re-export main client types
47pub use ckan::{CkanClient, CkanClientFactory};
48pub use dcat::DcatClient;
49pub use gemini::GeminiClient;
50pub use ollama::OllamaClient;
51pub use openai::OpenAIClient;
52pub use portal::{PortalClientEnum, PortalClientFactoryEnum, PortalDataEnum};
53#[cfg(feature = "test-support")]
54pub use provider::MockEmbeddingClient;
55pub use provider::{EmbeddingConfig, EmbeddingProviderEnum};