Skip to content

Commit 14221d9

Browse files
feat(api): api update
1 parent 5a8910f commit 14221d9

File tree

4 files changed

+15
-14
lines changed

4 files changed

+15
-14
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 26
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-5a6321b40e3c5f84f293428ecf2d81582921056c2bd9a5b226593ced0a0b3a5e.yml
3-
openapi_spec_hash: cfaa5207c039ee5ff63b9c1ea9720cef
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-eb2aa0ee3a6380fe8dead168c3fec696acdf79d0fa5821b796f0335566c78f22.yml
3+
openapi_spec_hash: 4b09ba67c690fd139df5b939fc899d49
44
config_hash: f3eb5ca71172780678106f6d46f15dda

src/supermemory/resources/search.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def memories(
251251
limit: int | Omit = omit,
252252
rerank: bool | Omit = omit,
253253
rewrite_query: bool | Omit = omit,
254-
search_mode: Literal["memories", "hybrid"] | Omit = omit,
254+
search_mode: Literal["memories", "hybrid", "documents"] | Omit = omit,
255255
threshold: float | Omit = omit,
256256
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
257257
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -280,8 +280,8 @@ def memories(
280280
the latency by about 400ms
281281
282282
search_mode: Search mode. 'memories' searches only memory entries (default). 'hybrid'
283-
searches memories first, then falls back to document chunks if no memories are
284-
found.
283+
searches both memories and document chunks. 'documents' searches only document
284+
chunks.
285285
286286
threshold: Threshold / sensitivity for memories selection. 0 is least sensitive (returns
287287
most memories, more results), 1 is most sensitive (returns lesser memories,
@@ -544,7 +544,7 @@ async def memories(
544544
limit: int | Omit = omit,
545545
rerank: bool | Omit = omit,
546546
rewrite_query: bool | Omit = omit,
547-
search_mode: Literal["memories", "hybrid"] | Omit = omit,
547+
search_mode: Literal["memories", "hybrid", "documents"] | Omit = omit,
548548
threshold: float | Omit = omit,
549549
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
550550
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -573,8 +573,8 @@ async def memories(
573573
the latency by about 400ms
574574
575575
search_mode: Search mode. 'memories' searches only memory entries (default). 'hybrid'
576-
searches memories first, then falls back to document chunks if no memories are
577-
found.
576+
searches both memories and document chunks. 'documents' searches only document
577+
chunks.
578578
579579
threshold: Threshold / sensitivity for memories selection. 0 is least sensitive (returns
580580
most memories, more results), 1 is most sensitive (returns lesser memories,

src/supermemory/types/search_memories_params.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,11 @@ class SearchMemoriesParams(TypedDict, total=False):
359359
This increases the latency by about 400ms
360360
"""
361361

362-
search_mode: Annotated[Literal["memories", "hybrid"], PropertyInfo(alias="searchMode")]
362+
search_mode: Annotated[Literal["memories", "hybrid", "documents"], PropertyInfo(alias="searchMode")]
363363
"""Search mode.
364364
365-
'memories' searches only memory entries (default). 'hybrid' searches memories
366-
first, then falls back to document chunks if no memories are found.
365+
'memories' searches only memory entries (default). 'hybrid' searches both
366+
memories and document chunks. 'documents' searches only document chunks.
367367
"""
368368

369369
threshold: float

src/supermemory/types/search_memories_response.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ class SearchMemoriesResponse(BaseModel):
139139
results: List[Result]
140140
"""Array of matching memory entries and chunks with similarity scores.
141141
142-
Contains memory results when searchMode='memories', or both memory and chunk
143-
results when searchMode='hybrid'. Memory results have 'memory' field, chunk
144-
results have 'chunk' field.
142+
Contains memory results when searchMode='memories', both memory and chunk
143+
results when searchMode='hybrid', or only chunk results when
144+
searchMode='documents'. Memory results have 'memory' field, chunk results have
145+
'chunk' field.
145146
"""
146147

147148
timing: float

0 commit comments

Comments
 (0)