diff --git a/async-openai/src/types/types.rs b/async-openai/src/types/types.rs index fcb734f8..dcb6715e 100644 --- a/async-openai/src/types/types.rs +++ b/async-openai/src/types/types.rs @@ -1104,6 +1104,9 @@ pub struct ChatCompletionRequestSystemMessage { /// The role of the messages author, in this case `system`. #[builder(default = "Role::System")] pub role: Role, + /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, } #[derive(Debug, Serialize, Deserialize, Default, Clone, Builder, PartialEq)] @@ -1182,6 +1185,9 @@ pub struct ChatCompletionRequestUserMessage { /// The role of the messages author, in this case `user`. #[builder(default = "Role::User")] pub role: Role, + /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, } #[derive(Debug, Serialize, Deserialize, Default, Clone, Builder, PartialEq)] @@ -1196,6 +1202,9 @@ pub struct ChatCompletionRequestAssistantMessage { /// The role of the messages author, in this case `assistant`. #[builder(default = "Role::Assistant")] pub role: Role, + /// An optional name for the participant. Provides the model information to differentiate between participants of the same role. + #[serde(skip_serializing_if = "Option::is_none")] + pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] pub tool_calls: Option>, /// Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.