openai_struct/models/
create_eval_jsonl_run_data_source.rs

1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https:///platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https:///github.com/swagger-api/swagger-codegen.git
9 */
10
11/// pub CreateEvalJsonlRunDataSource : A JsonlRunDataSource object with that specifies a JSONL file that matches the eval
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16/// # on openapi.yaml
17///
18/// ```yaml
19/// CreateEvalJsonlRunDataSource:
20///   type: object
21///   title: JsonlRunDataSource
22///   description: >
23///     A JsonlRunDataSource object with that specifies a JSONL file that
24///     matches the eval
25///   properties:
26///     type:
27///       type: string
28///       enum:
29///         - jsonl
30///       default: jsonl
31///       description: The type of data source. Always `jsonl`.
32///       x-stainless-const: true
33///     source:
34///       oneOf:
35///         - $ref: "#/components/schemas/EvalJsonlFileContentSource"
36///         - $ref: "#/components/schemas/EvalJsonlFileIdSource"
37///   required:
38///     - type
39///     - source
40///   x-oaiMeta:
41///     name: The file data source object for the eval run configuration
42///     group: evals
43///     example: |
44///       {
45///         "type": "jsonl",
46///         "source": {
47///           "type": "file_id",
48///           "id": "file-9GYS6xbkWgWhmE7VoLUWFg"
49///         }
50///       }
51/// ```
52#[derive(Debug, Serialize, Deserialize)]
53pub struct CreateEvalJsonlRunDataSource {
54    #[serde(rename = "source")]
55    pub source: Value,
56    /// The type of data source. Always `jsonl`.
57    #[serde(rename = "type")]
58    #[serde(default = "default_type")]
59    pub _type: String,
60}
61
62fn default_type() -> String {
63    "jsonl".into()
64}