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//! | DCAT-AP (SPARQL) | Supported | SPARQL endpoint with DCAT vocabulary |
25//! | Socrata | Planned | [Socrata API](https://dev.socrata.com/) |
26//!
27//! # Embedding Providers
28//!
29//! Multiple embedding providers are supported:
30//!
31//! | Provider | Model | Dimensions |
32//! |----------|-------|------------|
33//! | Gemini | gemini-embedding-001 | 768 |
34//! | OpenAI | text-embedding-3-small | 1536 |
35//! | OpenAI | text-embedding-3-large | 3072 |
36//! | Ollama | nomic-embed-text | 768 |
37//! | Ollama | mxbai-embed-large | 1024 |
38
39pub mod ckan;
40pub mod dcat;
41pub mod gemini;
42pub mod ollama;
43pub mod openai;
44pub mod portal;
45pub mod provider;
46pub mod sparql;
47
48// Re-export main client types
49pub use ckan::{CkanClient, CkanClientFactory};
50pub use dcat::DcatClient;
51pub use gemini::GeminiClient;
52pub use ollama::OllamaClient;
53pub use openai::OpenAIClient;
54pub use portal::{PortalClientEnum, PortalClientFactoryEnum, PortalDataEnum};
55#[cfg(feature = "test-support")]
56pub use provider::MockEmbeddingClient;
57pub use provider::{EmbeddingConfig, EmbeddingProviderEnum};
58pub use sparql::SparqlDcatClient;