Function get_score_limits

Source
pub async fn get_score_limits(
    client: &mut NlpClient,
    request: GetScoreLimitsRequest,
) -> Result<GetScoreLimitsResponse, Box<dyn Error>>
Expand description

Gets the score limits for the given input.

§Arguments

  • client - The client to use to communicate with the server.
  • request - The request to send to the server.

§Example

use aristech_nlp_client::{get_client, get_score_limits, TlsOptions};
use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let mut client = get_client("https://nlp.example.com".to_string(), Some(TlsOptions::default())).await?;
    let request = GetScoreLimitsRequest {
        input: "Hello, world!".to_string(),
        ..GetScoreLimitsRequest::default()
    };
    let response = get_score_limits(&mut client, request).await?;
    println!("{:?}", response);
    Ok(())
}