Pagination fields are missing from assistants list beta API (#571)

curl "https://api.openai.com/v1/assistants?order=desc&limit=20" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "OpenAI-Beta: assistants=v1"
{
  "object": "list",
  "data": [],
  "first_id": null,
  "last_id": null,
  "has_more": false
}
This commit is contained in:
Liron Levin
2023-11-15 18:22:39 +02:00
committed by GitHub
parent 71848ccf69
commit 464b85b6d7
2 changed files with 5 additions and 1 deletions

View File

@@ -52,7 +52,9 @@ type AssistantRequest struct {
// AssistantsList is a list of assistants.
type AssistantsList struct {
Assistants []Assistant `json:"data"`
LastID *string `json:"last_id"`
FirstID *string `json:"first_id"`
HasMore bool `json:"has_more"`
httpHeader
}