using Microsoft.TypeSpec.Generator.Customizations;
using System.Collections.Generic;
namespace OpenAI.Chat;
// CUSTOM: Added Experimental attribute.
///
/// Represents a chat message of the developer role as supplied to a chat completion request. A developer message is
/// generally supplied as the first message to a chat completion request and guides the model's behavior across future
/// assistant role response messages. These messages may help control behavior, style, tone, and
/// restrictions for a model-based assistant. Developer messages replace system messages for o1 models and newer.
///
[CodeGenType("ChatCompletionRequestDeveloperMessage")]
[CodeGenVisibility(nameof(DeveloperChatMessage), CodeGenVisibility.Internal)]
[CodeGenSuppress("DeveloperChatMessage", typeof(ChatMessageContent))]
public partial class DeveloperChatMessage : ChatMessage
{
///
/// Creates a new instance of using a collection of content items.
/// For developer messages, these can only be of type text.
///
///
/// The collection of content items associated with the message.
///
public DeveloperChatMessage(IEnumerable contentParts)
: this(content: new ChatMessageContent(contentParts), role: ChatMessageRole.Developer, participantName: null, patch: default)
{ }
///
/// Creates a new instance of using a collection of content items.
/// For developer messages, these can only be of type text.
///
///
/// The collection of content items associated with the message.
///
public DeveloperChatMessage(params ChatMessageContentPart[] contentParts)
: this(content: new ChatMessageContent(contentParts), role: ChatMessageRole.Developer, participantName: null, patch: default)
{
Argument.AssertNotNullOrEmpty(contentParts, nameof(contentParts));
}
///
/// Creates a new instance of with a single item of text content.
///
/// The text content of the message.
public DeveloperChatMessage(string content)
: this(content: new ChatMessageContent([content]), role: ChatMessageRole.Developer, participantName: null, patch: default)
{
Argument.AssertNotNull(content, nameof(content));
}
///
/// An optional name for the participant.
///
[CodeGenMember("Name")]
public string ParticipantName { get; set; }
}