hanzo_client/models/run_request.rs
1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RunRequest {
16 /// Dataset is the set to score, which must belong to the caller's org and hold at least one ACTIVE example.
17 #[serde(rename = "dataset")]
18 pub dataset: String,
19 /// Judge is the judge to grade with. Omitted, the model under test grades itself against a default correctness criterion under the score name \"llm-judge\".
20 #[serde(rename = "judge", skip_serializing_if = "Option::is_none")]
21 pub judge: Option<Box<models::JudgeSpec>>,
22 /// Limit caps how many examples this run scores. It defaults to 20, and anything above 100 falls back to that default.
23 #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
24 pub limit: Option<i32>,
25 /// Model is the model under test.
26 #[serde(rename = "model")]
27 pub model: String,
28 /// RunName labels the run and is generated from the clock when omitted. It must match ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$.
29 #[serde(rename = "runName", skip_serializing_if = "Option::is_none")]
30 pub run_name: Option<String>,
31}
32
33impl RunRequest {
34 pub fn new(dataset: String, model: String) -> RunRequest {
35 RunRequest {
36 dataset,
37 judge: None,
38 limit: None,
39 model,
40 run_name: None,
41 }
42 }
43}
44