openai_struct/models/create_eval_item.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 CreateEvalItem : A chat message that makes up the prompt or context. May include variable references to the \"item\" namespace, ie {{item.name}}.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16/// # on openapi.yaml
17///
18/// ```yaml
19/// CreateEvalItem:
20/// title: CreateEvalItem
21/// description:
22/// A chat message that makes up the prompt or context. May include
23/// variable references to the "item" namespace, ie {{item.name}}.
24/// type: object
25/// oneOf:
26/// - type: object
27/// title: SimpleInputMessage
28/// properties:
29/// role:
30/// type: string
31/// description: The role of the message (e.g. "system", "assistant", "user").
32/// content:
33/// type: string
34/// description: The content of the message.
35/// required:
36/// - role
37/// - content
38/// - $ref: "#/components/schemas/EvalItem"
39/// x-oaiMeta:
40/// name: The chat message object used to configure an individual run
41/// ```
42#[derive(Debug, Serialize, Deserialize)]
43pub enum CreateEvalItem {
44 ItemObject(ItemObject),
45 EvalItem(crate::EvalItem),
46}
47
48/// # on openapi.yaml
49///
50/// ```yaml
51/// - type: object
52/// title: SimpleInputMessage
53/// properties:
54/// role:
55/// type: string
56/// description: The role of the message (e.g. "system", "assistant", "user").
57/// content:
58/// type: string
59/// description: The content of the message.
60/// required:
61/// - role
62/// - content
63/// ```
64#[derive(Debug, Serialize, Deserialize)]
65pub struct ItemObject {
66 /// The role of the message (e.g. "system", "assistant", "user").
67 role: String,
68 /// The content of the message.
69 content: String,
70}