zep-cloud 2.10.2__tar.gz → 2.12.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/PKG-INFO +1 -1
  2. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/pyproject.toml +1 -1
  3. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/__init__.py +2 -0
  4. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/client_wrapper.py +1 -1
  5. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/graph/client.py +151 -0
  6. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/memory/client.py +16 -4
  7. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/__init__.py +2 -0
  8. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/entity_node.py +0 -5
  9. zep_cloud-2.12.0/src/zep_cloud/types/episode_data.py +33 -0
  10. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/new_fact.py +1 -1
  11. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/user/client.py +14 -10
  12. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/LICENSE +0 -0
  13. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/README.md +0 -0
  14. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/base_client.py +0 -0
  15. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/client.py +0 -0
  16. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/__init__.py +0 -0
  17. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/api_error.py +0 -0
  18. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/datetime_utils.py +0 -0
  19. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/file.py +0 -0
  20. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/http_client.py +0 -0
  21. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/jsonable_encoder.py +0 -0
  22. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/pydantic_utilities.py +0 -0
  23. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/query_encoder.py +0 -0
  24. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/remove_none_from_dict.py +0 -0
  25. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/core/request_options.py +0 -0
  26. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/document/__init__.py +0 -0
  27. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/document/client.py +0 -0
  28. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/environment.py +0 -0
  29. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/errors/__init__.py +0 -0
  30. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/errors/bad_request_error.py +0 -0
  31. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/errors/conflict_error.py +0 -0
  32. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/errors/internal_server_error.py +0 -0
  33. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/errors/not_found_error.py +0 -0
  34. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/errors/unauthorized_error.py +0 -0
  35. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/external_clients/document.py +0 -0
  36. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/external_clients/graph.py +0 -0
  37. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/external_clients/memory.py +0 -0
  38. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/external_clients/ontology.py +0 -0
  39. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/external_clients/user.py +0 -0
  40. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/extractor/__init__.py +0 -0
  41. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/extractor/models.py +0 -0
  42. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/graph/__init__.py +0 -0
  43. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/graph/edge/__init__.py +0 -0
  44. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/graph/edge/client.py +0 -0
  45. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/graph/episode/__init__.py +0 -0
  46. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/graph/episode/client.py +0 -0
  47. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/graph/node/__init__.py +0 -0
  48. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/graph/node/client.py +0 -0
  49. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/group/__init__.py +0 -0
  50. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/group/client.py +0 -0
  51. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/memory/__init__.py +0 -0
  52. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/py.typed +0 -0
  53. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/add_memory_response.py +0 -0
  54. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/add_triple_response.py +0 -0
  55. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/api_error.py +0 -0
  56. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/apidata_document.py +0 -0
  57. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/apidata_document_collection.py +0 -0
  58. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/apidata_document_search_response.py +0 -0
  59. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/apidata_document_with_score.py +0 -0
  60. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/classify_session_request.py +0 -0
  61. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/create_document_request.py +0 -0
  62. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/end_session_response.py +0 -0
  63. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/end_sessions_response.py +0 -0
  64. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/entity_edge.py +0 -0
  65. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/entity_property.py +0 -0
  66. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/entity_property_type.py +0 -0
  67. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/entity_type.py +0 -0
  68. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/entity_type_response.py +0 -0
  69. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/episode.py +0 -0
  70. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/episode_response.py +0 -0
  71. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/fact.py +0 -0
  72. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/fact_rating_examples.py +0 -0
  73. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/fact_rating_instruction.py +0 -0
  74. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/fact_response.py +0 -0
  75. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/facts_response.py +0 -0
  76. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/graph_data_type.py +0 -0
  77. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/graph_edges_request.py +0 -0
  78. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/graph_nodes_request.py +0 -0
  79. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/graph_search_results.py +0 -0
  80. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/graph_search_scope.py +0 -0
  81. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/group.py +0 -0
  82. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/group_list_response.py +0 -0
  83. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/memory.py +0 -0
  84. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/memory_search_result.py +0 -0
  85. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/message.py +0 -0
  86. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/message_list_response.py +0 -0
  87. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/question.py +0 -0
  88. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/reranker.py +0 -0
  89. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/role_type.py +0 -0
  90. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/search_filters.py +0 -0
  91. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/search_scope.py +0 -0
  92. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/search_type.py +0 -0
  93. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/session.py +0 -0
  94. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/session_classification.py +0 -0
  95. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/session_list_response.py +0 -0
  96. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/session_search_response.py +0 -0
  97. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/session_search_result.py +0 -0
  98. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/success_response.py +0 -0
  99. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/summary.py +0 -0
  100. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/summary_list_response.py +0 -0
  101. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/update_document_list_request.py +0 -0
  102. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/user.py +0 -0
  103. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/user_list_response.py +0 -0
  104. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/types/user_node_response.py +0 -0
  105. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/user/__init__.py +0 -0
  106. {zep_cloud-2.10.2 → zep_cloud-2.12.0}/src/zep_cloud/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zep-cloud
