class Builder {

        private List<Message> messages;
        private Double temperature;
        private Double topP;
        private Boolean stream;
        private Double penaltyScore;
        private String userId;
        private List<Function> functions;
        private  String system;

        private  String responseFormat;

        private Builder() {
        }

        public Builder from(
                ChatCompletionRequest instance) {<FILL_FUNCTION_BODY>}



        public Builder messages(List<Message> messages) {
            if (messages != null) {
                this.messages = Collections.unmodifiableList(messages);
            }
            return this;
        }

        public Builder messages(Message... messages) {
            return this.messages(Arrays.asList(messages));
        }

        public Builder addSystemMessage(String systemMessage) {
            if (this.messages == null) {
                this.messages = new ArrayList();
            }

            this.messages.add(Message.systemMessage(systemMessage));
            return this;
        }

        public Builder addUserMessage(String userMessage) {
            if (this.messages == null) {
                this.messages = new ArrayList();
            }

            this.messages.add(Message.userMessage(userMessage));
            return this;
        }

        public Builder addAssistantMessage(String assistantMessage) {
            if (this.messages == null) {
                this.messages = new ArrayList();
            }

            this.messages.add(Message.assistantMessage(assistantMessage));
            return this;
        }

        public Builder addFunctionMessage(String name, String content) {
            if (this.messages == null) {
                this.messages = new ArrayList();
            }

            this.messages.add(Message.functionMessage(name, content));
            return this;
        }

        public Builder temperature(Double temperature) {
            this.temperature = temperature;
            return this;
        }
        public Builder system(String system) {
            this.system = system;
            return this;
        }

        public Builder responseFormat(String responseFormat) {
            this.responseFormat = responseFormat;
            return this;
        }



        public Builder topP(Double topP) {
            this.topP = topP;
            return this;
        }

        public Builder stream(Boolean stream) {
            this.stream = stream;
            return this;
        }


        public Builder penaltyScore(Double penaltyScore) {
            this.penaltyScore = penaltyScore;
            return this;
        }


        public Builder userId(String userId) {
            this.userId = userId;
            return this;
        }

        public Builder functions(List<Function> functions) {
            if (functions != null) {
                this.functions = Collections.unmodifiableList(functions);
            }
            return this;
        }

        public Builder functions(Function... functions) {
            return this.functions(Arrays.asList(functions));
        }

        public Builder addFunction(Function function) {
            if (this.functions == null) {
                this.functions = new ArrayList();
            }

            this.functions.add(function);
            return this;
        }

        public ChatCompletionRequest build() {
            return new ChatCompletionRequest(this);
        }
    }

            this.messages(instance.messages);
            this.temperature(instance.temperature);
            this.topP(instance.topP);
            this.stream(instance.stream);
            this.penaltyScore(instance.penaltyScore);
            this.userId(instance.userId);
            this.functions(instance.functions);
            this.system(instance.system);
            this.responseFormat(instance.responseFormat);
            return this;
        
<no_super_class>