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

@@ -142,6 +142,8 @@ When asked a question, write and run Python code to answer the question.`
fmt.Fprintln(w, string(resBytes))
} else if r.Method == http.MethodGet {
resBytes, _ := json.Marshal(openai.AssistantsList{
LastID: &assistantID,
FirstID: &assistantID,
Assistants: []openai.Assistant{
{
ID: assistantID,