Skip to main content

synth_ai/
verifiers_api.rs

1use std::sync::Arc;
2
3use crate::graphs_api::{GraphCompletionRequest, GraphCompletionResponse};
4use crate::openapi_paths;
5use crate::transport::Transport;
6use crate::types::Result;
7
8#[derive(Clone)]
9pub struct VerifiersClient {
10    transport: Arc<Transport>,
11}
12
13impl VerifiersClient {
14    pub(crate) fn new(transport: Arc<Transport>) -> Self {
15        Self { transport }
16    }
17
18    pub async fn verify(&self, request: &GraphCompletionRequest) -> Result<GraphCompletionResponse> {
19        self.transport
20            .post_json(openapi_paths::API_GRAPHS_COMPLETIONS, request)
21            .await
22    }
23}