openai_struct/models/annotation.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#[allow(unused_imports)]
12use serde_json::Value;
13
14use crate::{FileCitationBody, FilePath, UrlCitationBody};
15
16/// # on openapi.yaml
17///
18/// ```yaml
19/// Annotation:
20/// oneOf:
21/// - $ref: "#/components/schemas/FileCitationBody"
22/// - $ref: "#/components/schemas/UrlCitationBody"
23/// - $ref: "#/components/schemas/FilePath"
24/// discriminator:
25/// propertyName: type
26/// ```
27#[derive(Debug, Serialize, Deserialize)]
28#[serde(tag = "type")]
29pub enum Annotation {
30 #[serde(rename = "file_citation")]
31 FileCitation(FileCitationBody),
32 #[serde(rename = "url_citation")]
33 UrlCitation(UrlCitationBody),
34 #[serde(rename = "file_path")]
35 FilePath(FilePath),
36}