Skip to content

Commit e3ddc9d

Browse files
committed
Add offset parameter
1 parent fd086c9 commit e3ddc9d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

needle/v1/collections/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ def search(
135135
self,
136136
collection_id: str,
137137
text: str,
138-
max_distance: Optional[float] = None,
139138
top_k: Optional[int] = None,
139+
offset: Optional[int] = None,
140140
):
141141
"""
142142
Searches within a collection based on the provided parameters.
@@ -153,8 +153,8 @@ def search(
153153
endpoint = f"{self.search_endpoint}/{collection_id}/search"
154154
req_body = {
155155
"text": text,
156-
"max_distance": max_distance,
157156
"top_k": top_k,
157+
"offset": offset,
158158
}
159159
resp = self.session.post(endpoint, headers=self.headers, json=req_body)
160160
body = resp.json()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "needle-python"
7-
version = "0.4.0"
7+
version = "0.5.0"
88
description = "Needle client library for Python"
99
authors = [
1010
"Onur Eken <m.onureken@gmail.com>",

0 commit comments

Comments
 (0)