reasoninglayer 1.0.3

Rust client SDK for the Reasoning Layer API
Documentation
//! Knowledge graph context assembly.

use crate::error::Error;
use crate::http::HttpClient;
use crate::types::common::RequestOptions;
use crate::api_spec::{
    AssembleContextRequestDto as AssembleContextRequest,
    AssembleContextResponseDto as AssembleContextResponse,
};

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

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

    /// Assemble structured context from the knowledge graph.
    pub async fn assemble_context(
        &self,
        request: AssembleContextRequest,
        options: Option<&RequestOptions>,
    ) -> Result<AssembleContextResponse, Error> {
        self.http.post("/context/assemble", &request, options).await
    }
}