Skip to content

Commit acee529

Browse files
feat(api): manual updates
1 parent ca75227 commit acee529

File tree

8 files changed

+5
-493
lines changed

8 files changed

+5
-493
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 24
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-3856961a8959b60dbf0b6912d69c23390fbbca1c5e31028dd0decc85234dd285.yml
33
openapi_spec_hash: 988a7d6d7cef81ceb4acda3ef9f8c21e
4-
config_hash: 293588cb2728a4e82aba52073e15ebc1
4+
config_hash: 86bb383366a4687b405d4aa49808933d

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ from supermemory import Supermemory
121121

122122
client = Supermemory()
123123

124-
response = client.search(
124+
response = client.search.memories(
125125
q="machine learning concepts",
126126
include={},
127127
)

api.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ from supermemory.types import And, Or
99
Types:
1010

1111
```python
12-
from supermemory.types import AddResponse, ProfileResponse, SearchResponse
12+
from supermemory.types import AddResponse, ProfileResponse
1313
```
1414

1515
Methods:
1616

1717
- <code title="post /v3/documents">client.<a href="./src/supermemory/_client.py">add</a>(\*\*<a href="src/supermemory/types/client_add_params.py">params</a>) -> <a href="./src/supermemory/types/add_response.py">AddResponse</a></code>
1818
- <code title="post /v4/profile">client.<a href="./src/supermemory/_client.py">profile</a>(\*\*<a href="src/supermemory/types/client_profile_params.py">params</a>) -> <a href="./src/supermemory/types/profile_response.py">ProfileResponse</a></code>
19-
- <code title="post /v4/search">client.<a href="./src/supermemory/_client.py">search</a>(\*\*<a href="src/supermemory/types/client_search_params.py">params</a>) -> <a href="./src/supermemory/types/search_response.py">SearchResponse</a></code>
2019

2120
# Memories
2221

src/supermemory/_client.py

Lines changed: 1 addition & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from . import _exceptions
1212
from ._qs import Querystring
13-
from .types import client_add_params, client_search_params, client_profile_params
13+
from .types import client_add_params, client_profile_params
1414
from ._types import (
1515
Body,
1616
Omit,
@@ -48,7 +48,6 @@
4848
make_request_options,
4949
)
5050
from .types.add_response import AddResponse
51-
from .types.search_response import SearchResponse
5251
from .types.profile_response import ProfileResponse
5352

5453
__all__ = [
@@ -305,76 +304,6 @@ def profile(
305304
cast_to=ProfileResponse,
306305
)
307306

308-
def search(
309-
self,
310-
*,
311-
q: str,
312-
container_tag: str | Omit = omit,
313-
filters: client_search_params.Filters | Omit = omit,
314-
include: client_search_params.Include | Omit = omit,
315-
limit: int | Omit = omit,
316-
rerank: bool | Omit = omit,
317-
rewrite_query: bool | Omit = omit,
318-
threshold: float | Omit = omit,
319-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
320-
# The extra values given here take precedence over values defined on the client or passed to this method.
321-
extra_headers: Headers | None = None,
322-
extra_query: Query | None = None,
323-
extra_body: Body | None = None,
324-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
325-
) -> SearchResponse:
326-
"""
327-
Search memory entries - Low latency for conversational
328-
329-
Args:
330-
q: Search query string
331-
332-
container_tag: Optional tag this search should be containerized by. This can be an ID for your
333-
user, a project ID, or any other identifier you wish to use to filter memories.
334-
335-
filters: Optional filters to apply to the search. Can be a JSON string or Query object.
336-
337-
limit: Maximum number of results to return
338-
339-
rerank: If true, rerank the results based on the query. This is helpful if you want to
340-
ensure the most relevant results are returned.
341-
342-
rewrite_query: If true, rewrites the query to make it easier to find documents. This increases
343-
the latency by about 400ms
344-
345-
threshold: Threshold / sensitivity for memories selection. 0 is least sensitive (returns
346-
most memories, more results), 1 is most sensitive (returns lesser memories,
347-
accurate results)
348-
349-
extra_headers: Send extra headers
350-
351-
extra_query: Add additional query parameters to the request
352-
353-
extra_body: Add additional JSON properties to the request
354-
355-
timeout: Override the client-level default timeout for this request, in seconds
356-
"""
357-
return self.post(
358-
"/v4/search",
359-
body=maybe_transform(
360-
{
361-
"q": q,
362-
"container_tag": container_tag,
363-
"filters": filters,
364-
"include": include,
365-
"limit": limit,
366-
"rerank": rerank,
367-
"rewrite_query": rewrite_query,
368-
"threshold": threshold,
369-
},
370-
client_search_params.ClientSearchParams,
371-
),
372-
options=make_request_options(
373-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
374-
),
375-
cast_to=SearchResponse,
376-
)
377-
378307
@override
379308
def _make_status_error(
380309
self,
@@ -651,76 +580,6 @@ async def profile(
651580
cast_to=ProfileResponse,
652581
)
653582

654-
async def search(
655-
self,
656-
*,
657-
q: str,
658-
container_tag: str | Omit = omit,
659-
filters: client_search_params.Filters | Omit = omit,
660-
include: client_search_params.Include | Omit = omit,
661-
limit: int | Omit = omit,
662-
rerank: bool | Omit = omit,
663-
rewrite_query: bool | Omit = omit,
664-
threshold: float | Omit = omit,
665-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
666-
# The extra values given here take precedence over values defined on the client or passed to this method.
667-
extra_headers: Headers | None = None,
668-
extra_query: Query | None = None,
669-
extra_body: Body | None = None,
670-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
671-
) -> SearchResponse:
672-
"""
673-
Search memory entries - Low latency for conversational
674-
675-
Args:
676-
q: Search query string
677-
678-
container_tag: Optional tag this search should be containerized by. This can be an ID for your
679-
user, a project ID, or any other identifier you wish to use to filter memories.
680-
681-
filters: Optional filters to apply to the search. Can be a JSON string or Query object.
682-
683-
limit: Maximum number of results to return
684-
685-
rerank: If true, rerank the results based on the query. This is helpful if you want to
686-
ensure the most relevant results are returned.
687-
688-
rewrite_query: If true, rewrites the query to make it easier to find documents. This increases
689-
the latency by about 400ms
690-
691-
threshold: Threshold / sensitivity for memories selection. 0 is least sensitive (returns
692-
most memories, more results), 1 is most sensitive (returns lesser memories,
693-
accurate results)
694-
695-
extra_headers: Send extra headers
696-
697-
extra_query: Add additional query parameters to the request
698-
699-
extra_body: Add additional JSON properties to the request
700-
701-
timeout: Override the client-level default timeout for this request, in seconds
702-
"""
703-
return await self.post(
704-
"/v4/search",
705-
body=await async_maybe_transform(
706-
{
707-
"q": q,
708-
"container_tag": container_tag,
709-
"filters": filters,
710-
"include": include,
711-
"limit": limit,
712-
"rerank": rerank,
713-
"rewrite_query": rewrite_query,
714-
"threshold": threshold,
715-
},
716-
client_search_params.ClientSearchParams,
717-
),
718-
options=make_request_options(
719-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
720-
),
721-
cast_to=SearchResponse,
722-
)
723-
724583
@override
725584
def _make_status_error(
726585
self,
@@ -769,9 +628,6 @@ def __init__(self, client: Supermemory) -> None:
769628
self.profile = to_raw_response_wrapper(
770629
client.profile,
771630
)
772-
self.search = to_raw_response_wrapper(
773-
client.search,
774-
)
775631

776632

777633
class AsyncSupermemoryWithRawResponse:
@@ -788,9 +644,6 @@ def __init__(self, client: AsyncSupermemory) -> None:
788644
self.profile = async_to_raw_response_wrapper(
789645
client.profile,
790646
)
791-
self.search = async_to_raw_response_wrapper(
792-
client.search,
793-
)
794647

795648

796649
class SupermemoryWithStreamedResponse:
@@ -807,9 +660,6 @@ def __init__(self, client: Supermemory) -> None:
807660
self.profile = to_streamed_response_wrapper(
808661
client.profile,
809662
)
810-
self.search = to_streamed_response_wrapper(
811-
client.search,
812-
)
813663

814664

815665
class AsyncSupermemoryWithStreamedResponse:
@@ -826,9 +676,6 @@ def __init__(self, client: AsyncSupermemory) -> None:
826676
self.profile = async_to_streamed_response_wrapper(
827677
client.profile,
828678
)
829-
self.search = async_to_streamed_response_wrapper(
830-
client.search,
831-
)
832679

833680

834681
Client = Supermemory

src/supermemory/types/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44

55
from .shared import Or as Or, And as And
66
from .add_response import AddResponse as AddResponse
7-
from .search_response import SearchResponse as SearchResponse
87
from .profile_response import ProfileResponse as ProfileResponse
98
from .client_add_params import ClientAddParams as ClientAddParams
109
from .memory_add_params import MemoryAddParams as MemoryAddParams
1110
from .memory_list_params import MemoryListParams as MemoryListParams
1211
from .document_add_params import DocumentAddParams as DocumentAddParams
1312
from .memory_add_response import MemoryAddResponse as MemoryAddResponse
1413
from .memory_get_response import MemoryGetResponse as MemoryGetResponse
15-
from .client_search_params import ClientSearchParams as ClientSearchParams
1614
from .document_list_params import DocumentListParams as DocumentListParams
1715
from .memory_forget_params import MemoryForgetParams as MemoryForgetParams
1816
from .memory_list_response import MemoryListResponse as MemoryListResponse

src/supermemory/types/client_search_params.py

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)