// <auto-generated/>

#nullable disable

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using OpenAI;
using OpenAI.Internal;

namespace OpenAI.Chat
{
    public partial class ChatCompletionOptions
    {
        private protected IDictionary<string, BinaryData> _additionalBinaryDataProperties;

        internal ChatCompletionOptions(float? temperature, float? topP, float? frequencyPenalty, float? presencePenalty, ChatWebSearchOptions webSearchOptions, long? seed, IList<ChatTool> tools, IList<ChatMessage> messages, string model, int? n, bool? stream, InternalChatCompletionStreamOptions streamOptions, bool? includeLogProbabilities, int? topLogProbabilityCount, IList<string> stopSequences, IDictionary<int, int> logitBiases, ChatToolChoice toolChoice, ChatFunctionChoice functionChoice, bool? allowParallelToolCalls, string endUserId, int? deprecatedMaxTokens, int? maxOutputTokenCount, IList<ChatFunction> functions, IDictionary<string, string> metadata, bool? storedOutputEnabled, ChatReasoningEffortLevel? reasoningEffortLevel, IList<InternalCreateChatCompletionRequestModality> internalModalities, ChatResponseFormat responseFormat, ChatAudioOptions audioOptions, ChatOutputPrediction outputPrediction, InternalServiceTier? serviceTier, IDictionary<string, BinaryData> additionalBinaryDataProperties)
        {
            // Plugin customization: ensure initialization of collections
            Temperature = temperature;
            TopP = topP;
            FrequencyPenalty = frequencyPenalty;
            PresencePenalty = presencePenalty;
            WebSearchOptions = webSearchOptions;
            Seed = seed;
            Tools = tools ?? new ChangeTrackingList<ChatTool>();
            Messages = messages ?? new ChangeTrackingList<ChatMessage>();
            Model = model;
            N = n;
            Stream = stream;
            StreamOptions = streamOptions;
            IncludeLogProbabilities = includeLogProbabilities;
            TopLogProbabilityCount = topLogProbabilityCount;
            StopSequences = stopSequences ?? new ChangeTrackingList<string>();
            LogitBiases = logitBiases ?? new ChangeTrackingDictionary<int, int>();
            ToolChoice = toolChoice;
            FunctionChoice = functionChoice;
            AllowParallelToolCalls = allowParallelToolCalls;
            EndUserId = endUserId;
            _deprecatedMaxTokens = deprecatedMaxTokens;
            MaxOutputTokenCount = maxOutputTokenCount;
            Functions = functions ?? new ChangeTrackingList<ChatFunction>();
            Metadata = metadata ?? new ChangeTrackingDictionary<string, string>();
            StoredOutputEnabled = storedOutputEnabled;
            ReasoningEffortLevel = reasoningEffortLevel;
            InternalModalities = internalModalities ?? new ChangeTrackingList<InternalCreateChatCompletionRequestModality>();
            ResponseFormat = responseFormat;
            AudioOptions = audioOptions;
            OutputPrediction = outputPrediction;
            _serviceTier = serviceTier;
            _additionalBinaryDataProperties = additionalBinaryDataProperties;
        }

        public float? Temperature { get; set; }

        public float? TopP { get; set; }

        public float? FrequencyPenalty { get; set; }

        public float? PresencePenalty { get; set; }

        [Experimental("OPENAI001")]
        public ChatWebSearchOptions WebSearchOptions { get; set; }

        [Experimental("OPENAI001")]
        public long? Seed { get; set; }

        public IList<ChatTool> Tools { get; }

        internal IDictionary<string, BinaryData> SerializedAdditionalRawData
        {
            get => _additionalBinaryDataProperties;
            set => _additionalBinaryDataProperties = value;
        }
    }
}
