reasoninglayer 0.1.1

Rust client SDK for the Reasoning Layer API
Documentation
//! Ontology generation (multi-turn clarification).

use crate::error::Error;
use crate::http::HttpClient;
use crate::types::common::RequestOptions;
use crate::types::ontology::{GenerateOntologyRequest, GenerateOntologyResponse};

#[derive(Debug, Clone)]
pub struct OntologyClient {
    http: HttpClient,
}

impl OntologyClient {
    pub(crate) fn new(http: HttpClient) -> Self {
        Self { http }
    }

    /// Generate an ontology from a natural language task description.
    pub async fn generate(
        &self,
        request: GenerateOntologyRequest,
        options: Option<&RequestOptions>,
    ) -> Result<GenerateOntologyResponse, Error> {
        self.http
            .post("/ontology/generate", &request, options)
            .await
    }
}