Skip to content

Commit cbf70ff

Browse files
feat(api): api update
1 parent cab5977 commit cbf70ff

File tree

4 files changed

+16
-22
lines changed

4 files changed

+16
-22
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-b1d58ccf9003b376f42b961813f18a80e7de4872ed328a846645a7b2a0c68551.yml
3-
openapi_spec_hash: 4750dcce77e6b76b240f058d9ecd06ad
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/supermemory--inc%2Fsupermemory-new-57367558035f913c25c9a9a4c66480f1e53bb79629c688adc3281013d837b07d.yml
3+
openapi_spec_hash: 56a311a6bfaa5ed4a23c7927fc80b514
44
config_hash: a69d5c502ffbfb11a2c8ec61ca5823e9

src/supermemory/_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ def profile(
294294
self,
295295
*,
296296
container_tag: str,
297-
threshold: float,
298297
q: str | Omit = omit,
298+
threshold: float | Omit = omit,
299299
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
300300
# The extra values given here take precedence over values defined on the client or passed to this method.
301301
extra_headers: Headers | None = None,
@@ -310,11 +310,11 @@ def profile(
310310
container_tag: Tag to filter the profile by. This can be an ID for your user, a project ID, or
311311
any other identifier you wish to use to filter memories.
312312
313+
q: Optional search query to include search results in the response
314+
313315
threshold: Threshold for search results. Only results with a score above this threshold
314316
will be included.
315317
316-
q: Optional search query to include search results in the response
317-
318318
extra_headers: Send extra headers
319319
320320
extra_query: Add additional query parameters to the request
@@ -328,8 +328,8 @@ def profile(
328328
body=maybe_transform(
329329
{
330330
"container_tag": container_tag,
331-
"threshold": threshold,
332331
"q": q,
332+
"threshold": threshold,
333333
},
334334
client_profile_params.ClientProfileParams,
335335
),
@@ -597,8 +597,8 @@ async def profile(
597597
self,
598598
*,
599599
container_tag: str,
600-
threshold: float,
601600
q: str | Omit = omit,
601+
threshold: float | Omit = omit,
602602
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
603603
# The extra values given here take precedence over values defined on the client or passed to this method.
604604
extra_headers: Headers | None = None,
@@ -613,11 +613,11 @@ async def profile(
613613
container_tag: Tag to filter the profile by. This can be an ID for your user, a project ID, or
614614
any other identifier you wish to use to filter memories.
615615
616+
q: Optional search query to include search results in the response
617+
616618
threshold: Threshold for search results. Only results with a score above this threshold
617619
will be included.
618620
619-
q: Optional search query to include search results in the response
620-
621621
extra_headers: Send extra headers
622622
623623
extra_query: Add additional query parameters to the request
@@ -631,8 +631,8 @@ async def profile(
631631
body=await async_maybe_transform(
632632
{
633633
"container_tag": container_tag,
634-
"threshold": threshold,
635634
"q": q,
635+
"threshold": threshold,
636636
},
637637
client_profile_params.ClientProfileParams,
638638
),

src/supermemory/types/client_profile_params.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ class ClientProfileParams(TypedDict, total=False):
1717
to use to filter memories.
1818
"""
1919

20-
threshold: Required[float]
20+
q: str
21+
"""Optional search query to include search results in the response"""
22+
23+
threshold: float
2124
"""Threshold for search results.
2225
2326
Only results with a score above this threshold will be included.
2427
"""
25-
26-
q: str
27-
"""Optional search query to include search results in the response"""

tests/api_resources/test_client.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def test_streaming_response_add(self, client: Supermemory) -> None:
6868
def test_method_profile(self, client: Supermemory) -> None:
6969
client_ = client.profile(
7070
container_tag="containerTag",
71-
threshold=0,
7271
)
7372
assert_matches_type(ProfileResponse, client_, path=["response"])
7473

@@ -77,8 +76,8 @@ def test_method_profile(self, client: Supermemory) -> None:
7776
def test_method_profile_with_all_params(self, client: Supermemory) -> None:
7877
client_ = client.profile(
7978
container_tag="containerTag",
80-
threshold=0,
8179
q="q",
80+
threshold=0,
8281
)
8382
assert_matches_type(ProfileResponse, client_, path=["response"])
8483

@@ -87,7 +86,6 @@ def test_method_profile_with_all_params(self, client: Supermemory) -> None:
8786
def test_raw_response_profile(self, client: Supermemory) -> None:
8887
response = client.with_raw_response.profile(
8988
container_tag="containerTag",
90-
threshold=0,
9189
)
9290

9391
assert response.is_closed is True
@@ -100,7 +98,6 @@ def test_raw_response_profile(self, client: Supermemory) -> None:
10098
def test_streaming_response_profile(self, client: Supermemory) -> None:
10199
with client.with_streaming_response.profile(
102100
container_tag="containerTag",
103-
threshold=0,
104101
) as response:
105102
assert not response.is_closed
106103
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -167,7 +164,6 @@ async def test_streaming_response_add(self, async_client: AsyncSupermemory) -> N
167164
async def test_method_profile(self, async_client: AsyncSupermemory) -> None:
168165
client = await async_client.profile(
169166
container_tag="containerTag",
170-
threshold=0,
171167
)
172168
assert_matches_type(ProfileResponse, client, path=["response"])
173169

@@ -176,8 +172,8 @@ async def test_method_profile(self, async_client: AsyncSupermemory) -> None:
176172
async def test_method_profile_with_all_params(self, async_client: AsyncSupermemory) -> None:
177173
client = await async_client.profile(
178174
container_tag="containerTag",
179-
threshold=0,
180175
q="q",
176+
threshold=0,
181177
)
182178
assert_matches_type(ProfileResponse, client, path=["response"])
183179

@@ -186,7 +182,6 @@ async def test_method_profile_with_all_params(self, async_client: AsyncSupermemo
186182
async def test_raw_response_profile(self, async_client: AsyncSupermemory) -> None:
187183
response = await async_client.with_raw_response.profile(
188184
container_tag="containerTag",
189-
threshold=0,
190185
)
191186

192187
assert response.is_closed is True
@@ -199,7 +194,6 @@ async def test_raw_response_profile(self, async_client: AsyncSupermemory) -> Non
199194
async def test_streaming_response_profile(self, async_client: AsyncSupermemory) -> None:
200195
async with async_client.with_streaming_response.profile(
201196
container_tag="containerTag",
202-
threshold=0,
203197
) as response:
204198
assert not response.is_closed
205199
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

0 commit comments

Comments
 (0)