12
12
from ..errors .conflict_error import ConflictError
13
13
from ..errors .internal_server_error import InternalServerError
14
14
from ..errors .not_found_error import NotFoundError
15
+ from ..types .add_memory_response import AddMemoryResponse
15
16
from ..types .api_error import ApiError as types_api_error_ApiError
16
17
from ..types .classify_session_request import ClassifySessionRequest
17
18
from ..types .end_session_response import EndSessionResponse
@@ -938,9 +939,10 @@ def add(
938
939
* ,
939
940
messages : typing .Sequence [Message ],
940
941
fact_instruction : typing .Optional [str ] = OMIT ,
942
+ return_context : typing .Optional [bool ] = OMIT ,
941
943
summary_instruction : typing .Optional [str ] = OMIT ,
942
944
request_options : typing .Optional [RequestOptions ] = None ,
943
- ) -> SuccessResponse :
945
+ ) -> AddMemoryResponse :
944
946
"""
945
947
Add memory to the specified session.
946
948
@@ -955,6 +957,9 @@ def add(
955
957
fact_instruction : typing.Optional[str]
956
958
Additional instruction for generating the facts. Zep Cloud Only, will be ignored on Community Edition.
957
959
960
+ return_context : typing.Optional[bool]
961
+ Optionally return memory context relevant to the most recent messages.
962
+
958
963
summary_instruction : typing.Optional[str]
959
964
Additional instruction for generating the summary. Zep Cloud Only, will be ignored on Community Edition.
960
965
@@ -963,8 +968,8 @@ def add(
963
968
964
969
Returns
965
970
-------
966
- SuccessResponse
967
- OK
971
+ AddMemoryResponse
972
+ An object, optionally containing memory context retrieved for the last message
968
973
969
974
Examples
970
975
--------
@@ -990,13 +995,14 @@ def add(
990
995
json = {
991
996
"fact_instruction" : fact_instruction ,
992
997
"messages" : messages ,
998
+ "return_context" : return_context ,
993
999
"summary_instruction" : summary_instruction ,
994
1000
},
995
1001
request_options = request_options ,
996
1002
omit = OMIT ,
997
1003
)
998
1004
if 200 <= _response .status_code < 300 :
999
- return pydantic_v1 .parse_obj_as (SuccessResponse , _response .json ()) # type: ignore
1005
+ return pydantic_v1 .parse_obj_as (AddMemoryResponse , _response .json ()) # type: ignore
1000
1006
if _response .status_code == 500 :
1001
1007
raise InternalServerError (
1002
1008
pydantic_v1 .parse_obj_as (types_api_error_ApiError , _response .json ()) # type: ignore
@@ -2326,9 +2332,10 @@ async def add(
2326
2332
* ,
2327
2333
messages : typing .Sequence [Message ],
2328
2334
fact_instruction : typing .Optional [str ] = OMIT ,
2335
+ return_context : typing .Optional [bool ] = OMIT ,
2329
2336
summary_instruction : typing .Optional [str ] = OMIT ,
2330
2337
request_options : typing .Optional [RequestOptions ] = None ,
2331
- ) -> SuccessResponse :
2338
+ ) -> AddMemoryResponse :
2332
2339
"""
2333
2340
Add memory to the specified session.
2334
2341
@@ -2343,6 +2350,9 @@ async def add(
2343
2350
fact_instruction : typing.Optional[str]
2344
2351
Additional instruction for generating the facts. Zep Cloud Only, will be ignored on Community Edition.
2345
2352
2353
+ return_context : typing.Optional[bool]
2354
+ Optionally return memory context relevant to the most recent messages.
2355
+
2346
2356
summary_instruction : typing.Optional[str]
2347
2357
Additional instruction for generating the summary. Zep Cloud Only, will be ignored on Community Edition.
2348
2358
@@ -2351,8 +2361,8 @@ async def add(
2351
2361
2352
2362
Returns
2353
2363
-------
2354
- SuccessResponse
2355
- OK
2364
+ AddMemoryResponse
2365
+ An object, optionally containing memory context retrieved for the last message
2356
2366
2357
2367
Examples
2358
2368
--------
@@ -2378,13 +2388,14 @@ async def add(
2378
2388
json = {
2379
2389
"fact_instruction" : fact_instruction ,
2380
2390
"messages" : messages ,
2391
+ "return_context" : return_context ,
2381
2392
"summary_instruction" : summary_instruction ,
2382
2393
},
2383
2394
request_options = request_options ,
2384
2395
omit = OMIT ,
2385
2396
)
2386
2397
if 200 <= _response .status_code < 300 :
2387
- return pydantic_v1 .parse_obj_as (SuccessResponse , _response .json ()) # type: ignore
2398
+ return pydantic_v1 .parse_obj_as (AddMemoryResponse , _response .json ()) # type: ignore
2388
2399
if _response .status_code == 500 :
2389
2400
raise InternalServerError (
2390
2401
pydantic_v1 .parse_obj_as (types_api_error_ApiError , _response .json ()) # type: ignore
0 commit comments