reasoninglayer 0.2.1

Rust client SDK for the Reasoning Layer API
Documentation
//! Evidence-grounded document generation.

use crate::error::Error;
use crate::http::HttpClient;
use crate::types::common::RequestOptions;
use crate::types::generation::{GenerateDocumentRequest, GenerateDocumentResponse};

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

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

    /// Run the evidence-grounded generation pipeline for a root term.
    pub async fn generate_document(
        &self,
        request: GenerateDocumentRequest,
        options: Option<&RequestOptions>,
    ) -> Result<GenerateDocumentResponse, Error> {
        self.http
            .post("/generation/document", &request, options)
            .await
    }
}