Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Custom/Audio/AudioClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ protected internal AudioClient(ClientPipeline pipeline, string model, OpenAIClie
_endpoint = OpenAIClient.GetEndpoint(options);
}

/// <summary>
/// Gets the name of the model used in requests sent to the service.
/// </summary>
public string Model => _model;

#region GenerateSpeech

/// <summary> Generates a life-like, spoken audio recording of the input text. </summary>
Expand Down
5 changes: 5 additions & 0 deletions src/Custom/Chat/ChatClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ protected internal ChatClient(ClientPipeline pipeline, string model, OpenAIClien
_telemetry = new OpenTelemetrySource(model, _endpoint);
}

/// <summary>
/// Gets the name of the model used in requests sent to the service.
/// </summary>
public string Model => _model;

/// <summary> Generates a completion for the given chat. </summary>
/// <param name="messages"> The messages comprising the chat so far. </param>
/// <param name="options"> The options to configure the chat completion. </param>
Expand Down
5 changes: 5 additions & 0 deletions src/Custom/Embeddings/EmbeddingClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ protected internal EmbeddingClient(ClientPipeline pipeline, string model, OpenAI
_endpoint = OpenAIClient.GetEndpoint(options);
}

/// <summary>
/// Gets the name of the model used in requests sent to the service.
/// </summary>
public string Model => _model;

// CUSTOM: Added to simplify generating a single embedding from a string input.
/// <summary> Generates an embedding representing the text input. </summary>
/// <param name="input"> The text input to generate an embedding for. </param>
Expand Down
5 changes: 5 additions & 0 deletions src/Custom/Images/ImageClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ protected internal ImageClient(ClientPipeline pipeline, string model, OpenAIClie
Pipeline = pipeline;
_endpoint = OpenAIClient.GetEndpoint(options);
}

/// <summary>
/// Gets the name of the model used in requests sent to the service.
/// </summary>
public string Model => _model;

#region GenerateImages

Expand Down
5 changes: 5 additions & 0 deletions src/Custom/Moderations/ModerationClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ protected internal ModerationClient(ClientPipeline pipeline, string model, OpenA
_endpoint = OpenAIClient.GetEndpoint(options);
}

/// <summary>
/// Gets the name of the model used in requests sent to the service.
/// </summary>
public string Model => _model;

/// <summary> Classifies if the text input is potentially harmful across several categories. </summary>
/// <param name="input"> The text input to classify. </param>
/// <param name="cancellationToken"> A token that can be used to cancel this method call. </param>
Expand Down