File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 1+ using System . Collections . Generic ;
2+ using System . Threading . Tasks ;
3+
4+ namespace OpenAI_API . Models
5+ {
6+ /// <summary>
7+ /// The API endpoint for querying available models
8+ /// </summary>
9+ public interface IModelsEndpoint
10+ {
11+ /// <summary>
12+ /// Get details about a particular Model from the API, specifically properties such as <see cref="Model.OwnedBy"/> and permissions.
13+ /// </summary>
14+ /// <param name="id">The id/name of the model to get more details about</param>
15+ /// <returns>Asynchronously returns the <see cref="Model"/> with all available properties</returns>
16+ Task < Model > RetrieveModelDetailsAsync ( string id ) ;
17+
18+ /// <summary>
19+ /// Get details about a particular Model from the API, specifically properties such as <see cref="Model.OwnedBy"/> and permissions.
20+ /// </summary>
21+ /// <param name="id">The id/name of the model to get more details about</param>
22+ /// <param name="auth">Obsolete: IGNORED</param>
23+ /// <returns>Asynchronously returns the <see cref="Model"/> with all available properties</returns>
24+ Task < Model > RetrieveModelDetailsAsync ( string id , APIAuthentication auth = null ) ;
25+
26+ /// <summary>
27+ /// List all models via the API
28+ /// </summary>
29+ /// <returns>Asynchronously returns the list of all <see cref="Model"/>s</returns>
30+ Task < List < Model > > GetModelsAsync ( ) ;
31+ }
32+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ namespace OpenAI_API.Models
88 /// <summary>
99 /// The API endpoint for querying available models
1010 /// </summary>
11- public class ModelsEndpoint : EndpointBase
11+ public class ModelsEndpoint : EndpointBase , IModelsEndpoint
1212 {
1313 /// <summary>
1414 /// The name of the endpoint, which is the final path segment in the API URL. For example, "models".
You can’t perform that action at this time.
0 commit comments