Methods
Domain Types
Dpo Hyperparameters
-
type DpoHyperparametersResp struct{…}The hyperparameters used for the DPO fine-tuning job.
-
BatchSize DpoHyperparametersBatchSizeUnionRespNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
Beta DpoHyperparametersBetaUnionRespThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.
-
type Auto stringconst AutoAuto Auto = "auto"
-
float64
-
-
LearningRateMultiplier DpoHyperparametersLearningRateMultiplierUnionRespScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
-
type Auto stringconst AutoAuto Auto = "auto"
-
float64
-
-
NEpochs DpoHyperparametersNEpochsUnionRespThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
Dpo Method
-
type DpoMethod struct{…}Configuration for the DPO fine-tuning method.
-
Hyperparameters DpoHyperparametersRespThe hyperparameters used for the DPO fine-tuning job.
-
BatchSize DpoHyperparametersBatchSizeUnionRespNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
Beta DpoHyperparametersBetaUnionRespThe beta value for the DPO method. A higher beta value will increase the weight of the penalty between the policy and reference model.
-
type Auto stringconst AutoAuto Auto = "auto"
-
float64
-
-
LearningRateMultiplier DpoHyperparametersLearningRateMultiplierUnionRespScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
-
type Auto stringconst AutoAuto Auto = "auto"
-
float64
-
-
NEpochs DpoHyperparametersNEpochsUnionRespThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
-
Reinforcement Hyperparameters
-
type ReinforcementHyperparametersResp struct{…}The hyperparameters used for the reinforcement fine-tuning job.
-
BatchSize ReinforcementHyperparametersBatchSizeUnionRespNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
ComputeMultiplier ReinforcementHyperparametersComputeMultiplierUnionRespMultiplier on amount of compute used for exploring search space during training.
-
type Auto stringconst AutoAuto Auto = "auto"
-
float64
-
-
EvalInterval ReinforcementHyperparametersEvalIntervalUnionRespThe number of training steps between evaluation runs.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
EvalSamples ReinforcementHyperparametersEvalSamplesUnionRespNumber of evaluation samples to generate per training step.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
LearningRateMultiplier ReinforcementHyperparametersLearningRateMultiplierUnionRespScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
-
type Auto stringconst AutoAuto Auto = "auto"
-
float64
-
-
NEpochs ReinforcementHyperparametersNEpochsUnionRespThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
ReasoningEffort ReinforcementHyperparametersReasoningEffortLevel of reasoning effort.
-
const ReinforcementHyperparametersReasoningEffortDefault ReinforcementHyperparametersReasoningEffort = "default" -
const ReinforcementHyperparametersReasoningEffortLow ReinforcementHyperparametersReasoningEffort = "low" -
const ReinforcementHyperparametersReasoningEffortMedium ReinforcementHyperparametersReasoningEffort = "medium" -
const ReinforcementHyperparametersReasoningEffortHigh ReinforcementHyperparametersReasoningEffort = "high"
-
-
Reinforcement Method
-
type ReinforcementMethod struct{…}Configuration for the reinforcement fine-tuning method.
-
Grader ReinforcementMethodGraderUnionThe grader used for the fine-tuning job.
-
type StringCheckGrader struct{…}A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
-
Input stringThe input text. This may include template strings.
-
Name stringThe name of the grader.
-
Operation StringCheckGraderOperationThe string check operation to perform. One of
eq,ne,like, orilike.-
const StringCheckGraderOperationEq StringCheckGraderOperation = "eq" -
const StringCheckGraderOperationNe StringCheckGraderOperation = "ne" -
const StringCheckGraderOperationLike StringCheckGraderOperation = "like" -
const StringCheckGraderOperationIlike StringCheckGraderOperation = "ilike"
-
-
Reference stringThe reference text. This may include template strings.
-
Type StringCheckThe object type, which is always
string_check.const StringCheckStringCheck StringCheck = "string_check"
-
-
type TextSimilarityGrader struct{…}A TextSimilarityGrader object which grades text based on similarity metrics.
-
EvaluationMetric TextSimilarityGraderEvaluationMetricThe evaluation metric to use. One of
cosine,fuzzy_match,bleu,gleu,meteor,rouge_1,rouge_2,rouge_3,rouge_4,rouge_5, orrouge_l.-
const TextSimilarityGraderEvaluationMetricCosine TextSimilarityGraderEvaluationMetric = "cosine" -
const TextSimilarityGraderEvaluationMetricFuzzyMatch TextSimilarityGraderEvaluationMetric = "fuzzy_match" -
const TextSimilarityGraderEvaluationMetricBleu TextSimilarityGraderEvaluationMetric = "bleu" -
const TextSimilarityGraderEvaluationMetricGleu TextSimilarityGraderEvaluationMetric = "gleu" -
const TextSimilarityGraderEvaluationMetricMeteor TextSimilarityGraderEvaluationMetric = "meteor" -
const TextSimilarityGraderEvaluationMetricRouge1 TextSimilarityGraderEvaluationMetric = "rouge_1" -
const TextSimilarityGraderEvaluationMetricRouge2 TextSimilarityGraderEvaluationMetric = "rouge_2" -
const TextSimilarityGraderEvaluationMetricRouge3 TextSimilarityGraderEvaluationMetric = "rouge_3" -
const TextSimilarityGraderEvaluationMetricRouge4 TextSimilarityGraderEvaluationMetric = "rouge_4" -
const TextSimilarityGraderEvaluationMetricRouge5 TextSimilarityGraderEvaluationMetric = "rouge_5" -
const TextSimilarityGraderEvaluationMetricRougeL TextSimilarityGraderEvaluationMetric = "rouge_l"
-
-
Input stringThe text being graded.
-
Name stringThe name of the grader.
-
Reference stringThe text being graded against.
-
Type TextSimilarityThe type of grader.
const TextSimilarityTextSimilarity TextSimilarity = "text_similarity"
-
-
type PythonGrader struct{…}A PythonGrader object that runs a python script on the input.
-
Name stringThe name of the grader.
-
Source stringThe source code of the python script.
-
Type PythonThe object type, which is always
python.const PythonPython Python = "python"
-
ImageTag stringThe image tag to use for the python script.
-
-
type ScoreModelGrader struct{…}A ScoreModelGrader object that uses a model to assign a score to the input.
-
Input []ScoreModelGraderInputThe input messages evaluated by the grader. Supports text, output text, input image, and input audio content blocks, and may include template strings.
-
Content ScoreModelGraderInputContentUnionInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
-
string -
type ResponseInputText struct{…}A text input to the model.
-
Text stringThe text input to the model.
-
Type InputTextThe type of the input item. Always
input_text.const InputTextInputText InputText = "input_text"
-
-
type ScoreModelGraderInputContentOutputText struct{…}A text output from the model.
-
Text stringThe text output from the model.
-
Type OutputTextThe type of the output text. Always
output_text.const OutputTextOutputText OutputText = "output_text"
-
-
type ScoreModelGraderInputContentInputImage struct{…}An image input block used within EvalItem content arrays.
-
ImageURL stringThe URL of the image input.
-
Type InputImageThe type of the image input. Always
input_image.const InputImageInputImage InputImage = "input_image"
-
Detail stringThe detail level of the image to be sent to the model. One of
high,low, orauto. Defaults toauto.
-
-
type ResponseInputAudio struct{…}An audio input to the model.
-
InputAudio ResponseInputAudioInputAudio-
Data stringBase64-encoded audio data.
-
Format stringThe format of the audio data. Currently supported formats are
mp3andwav.-
const ResponseInputAudioInputAudioFormatMP3 ResponseInputAudioInputAudioFormat = "mp3" -
const ResponseInputAudioInputAudioFormatWAV ResponseInputAudioInputAudioFormat = "wav"
-
-
-
Type InputAudioThe type of the input item. Always
input_audio.const InputAudioInputAudio InputAudio = "input_audio"
-
-
type GraderInputs []GraderInputUnionA list of inputs, each of which may be either an input text, output text, input image, or input audio object.
-
string -
type ResponseInputText struct{…}A text input to the model.
-
type GraderInputOutputText struct{…}A text output from the model.
-
Text stringThe text output from the model.
-
Type OutputTextThe type of the output text. Always
output_text.const OutputTextOutputText OutputText = "output_text"
-
-
type GraderInputInputImage struct{…}An image input block used within EvalItem content arrays.
-
ImageURL stringThe URL of the image input.
-
Type InputImageThe type of the image input. Always
input_image.const InputImageInputImage InputImage = "input_image"
-
Detail stringThe detail level of the image to be sent to the model. One of
high,low, orauto. Defaults toauto.
-
-
type ResponseInputAudio struct{…}An audio input to the model.
-
-
-
Role stringThe role of the message input. One of
user,assistant,system, ordeveloper.-
const ScoreModelGraderInputRoleUser ScoreModelGraderInputRole = "user" -
const ScoreModelGraderInputRoleAssistant ScoreModelGraderInputRole = "assistant" -
const ScoreModelGraderInputRoleSystem ScoreModelGraderInputRole = "system" -
const ScoreModelGraderInputRoleDeveloper ScoreModelGraderInputRole = "developer"
-
-
Type stringThe type of the message input. Always
message.const ScoreModelGraderInputTypeMessage ScoreModelGraderInputType = "message"
-
-
Model stringThe model to use for the evaluation.
-
Name stringThe name of the grader.
-
Type ScoreModelThe object type, which is always
score_model.const ScoreModelScoreModel ScoreModel = "score_model"
-
Range []float64The range of the score. Defaults to
[0, 1]. -
SamplingParams ScoreModelGraderSamplingParamsThe sampling parameters for the model.
-
MaxCompletionsTokens int64The maximum number of tokens the grader model may generate in its response.
-
ReasoningEffort ReasoningEffortConstrains effort on reasoning for reasoning models. Currently supported values are
none,minimal,low,medium,high, andxhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.-
gpt-5.1defaults tonone, which does not perform reasoning. The supported reasoning values forgpt-5.1arenone,low,medium, andhigh. Tool calls are supported for all reasoning values in gpt-5.1. -
All models before
gpt-5.1default tomediumreasoning effort, and do not supportnone. -
The
gpt-5-promodel defaults to (and only supports)highreasoning effort. -
xhighis supported for all models aftergpt-5.1-codex-max. -
const ReasoningEffortNone ReasoningEffort = "none" -
const ReasoningEffortMinimal ReasoningEffort = "minimal" -
const ReasoningEffortLow ReasoningEffort = "low" -
const ReasoningEffortMedium ReasoningEffort = "medium" -
const ReasoningEffortHigh ReasoningEffort = "high" -
const ReasoningEffortXhigh ReasoningEffort = "xhigh"
-
-
Seed int64A seed value to initialize the randomness, during sampling.
-
Temperature float64A higher temperature increases randomness in the outputs.
-
TopP float64An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
-
-
-
type MultiGrader struct{…}A MultiGrader object combines the output of multiple graders to produce a single score.
-
CalculateOutput stringA formula to calculate the output based on grader results.
-
Graders MultiGraderGradersUnionA StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
-
type StringCheckGrader struct{…}A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
-
type TextSimilarityGrader struct{…}A TextSimilarityGrader object which grades text based on similarity metrics.
-
type PythonGrader struct{…}A PythonGrader object that runs a python script on the input.
-
type ScoreModelGrader struct{…}A ScoreModelGrader object that uses a model to assign a score to the input.
-
type LabelModelGrader struct{…}A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
-
Input []LabelModelGraderInput-
Content LabelModelGraderInputContentUnionInputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.
-
string -
type ResponseInputText struct{…}A text input to the model.
-
type LabelModelGraderInputContentOutputText struct{…}A text output from the model.
-
Text stringThe text output from the model.
-
Type OutputTextThe type of the output text. Always
output_text.const OutputTextOutputText OutputText = "output_text"
-
-
type LabelModelGraderInputContentInputImage struct{…}An image input block used within EvalItem content arrays.
-
ImageURL stringThe URL of the image input.
-
Type InputImageThe type of the image input. Always
input_image.const InputImageInputImage InputImage = "input_image"
-
Detail stringThe detail level of the image to be sent to the model. One of
high,low, orauto. Defaults toauto.
-
-
type ResponseInputAudio struct{…}An audio input to the model.
-
type GraderInputs []GraderInputUnionA list of inputs, each of which may be either an input text, output text, input image, or input audio object.
-
-
Role stringThe role of the message input. One of
user,assistant,system, ordeveloper.-
const LabelModelGraderInputRoleUser LabelModelGraderInputRole = "user" -
const LabelModelGraderInputRoleAssistant LabelModelGraderInputRole = "assistant" -
const LabelModelGraderInputRoleSystem LabelModelGraderInputRole = "system" -
const LabelModelGraderInputRoleDeveloper LabelModelGraderInputRole = "developer"
-
-
Type stringThe type of the message input. Always
message.const LabelModelGraderInputTypeMessage LabelModelGraderInputType = "message"
-
-
Labels []stringThe labels to assign to each item in the evaluation.
-
Model stringThe model to use for the evaluation. Must support structured outputs.
-
Name stringThe name of the grader.
-
PassingLabels []stringThe labels that indicate a passing result. Must be a subset of labels.
-
Type LabelModelThe object type, which is always
label_model.const LabelModelLabelModel LabelModel = "label_model"
-
-
-
Name stringThe name of the grader.
-
Type MultiThe object type, which is always
multi.const MultiMulti Multi = "multi"
-
-
-
Hyperparameters ReinforcementHyperparametersRespThe hyperparameters used for the reinforcement fine-tuning job.
-
BatchSize ReinforcementHyperparametersBatchSizeUnionRespNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
ComputeMultiplier ReinforcementHyperparametersComputeMultiplierUnionRespMultiplier on amount of compute used for exploring search space during training.
-
type Auto stringconst AutoAuto Auto = "auto"
-
float64
-
-
EvalInterval ReinforcementHyperparametersEvalIntervalUnionRespThe number of training steps between evaluation runs.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
EvalSamples ReinforcementHyperparametersEvalSamplesUnionRespNumber of evaluation samples to generate per training step.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
LearningRateMultiplier ReinforcementHyperparametersLearningRateMultiplierUnionRespScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
-
type Auto stringconst AutoAuto Auto = "auto"
-
float64
-
-
NEpochs ReinforcementHyperparametersNEpochsUnionRespThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
ReasoningEffort ReinforcementHyperparametersReasoningEffortLevel of reasoning effort.
-
const ReinforcementHyperparametersReasoningEffortDefault ReinforcementHyperparametersReasoningEffort = "default" -
const ReinforcementHyperparametersReasoningEffortLow ReinforcementHyperparametersReasoningEffort = "low" -
const ReinforcementHyperparametersReasoningEffortMedium ReinforcementHyperparametersReasoningEffort = "medium" -
const ReinforcementHyperparametersReasoningEffortHigh ReinforcementHyperparametersReasoningEffort = "high"
-
-
-
Supervised Hyperparameters
-
type SupervisedHyperparametersResp struct{…}The hyperparameters used for the fine-tuning job.
-
BatchSize SupervisedHyperparametersBatchSizeUnionRespNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
LearningRateMultiplier SupervisedHyperparametersLearningRateMultiplierUnionRespScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
-
type Auto stringconst AutoAuto Auto = "auto"
-
float64
-
-
NEpochs SupervisedHyperparametersNEpochsUnionRespThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
Supervised Method
-
type SupervisedMethod struct{…}Configuration for the supervised fine-tuning method.
-
Hyperparameters SupervisedHyperparametersRespThe hyperparameters used for the fine-tuning job.
-
BatchSize SupervisedHyperparametersBatchSizeUnionRespNumber of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
LearningRateMultiplier SupervisedHyperparametersLearningRateMultiplierUnionRespScaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
-
type Auto stringconst AutoAuto Auto = "auto"
-
float64
-
-
NEpochs SupervisedHyperparametersNEpochsUnionRespThe number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
-
type Auto stringconst AutoAuto Auto = "auto"
-
int64
-
-
-