feat: implement ListAllModelsAsync and ListModelsAsync

This commit is contained in:
Stevan Freeborn
2025-01-05 21:20:27 -06:00
parent 9d341011df
commit 8e0443a6bb
7 changed files with 507 additions and 43 deletions
+2 -2
View File
@@ -11,13 +11,13 @@ public class Page
/// The id of the first item in the page.
/// </summary>
[JsonPropertyName("first_id")]
public string FirstId { get; init; } = string.Empty;
public string? FirstId { get; init; } = string.Empty;
/// <summary>
/// The id of the last item in the page.
/// </summary>
[JsonPropertyName("last_id")]
public string LastId { get; init; } = string.Empty;
public string? LastId { get; init; } = string.Empty;
/// <summary>
/// Indicates whether there is more data to be retrieved.
+1 -4
View File
@@ -70,10 +70,7 @@ public class PagingRequest
parameters.Add($"after_id={AfterId}");
}
if (Limit is not DefaultLimit)
{
parameters.Add($"limit={Limit}");
}
parameters.Add($"limit={Limit}");
return string.Join("&", parameters);
}