Skip to content

Commit

Permalink
Change the resumable query API (#32)
Browse files Browse the repository at this point in the history
There were couple of problems with it:

- We don't use the async prefix in async method names in the public
API
- We don't return the result for APIs that returns Success string only

So, I have changed the implementation to fix these problems.

Also, I think it is much better to return the first batch of the results
directly to the user, along with an handle to fetch more or stop.
This is more similar to API we have in JS SDK, makes the possible misuses
impossible (you can't call stop before the start anymore etc.), and makes
more sense for the async version. For the async version, we previously
marked the function async but did not call any async functions, which
was weird.

ALso, I have changed the tests a bit to make them more resillient to
failures due to potentially delayed indexing, which might happen
from time to time.
  • Loading branch information
mdumandag authored Sep 27, 2024
1 parent 1a52dcb commit 0800e7c
Show file tree
Hide file tree
Showing 5 changed files with 250 additions and 434 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "upstash-vector"
version = "0.5.0"
version = "0.6.0"
description = "Serverless Vector SDK from Upstash"
license = "MIT"
authors = ["Upstash <support@upstash.com>"]
Expand Down
Loading

0 comments on commit 0800e7c

Please sign in to comment.