Class ModelsEndpoint
List and describe the various models available in the API.
You can refer to the Models documentation to understand which models are available for certain endpoints: https://platform.openai.com/docs/models/model-endpoint-compatibility.
https://platform.openai.com/docs/api-reference/models
public sealed class ModelsEndpoint : OpenAIBaseEndpoint
- Inheritance
-
ModelsEndpoint
- Inherited Members
Constructors
ModelsEndpoint(OpenAIClient)
public ModelsEndpoint(OpenAIClient client)
Parameters
client
OpenAIClient
Properties
Root
The root endpoint address.
protected override string Root { get; }
Property Value
Methods
DeleteFineTuneModelAsync(string, CancellationToken)
Delete a fine-tuned model. You must have the Owner role in your organization.
public Task<bool> DeleteFineTuneModelAsync(string modelId, CancellationToken cancellationToken = default)
Parameters
modelId
stringThe Model to delete.
cancellationToken
CancellationTokenOptional, CancellationToken.
Returns
GetModelDetailsAsync(string, CancellationToken)
Get the details about a particular Model from the API
public Task<Model> GetModelDetailsAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe id/name of the model to get more details about
cancellationToken
CancellationTokenOptional, CancellationToken.
Returns
GetModelsAsync(CancellationToken)
List all models via the API
public Task<IReadOnlyList<Model>> GetModelsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenOptional, CancellationToken.
Returns
- Task<IReadOnlyList<Model>>
Asynchronously returns the list of all Models