From 39ac16d04618267781c53dc96d6115d7f603c435 Mon Sep 17 00:00:00 2001 From: Yang Wang Date: Tue, 1 Jul 2025 13:49:17 +0800 Subject: [PATCH] fix: fix pollstatus issue - fix the issue where the pollstatus was not working correctly - fix the issue where the vectorstoreid was not being passed correctly - fix the issue where the vectorstoreid was not being passed correctly --- examples/vectorstorefilebatch/main.go | 5 ++--- polling.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/vectorstorefilebatch/main.go b/examples/vectorstorefilebatch/main.go index a538faa7..7485a076 100644 --- a/examples/vectorstorefilebatch/main.go +++ b/examples/vectorstorefilebatch/main.go @@ -60,14 +60,13 @@ func main() { println("Listing the files from the vector store") vector := openai.VectorStoreFileBatchListFilesParams{ - Order: openai.VectorStoreFileBatchListFilesParamsOrderAsc, - VectorStoreID: vectorStore.ID, + Order: openai.VectorStoreFileBatchListFilesParamsOrderAsc, } q, _ := vector.URLQuery() println("Vector JSON:", q) - filesCursor, err := client.VectorStores.FileBatches.ListFiles(ctx, batch.ID, vector) + filesCursor, err := client.VectorStores.FileBatches.ListFiles(ctx, vectorStore.ID, batch.ID, vector) if err != nil { panic(err) diff --git a/polling.go b/polling.go index 65b229e2..a0877553 100644 --- a/polling.go +++ b/polling.go @@ -67,7 +67,7 @@ func (r *VectorStoreFileBatchService) PollStatus(ctx context.Context, vectorStor opts = append(opts, option.WithResponseInto(&raw)) opts = append(opts, mkPollingOptions(pollIntervalMs)...) for { - batch, err := r.Get(ctx, batchID, vectorStoreID, opts...) + batch, err := r.Get(ctx, vectorStoreID, batchID, opts...) if err != nil { return nil, fmt.Errorf("vector store file batch poll: received %w", err) }