openai_struct/models/thread_stream_event.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::ThreadObject;
15
16/// # on openapi.yaml
17///
18/// ```yaml
19/// ThreadStreamEvent:
20/// oneOf:
21/// - type: object
22/// properties:
23/// enabled:
24/// type: boolean
25/// description: Whether to enable input audio transcription.
26/// event:
27/// type: string
28/// enum:
29/// - thread.created
30/// x-stainless-const: true
31/// data:
32/// $ref: "#/components/schemas/ThreadObject"
33/// required:
34/// - event
35/// - data
36/// description:
37/// Occurs when a new [thread](/docs/api-reference/threads/object) is
38/// created.
39/// x-oaiMeta:
40/// dataDescription: "`data` is a [thread](/docs/api-reference/threads/object)"
41/// ```
42#[derive(Debug, Serialize, Deserialize)]
43pub struct ThreadStreamEvent {
44 /// Whether to enable input audio transcription.
45 pub enabled: Option<bool>,
46 /// enum - thread.created
47 pub event: String,
48 /// Represents a thread that contains [messages](/docs/api-reference/messages).
49 pub data: ThreadObject,
50}