3
- Version: 2.10.2
3
+ Version: 2.12.0
4
4
  Summary:
5
5
  Requires-Python: >=3.9.0,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "zep-cloud"
3
- version = "2.10.2"
3
+ version = "2.12.0"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -19,6 +19,7 @@ from .types import (
19
19
  EntityType,
20
20
  EntityTypeResponse,
21
21
  Episode,
22
+ EpisodeData,
22
23
  EpisodeResponse,
23
24
  Fact,
24
25
  FactRatingExamples,
@@ -82,6 +83,7 @@ __all__ = [
82
83
  "EntityType",
83
84
  "EntityTypeResponse",
84
85
  "Episode",
86
+ "EpisodeData",
85
87
  "EpisodeResponse",
86
88
  "Fact",
87
89
  "FactRatingExamples",
@@ -17,7 +17,7 @@ class BaseClientWrapper:
17
17
  headers: typing.Dict[str, str] = {
18
18
  "X-Fern-Language": "Python",
19
19
  "X-Fern-SDK-Name": "zep-cloud",
20
- "X-Fern-SDK-Version": "2.10.2",
20
+ "X-Fern-SDK-Version": "2.12.0",
21
21
  }
22
22
  headers["Authorization"] = f"Api-Key {self.api_key}"
23
23
  return headers
@@ -15,6 +15,7 @@ from ..types.api_error import ApiError as types_api_error_ApiError
15
15
  from ..types.entity_type import EntityType
16
16
  from ..types.entity_type_response import EntityTypeResponse
17
17
  from ..types.episode import Episode
18
+ from ..types.episode_data import EpisodeData
18
19
  from ..types.graph_data_type import GraphDataType
19
20
  from ..types.graph_search_results import GraphSearchResults
20
21
  from ..types.graph_search_scope import GraphSearchScope
@@ -136,6 +137,7 @@ class GraphClient:
136
137
  *,
137
138
  data: str,
138
139
  type: GraphDataType,
140
+ created_at: typing.Optional[str] = OMIT,
139
141
  group_id: typing.Optional[str] = OMIT,
140
142
  source_description: typing.Optional[str] = OMIT,
141
143
  user_id: typing.Optional[str] = OMIT,
@@ -150,6 +152,8 @@ class GraphClient:
150
152
 
151
153
  type : GraphDataType
152
154
 
155
+ created_at : typing.Optional[str]
156
+
153
157
  group_id : typing.Optional[str]
154
158
 
155
159
  source_description : typing.Optional[str]
@@ -180,6 +184,7 @@ class GraphClient:
180
184
  "graph",
181
185
  method="POST",
182
186
  json={
187
+ "created_at": created_at,
183
188
  "data": data,
184
189
  "group_id": group_id,
185
190
  "source_description": source_description,
@@ -205,6 +210,73 @@ class GraphClient:
205
210
  raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
206
211
  raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
207
212
 
213
+ def add_batch(
214
+ self,
215
+ *,
216
+ episodes: typing.Sequence[EpisodeData],
217
+ group_id: typing.Optional[str] = OMIT,
218
+ user_id: typing.Optional[str] = OMIT,
219
+ request_options: typing.Optional[RequestOptions] = None
220
+ ) -> typing.List[Episode]:
221
+ """
222
+ Add data to the graph in batch mode (each episode processed concurrently). Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
223
+
224
+ Parameters
225
+ ----------
226
+ episodes : typing.Sequence[EpisodeData]
227
+
228
+ group_id : typing.Optional[str]
229
+
230
+ user_id : typing.Optional[str]
231
+
232
+ request_options : typing.Optional[RequestOptions]
233
+ Request-specific configuration.
234
+
235
+ Returns
236
+ -------
237
+ typing.List[Episode]
238
+ Added episodes
239
+
240
+ Examples
241
+ --------
242
+ from zep_cloud import EpisodeData
243
+ from zep_cloud.client import Zep
244
+
245
+ client = Zep(
246
+ api_key="YOUR_API_KEY",
247
+ )
248
+ client.graph.add_batch(
249
+ episodes=[
250
+ EpisodeData(
251
+ data="data",
252
+ type="text",
253
+ )
254
+ ],
255
+ )
256
+ """
257
+ _response = self._client_wrapper.httpx_client.request(
258
+ "graph-batch",
259
+ method="POST",
260
+ json={"episodes": episodes, "group_id": group_id, "user_id": user_id},
261
+ request_options=request_options,
262
+ omit=OMIT,
263
+ )
264
+ try:
265
+ if 200 <= _response.status_code < 300:
266
+ return pydantic_v1.parse_obj_as(typing.List[Episode], _response.json()) # type: ignore
267
+ if _response.status_code == 400:
268
+ raise BadRequestError(
269
+ pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
270
+ )
271
+ if _response.status_code == 500:
272
+ raise InternalServerError(
273
+ pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
274
+ )
275
+ _response_json = _response.json()
276
+ except JSONDecodeError:
277
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
278
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
279
+
208
280
  def add_fact_triple(
209
281
  self,
210
282
  *,
@@ -565,6 +637,7 @@ class AsyncGraphClient:
565
637
  *,
566
638
  data: str,
567
639
  type: GraphDataType,
640
+ created_at: typing.Optional[str] = OMIT,
568
641
  group_id: typing.Optional[str] = OMIT,
569
642
  source_description: typing.Optional[str] = OMIT,
570
643
  user_id: typing.Optional[str] = OMIT,
@@ -579,6 +652,8 @@ class AsyncGraphClient:
579
652
 
580
653
  type : GraphDataType
581
654
 
655
+ created_at : typing.Optional[str]
656
+
582
657
  group_id : typing.Optional[str]
583
658
 
584
659
  source_description : typing.Optional[str]
@@ -617,6 +692,7 @@ class AsyncGraphClient:
617
692
  "graph",
618
693
  method="POST",
619
694
  json={
695
+ "created_at": created_at,
620
696
  "data": data,
621
697
  "group_id": group_id,
622
698
  "source_description": source_description,
@@ -642,6 +718,81 @@ class AsyncGraphClient:
642
718
  raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
643
719
  raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
644
720
 
721
+ async def add_batch(
722
+ self,
723
+ *,
724
+ episodes: typing.Sequence[EpisodeData],
725
+ group_id: typing.Optional[str] = OMIT,
726
+ user_id: typing.Optional[str] = OMIT,
727
+ request_options: typing.Optional[RequestOptions] = None
728
+ ) -> typing.List[Episode]:
729
+ """
730
+ Add data to the graph in batch mode (each episode processed concurrently). Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
731
+
732
+ Parameters
733
+ ----------
734
+ episodes : typing.Sequence[EpisodeData]
735
+
736
+ group_id : typing.Optional[str]
737
+
738
+ user_id : typing.Optional[str]
739
+
740
+ request_options : typing.Optional[RequestOptions]
741
+ Request-specific configuration.
742
+
743
+ Returns
744
+ -------
745
+ typing.List[Episode]
746
+ Added episodes
747
+
748
+ Examples
749
+ --------
750
+ import asyncio
751
+
752
+ from zep_cloud import EpisodeData
753
+ from zep_cloud.client import AsyncZep
754
+
755
+ client = AsyncZep(
756
+ api_key="YOUR_API_KEY",
757
+ )
758
+
759
+
760
+ async def main() -> None:
761
+ await client.graph.add_batch(
762
+ episodes=[
763
+ EpisodeData(
764
+ data="data",
765
+ type="text",
766
+ )
767
+ ],
768
+ )
769
+
770
+
771
+ asyncio.run(main())
772
+ """
773
+ _response = await self._client_wrapper.httpx_client.request(
774
+ "graph-batch",
775
+ method="POST",
776
+ json={"episodes": episodes, "group_id": group_id, "user_id": user_id},
777
+ request_options=request_options,
778
+ omit=OMIT,
779
+ )
780
+ try:
781
+ if 200 <= _response.status_code < 300:
782
+ return pydantic_v1.parse_obj_as(typing.List[Episode], _response.json()) # type: ignore
783
+ if _response.status_code == 400:
784
+ raise BadRequestError(
785
+ pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
786
+ )
787
+ if _response.status_code == 500:
788
+ raise InternalServerError(
789
+ pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
790
+ )
791
+ _response_json = _response.json()
792
+ except JSONDecodeError:
793
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
794
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
795
+
645
796
  async def add_fact_triple(
646
797
  self,
647
798
  *,
@@ -852,7 +852,7 @@ class MemoryClient:
852
852
  self,
853
853
  session_id: str,
854
854
  *,
855
- facts: typing.Optional[typing.Sequence[NewFact]] = OMIT,
855
+ facts: typing.Sequence[NewFact],
856
856
  request_options: typing.Optional[RequestOptions] = None,
857
857
  ) -> SuccessResponse:
858
858
  """
@@ -863,7 +863,7 @@ class MemoryClient:
863
863
  session_id : str
864
864
  Session ID
865
865
 
866
- facts : typing.Optional[typing.Sequence[NewFact]]
866
+ facts : typing.Sequence[NewFact]
867
867
 
868
868
  request_options : typing.Optional[RequestOptions]
869
869
  Request-specific configuration.
@@ -875,6 +875,7 @@ class MemoryClient:
875
875
 
876
876
  Examples
877
877
  --------
878
+ from zep_cloud import NewFact
878
879
  from zep_cloud.client import Zep
879
880
 
880
881
  client = Zep(
@@ -882,6 +883,11 @@ class MemoryClient:
882
883
  )
883
884
  client.memory.add_session_facts(
884
885
  session_id="sessionId",
886
+ facts=[
887
+ NewFact(
888
+ fact="fact",
889
+ )
890
+ ],
885
891
  )
886
892
  """
887
893
  _response = self._client_wrapper.httpx_client.request(
@@ -2396,7 +2402,7 @@ class AsyncMemoryClient:
2396
2402
  self,
2397
2403
  session_id: str,
2398
2404
  *,
2399
- facts: typing.Optional[typing.Sequence[NewFact]] = OMIT,
2405
+ facts: typing.Sequence[NewFact],
2400
2406
  request_options: typing.Optional[RequestOptions] = None,
2401
2407
  ) -> SuccessResponse:
2402
2408
  """
@@ -2407,7 +2413,7 @@ class AsyncMemoryClient:
2407
2413
  session_id : str
2408
2414
  Session ID
2409
2415
 
2410
- facts : typing.Optional[typing.Sequence[NewFact]]
2416
+ facts : typing.Sequence[NewFact]
2411
2417
 
2412
2418
  request_options : typing.Optional[RequestOptions]
2413
2419
  Request-specific configuration.
@@ -2421,6 +2427,7 @@ class AsyncMemoryClient:
2421
2427
  --------
2422
2428
  import asyncio
2423
2429
 
2430
+ from zep_cloud import NewFact
2424
2431
  from zep_cloud.client import AsyncZep
2425
2432
 
2426
2433
  client = AsyncZep(
@@ -2431,6 +2438,11 @@ class AsyncMemoryClient:
2431
2438
  async def main() -> None:
2432
2439
  await client.memory.add_session_facts(
2433
2440
  session_id="sessionId",
2441
+ facts=[
2442
+ NewFact(
2443
+ fact="fact",
2444
+ )
2445
+ ],
2434
2446
  )
2435
2447
 
2436
2448
 
@@ -18,6 +18,7 @@ from .entity_property_type import EntityPropertyType
18
18
  from .entity_type import EntityType
19
19
  from .entity_type_response import EntityTypeResponse
20
20
  from .episode import Episode
21
+ from .episode_data import EpisodeData
21
22
  from .episode_response import EpisodeResponse
22
23
  from .fact import Fact
23
24
  from .fact_rating_examples import FactRatingExamples
@@ -74,6 +75,7 @@ __all__ = [
74
75
  "EntityType",
75
76
  "EntityTypeResponse",
76
77
  "Episode",
78
+ "EpisodeData",
77
79
  "EpisodeResponse",
78
80
  "Fact",
79
81
  "FactRatingExamples",
@@ -18,11 +18,6 @@ class EntityNode(pydantic_v1.BaseModel):
18
18
  Creation time of the node
19
19
  """
20
20
 
21
- episodes: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
22
- """
23
- List of episode uuids that mention this node
24
- """
25
-
26
21
  labels: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None)
27
22
  """
28
23
  Labels associated with the node
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
+ from .graph_data_type import GraphDataType
9
+
10
+
11
+ class EpisodeData(pydantic_v1.BaseModel):
12
+ created_at: typing.Optional[str] = None
13
+ data: str
14
+ source_description: typing.Optional[str] = None
15
+ type: GraphDataType
16
+
17
+ def json(self, **kwargs: typing.Any) -> str:
18
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
19
+ return super().json(**kwargs_with_defaults)
20
+
21
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
22
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
23
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
24
+
25
+ return deep_union_pydantic_dicts(
26
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
27
+ )
28
+
29
+ class Config:
30
+ frozen = True
31
+ smart_union = True
32
+ extra = pydantic_v1.Extra.allow
33
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -8,7 +8,7 @@ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
8
 
9
9
 
10
10
  class NewFact(pydantic_v1.BaseModel):
11
- fact: typing.Optional[str] = None
11
+ fact: str
12
12
 
13
13
  def json(self, **kwargs: typing.Any) -> str:
14
14
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -31,12 +31,12 @@ class UserClient:
31
31
  def add(
32
32
  self,
33
33
  *,
34
+ user_id: str,
34
35
  email: typing.Optional[str] = OMIT,
35
36
  fact_rating_instruction: typing.Optional[FactRatingInstruction] = OMIT,
36
37
  first_name: typing.Optional[str] = OMIT,
37
38
  last_name: typing.Optional[str] = OMIT,
38
39
  metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
39
- user_id: typing.Optional[str] = OMIT,
40
40
  request_options: typing.Optional[RequestOptions] = None,
41
41
  ) -> User:
42
42
  """
@@ -44,6 +44,9 @@ class UserClient:
44
44
 
45
45
  Parameters
46
46
  ----------
47
+ user_id : str
48
+ The unique identifier of the user.
49
+
47
50
  email : typing.Optional[str]
48
51
  The email address of the user.
49
52
 
@@ -59,9 +62,6 @@ class UserClient:
59
62
  metadata : typing.Optional[typing.Dict[str, typing.Any]]
60
63
  The metadata associated with the user.
61
64
 
62
- user_id : typing.Optional[str]
63
- The unique identifier of the user.
64
-
65
65
  request_options : typing.Optional[RequestOptions]
66
66
  Request-specific configuration.
67
67
 
@@ -77,7 +77,9 @@ class UserClient:
77
77
  client = Zep(
78
78
  api_key="YOUR_API_KEY",
79
79
  )
80
- client.user.add()
80
+ client.user.add(
81
+ user_id="user_id",
82
+ )
81
83
  """
82
84
  _response = self._client_wrapper.httpx_client.request(
83
85
  "users",
@@ -493,12 +495,12 @@ class AsyncUserClient:
493
495
  async def add(
494
496
  self,
495
497
  *,
498
+ user_id: str,
496
499
  email: typing.Optional[str] = OMIT,
497
500
  fact_rating_instruction: typing.Optional[FactRatingInstruction] = OMIT,
498
501
  first_name: typing.Optional[str] = OMIT,
499
502
  last_name: typing.Optional[str] = OMIT,
500
503
  metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
501
- user_id: typing.Optional[str] = OMIT,
502
504
  request_options: typing.Optional[RequestOptions] = None,
503
505
  ) -> User:
504
506
  """
@@ -506,6 +508,9 @@ class AsyncUserClient:
506
508
 
507
509
  Parameters
508
510
  ----------
511
+ user_id : str
512
+ The unique identifier of the user.
513
+
509
514
  email : typing.Optional[str]
510
515
  The email address of the user.
511
516
 
@@ -521,9 +526,6 @@ class AsyncUserClient:
521
526
  metadata : typing.Optional[typing.Dict[str, typing.Any]]
522
527
  The metadata associated with the user.
523
528
 
524
- user_id : typing.Optional[str]
525
- The unique identifier of the user.
526
-
527
529
  request_options : typing.Optional[RequestOptions]
528
530
  Request-specific configuration.
529
531
 
@@ -544,7 +546,9 @@ class AsyncUserClient:
544
546
 
545
547
 
546
548
  async def main() -> None:
547
- await client.user.add()
549
+ await client.user.add(
550
+ user_id="user_id",
551
+ )
548
552
 
549
553
 
550
554
  asyncio.run(main())
File without changes
File without changes