reasoninglayer 1.0.3

Rust client SDK for the Reasoning Layer API
Documentation
//! Image-based concept extraction.

use crate::error::Error;
use crate::http::HttpClient;
use crate::types::common::RequestOptions;
use crate::api_spec::{ExtractImageRequest, ExtractImageResponse};

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

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

    /// Extract concepts from an image via a vision LLM.
    pub async fn extract_image(
        &self,
        request: ExtractImageRequest,
        options: Option<&RequestOptions>,
    ) -> Result<ExtractImageResponse, Error> {
        self.http.post("/extract/image", &request, options).await
    }
}