Skip to main content

gproxy_protocol/openai/generate_content/responses/items/actions/
reasoning.rs

1use serde::{Deserialize, Serialize};
2
3use crate::openai::common::Rest;
4
5use super::super::content::ResponseReasoningTextType;
6
7#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
8#[serde(rename_all = "snake_case")]
9#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
10pub enum AdditionalToolsRole {
11    Unknown,
12    User,
13    Assistant,
14    System,
15    Critic,
16    Discriminator,
17    Developer,
18    Tool,
19}
20
21#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
22#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
23pub struct ResponseReasoningSummaryPart {
24    pub text: String,
25    #[serde(rename = "type")]
26    pub type_: ResponseReasoningSummaryType,
27    #[serde(default, flatten)]
28    pub rest: Rest,
29}
30
31#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
32#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
33pub enum ResponseReasoningSummaryType {
34    #[serde(rename = "summary_text")]
35    SummaryText,
36}
37
38#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, gproxy_protocol_macros::WireBuilder)]
39#[cfg_attr(not(feature = "exhaustive"), non_exhaustive)]
40pub struct ResponseReasoningTextPart {
41    pub text: String,
42    #[serde(rename = "type")]
43    pub type_: ResponseReasoningTextType,
44    #[serde(default, flatten)]
45    pub rest: Rest,
46}