All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lzhpo.chatgpt.entity.CommonConfig Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
/*
 * Copyright 2023 lzhpo
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.lzhpo.chatgpt.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * @author lzhpo
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CommonConfig {

    /**
     * How many edits to generate for the input and instruction.
     */
    private Integer n;

    /**
     * What sampling temperature to use, between 0 and 2.
     *
     * 

Higher values like 0.8 will make the output more random, * while lower values like 0.2 will make it more focused and deterministic. * *

We generally recommend altering this or top_p but not both. */ @Min(0) @Max(2) private Number temperature; /** * An alternative to sampling with temperature, called nucleus sampling, * where the model considers the results of the tokens with top_p probability mass. * So 0.1 means only the tokens comprising the top 10% probability mass are considered. * *

We generally recommend altering this or temperature but not both. */ @JsonProperty("top_p") private Number topP; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy