Share via


CommonModelParameters Class

Definition

Common language model parameters for Chat Completions. If omitted, default values are used.

public class CommonModelParameters : System.ClientModel.Primitives.IJsonModel<Azure.Search.Documents.Indexes.Models.CommonModelParameters>, System.ClientModel.Primitives.IPersistableModel<Azure.Search.Documents.Indexes.Models.CommonModelParameters>
type CommonModelParameters = class
    interface IJsonModel<CommonModelParameters>
    interface IPersistableModel<CommonModelParameters>
Public Class CommonModelParameters
Implements IJsonModel(Of CommonModelParameters), IPersistableModel(Of CommonModelParameters)
Inheritance
CommonModelParameters
Implements

Constructors

CommonModelParameters()

Initializes a new instance of CommonModelParameters.

Properties

FrequencyPenalty

A float in the range [-2,2] that reduces or increases likelihood of repeated tokens. Default is 0.

MaxTokens

Maximum number of tokens to generate.

Model

The name of the model to use (e.g., 'gpt-4o', etc.). Default is null if not specified.

PresencePenalty

A float in the range [-2,2] that penalizes new tokens based on their existing presence. Default is 0.

Seed

Random seed for controlling deterministic outputs. If omitted, randomization is used.

Stop

List of stop sequences that will cut off text generation. Default is none.

Temperature

Sampling temperature. Default is 0.7.

Methods

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)

Explicit Interface Implementations

IJsonModel<CommonModelParameters>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<CommonModelParameters>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<CommonModelParameters>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<CommonModelParameters>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<CommonModelParameters>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to