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
clientOpenAIClient
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
modelIdstringThe Model to delete.
cancellationTokenCancellationTokenOptional, 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
idstringThe id/name of the model to get more details about
cancellationTokenCancellationTokenOptional, CancellationToken.
Returns
GetModelsAsync(CancellationToken)
List all models via the API
public Task<IReadOnlyList<Model>> GetModelsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenOptional, CancellationToken.
Returns
- Task<IReadOnlyList<Model>>
Asynchronously returns the list of all Models