Skip to content

Commit 963a88d

Browse files
committed
updates for model catalog fetching
1 parent 61e2661 commit 963a88d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SemanticDeveloper/SemanticDeveloper/Views/SessionView.axaml.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,8 @@ private async Task<List<ModelCatalogEntry>> FetchModelCatalogAsync()
676676
return await FetchModelCatalogAsync().ConfigureAwait(false);
677677
}
678678

679-
if (obj["items"] is JArray items)
679+
var itemsToken = obj["items"] ?? obj["data"];
680+
if (itemsToken is JArray items)
680681
{
681682
foreach (var token in items.OfType<JObject>())
682683
{
@@ -686,7 +687,7 @@ private async Task<List<ModelCatalogEntry>> FetchModelCatalogAsync()
686687
}
687688
}
688689

689-
var nextCursor = obj["nextCursor"]?.ToString();
690+
var nextCursor = obj["nextCursor"]?.ToString() ?? obj["next_cursor"]?.ToString();
690691
if (string.IsNullOrWhiteSpace(nextCursor))
691692
break;
692693
cursor = nextCursor;

0 commit comments

Comments
 (0)