77
88import httpx
99
10- from ..types import memory_add_params , memory_list_params , memory_update_params
10+ from ..types import memory_add_params , memory_list_params
1111from .._types import NOT_GIVEN , Body , Query , Headers , NotGiven
1212from .._utils import maybe_transform , async_maybe_transform
1313from .._compat import cached_property
2323from ..types .memory_get_response import MemoryGetResponse
2424from ..types .memory_list_response import MemoryListResponse
2525from ..types .memory_delete_response import MemoryDeleteResponse
26- from ..types .memory_update_response import MemoryUpdateResponse
2726
2827__all__ = ["MemoriesResource" , "AsyncMemoriesResource" ]
2928
@@ -48,50 +47,6 @@ def with_streaming_response(self) -> MemoriesResourceWithStreamingResponse:
4847 """
4948 return MemoriesResourceWithStreamingResponse (self )
5049
51- def update (
52- self ,
53- id : str ,
54- * ,
55- content : str ,
56- container_tags : List [str ] | NotGiven = NOT_GIVEN ,
57- metadata : Dict [str , Union [str , float , bool ]] | NotGiven = NOT_GIVEN ,
58- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
59- # The extra values given here take precedence over values defined on the client or passed to this method.
60- extra_headers : Headers | None = None ,
61- extra_query : Query | None = None ,
62- extra_body : Body | None = None ,
63- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
64- ) -> MemoryUpdateResponse :
65- """
66- Update a memory with any content type (text, url, file, etc.) and metadata
67-
68- Args:
69- extra_headers: Send extra headers
70-
71- extra_query: Add additional query parameters to the request
72-
73- extra_body: Add additional JSON properties to the request
74-
75- timeout: Override the client-level default timeout for this request, in seconds
76- """
77- if not id :
78- raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
79- return self ._patch (
80- f"/v3/memories/{ id } " ,
81- body = maybe_transform (
82- {
83- "content" : content ,
84- "container_tags" : container_tags ,
85- "metadata" : metadata ,
86- },
87- memory_update_params .MemoryUpdateParams ,
88- ),
89- options = make_request_options (
90- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
91- ),
92- cast_to = MemoryUpdateResponse ,
93- )
94-
9550 def list (
9651 self ,
9752 * ,
@@ -278,50 +233,6 @@ def with_streaming_response(self) -> AsyncMemoriesResourceWithStreamingResponse:
278233 """
279234 return AsyncMemoriesResourceWithStreamingResponse (self )
280235
281- async def update (
282- self ,
283- id : str ,
284- * ,
285- content : str ,
286- container_tags : List [str ] | NotGiven = NOT_GIVEN ,
287- metadata : Dict [str , Union [str , float , bool ]] | NotGiven = NOT_GIVEN ,
288- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
289- # The extra values given here take precedence over values defined on the client or passed to this method.
290- extra_headers : Headers | None = None ,
291- extra_query : Query | None = None ,
292- extra_body : Body | None = None ,
293- timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
294- ) -> MemoryUpdateResponse :
295- """
296- Update a memory with any content type (text, url, file, etc.) and metadata
297-
298- Args:
299- extra_headers: Send extra headers
300-
301- extra_query: Add additional query parameters to the request
302-
303- extra_body: Add additional JSON properties to the request
304-
305- timeout: Override the client-level default timeout for this request, in seconds
306- """
307- if not id :
308- raise ValueError (f"Expected a non-empty value for `id` but received { id !r} " )
309- return await self ._patch (
310- f"/v3/memories/{ id } " ,
311- body = await async_maybe_transform (
312- {
313- "content" : content ,
314- "container_tags" : container_tags ,
315- "metadata" : metadata ,
316- },
317- memory_update_params .MemoryUpdateParams ,
318- ),
319- options = make_request_options (
320- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
321- ),
322- cast_to = MemoryUpdateResponse ,
323- )
324-
325236 async def list (
326237 self ,
327238 * ,
@@ -492,9 +403,6 @@ class MemoriesResourceWithRawResponse:
492403 def __init__ (self , memories : MemoriesResource ) -> None :
493404 self ._memories = memories
494405
495- self .update = to_raw_response_wrapper (
496- memories .update ,
497- )
498406 self .list = to_raw_response_wrapper (
499407 memories .list ,
500408 )
@@ -513,9 +421,6 @@ class AsyncMemoriesResourceWithRawResponse:
513421 def __init__ (self , memories : AsyncMemoriesResource ) -> None :
514422 self ._memories = memories
515423
516- self .update = async_to_raw_response_wrapper (
517- memories .update ,
518- )
519424 self .list = async_to_raw_response_wrapper (
520425 memories .list ,
521426 )
@@ -534,9 +439,6 @@ class MemoriesResourceWithStreamingResponse:
534439 def __init__ (self , memories : MemoriesResource ) -> None :
535440 self ._memories = memories
536441
537- self .update = to_streamed_response_wrapper (
538- memories .update ,
539- )
540442 self .list = to_streamed_response_wrapper (
541443 memories .list ,
542444 )
@@ -555,9 +457,6 @@ class AsyncMemoriesResourceWithStreamingResponse:
555457 def __init__ (self , memories : AsyncMemoriesResource ) -> None :
556458 self ._memories = memories
557459
558- self .update = async_to_streamed_response_wrapper (
559- memories .update ,
560- )
561460 self .list = async_to_streamed_response_wrapper (
562461 memories .list ,
563462 )
0 commit comments