Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/vectorstorefilebatch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion polling.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down