Skip to content

Commit 2b8b59b

Browse files
SDK regeneration
1 parent a218b70 commit 2b8b59b

16 files changed

Lines changed: 366 additions & 1208 deletions

‎reference.md‎

Lines changed: 59 additions & 242 deletions
Large diffs are not rendered by default.

‎src/zep_cloud/__init__.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
GraphNodesRequest,
3939
GraphSearchResults,
4040
GraphSearchScope,
41-
GraphThemesRequest,
4241
GraphitiMetadataFilterGroupType,
4342
HubDetectConfig,
4443
ListContextTemplatesResponse,
@@ -116,7 +115,6 @@
116115
"GraphNodesRequest",
117116
"GraphSearchResults",
118117
"GraphSearchScope",
119-
"GraphThemesRequest",
120118
"GraphitiMetadataFilterGroupType",
121119
"HubDetectConfig",
122120
"InternalServerError",

‎src/zep_cloud/core/client_wrapper.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def __init__(
2222

2323
def get_headers(self) -> typing.Dict[str, str]:
2424
headers: typing.Dict[str, str] = {
25-
"User-Agent": "zep-cloud/3.19.0",
25+
"User-Agent": "zep-cloud/2.0.0rc5",
2626
"X-Fern-Language": "Python",
2727
"X-Fern-SDK-Name": "zep-cloud",
28-
"X-Fern-SDK-Version": "3.19.0",
28+
"X-Fern-SDK-Version": "2.0.0rc5",
2929
**(self.get_custom_headers() or {}),
3030
}
3131
headers["Authorization"] = f"Api-Key {self.api_key}"

‎src/zep_cloud/graph/__init__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
# isort: skip_file
44

5-
from . import community, edge, episode, node, theme
5+
from . import community, edge, episode, node
66

7-
__all__ = ["community", "edge", "episode", "node", "theme"]
7+
__all__ = ["community", "edge", "episode", "node"]

‎src/zep_cloud/graph/client.py‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
from .episode.client import AsyncEpisodeClient, EpisodeClient
3131
from .node.client import AsyncNodeClient, NodeClient
3232
from .raw_client import AsyncRawGraphClient, RawGraphClient
33-
from .theme.client import AsyncThemeClient, ThemeClient
3433

3534
# this is used as the default value for optional parameters
3635
OMIT = typing.cast(typing.Any, ...)
@@ -47,8 +46,6 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
4746

4847
self.node = NodeClient(client_wrapper=client_wrapper)
4948

50-
self.theme = ThemeClient(client_wrapper=client_wrapper)
51-
5249
@property
5350
def with_raw_response(self) -> RawGraphClient:
5451
"""
@@ -296,7 +293,6 @@ def add(
296293
type: GraphDataType,
297294
created_at: typing.Optional[str] = OMIT,
298295
graph_id: typing.Optional[str] = OMIT,
299-
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
300296
source_description: typing.Optional[str] = OMIT,
301297
user_id: typing.Optional[str] = OMIT,
302298
request_options: typing.Optional[RequestOptions] = None,
@@ -315,9 +311,6 @@ def add(
315311
graph_id : typing.Optional[str]
316312
graph_id is the ID of the graph to which the data will be added. If adding to the user graph, please use user_id field instead.
317313
318-
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
319-
Optional metadata key-value pairs. Max 10 keys. Values must be strings, numbers, or booleans.
320-
321314
source_description : typing.Optional[str]
322315
323316
user_id : typing.Optional[str]
@@ -348,7 +341,6 @@ def add(
348341
type=type,
349342
created_at=created_at,
350343
graph_id=graph_id,
351-
metadata=metadata,
352344
source_description=source_description,
353345
user_id=user_id,
354346
request_options=request_options,
@@ -416,7 +408,6 @@ def add_fact_triple(
416408
fact_uuid: typing.Optional[str] = OMIT,
417409
graph_id: typing.Optional[str] = OMIT,
418410
invalid_at: typing.Optional[str] = OMIT,
419-
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
420411
source_node_attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
421412
source_node_labels: typing.Optional[typing.Sequence[str]] = OMIT,
422413
source_node_name: typing.Optional[str] = OMIT,
@@ -460,10 +451,6 @@ def add_fact_triple(
460451
invalid_at : typing.Optional[str]
461452
The time (if any) at which the fact stops being true
462453
463-
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
464-
Optional metadata key-value pairs for the shadow episode created for this fact triple.
465-
Max 10 keys. Values must be strings, numbers, or booleans.
466-
467454
source_node_attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
468455
Additional attributes of the source node. Values must be scalar types (string, number, boolean, or null).
469456
Nested objects and arrays are not allowed.
@@ -530,7 +517,6 @@ def add_fact_triple(
530517
fact_uuid=fact_uuid,
531518
graph_id=graph_id,
532519
invalid_at=invalid_at,
533-
metadata=metadata,
534520
source_node_attributes=source_node_attributes,
535521
source_node_labels=source_node_labels,
536522
source_node_name=source_node_name,
@@ -1002,8 +988,6 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
1002988

1003989
self.node = AsyncNodeClient(client_wrapper=client_wrapper)
1004990

1005-
self.theme = AsyncThemeClient(client_wrapper=client_wrapper)
1006-
1007991
@property
1008992
def with_raw_response(self) -> AsyncRawGraphClient:
1009993
"""
@@ -1291,7 +1275,6 @@ async def add(
12911275
type: GraphDataType,
12921276
created_at: typing.Optional[str] = OMIT,
12931277
graph_id: typing.Optional[str] = OMIT,
1294-
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
12951278
source_description: typing.Optional[str] = OMIT,
12961279
user_id: typing.Optional[str] = OMIT,
12971280
request_options: typing.Optional[RequestOptions] = None,
@@ -1310,9 +1293,6 @@ async def add(
13101293
graph_id : typing.Optional[str]
13111294
graph_id is the ID of the graph to which the data will be added. If adding to the user graph, please use user_id field instead.
13121295
1313-
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1314-
Optional metadata key-value pairs. Max 10 keys. Values must be strings, numbers, or booleans.
1315-
13161296
source_description : typing.Optional[str]
13171297
13181298
user_id : typing.Optional[str]
@@ -1351,7 +1331,6 @@ async def main() -> None:
13511331
type=type,
13521332
created_at=created_at,
13531333
graph_id=graph_id,
1354-
metadata=metadata,
13551334
source_description=source_description,
13561335
user_id=user_id,
13571336
request_options=request_options,
@@ -1427,7 +1406,6 @@ async def add_fact_triple(
14271406
fact_uuid: typing.Optional[str] = OMIT,
14281407
graph_id: typing.Optional[str] = OMIT,
14291408
invalid_at: typing.Optional[str] = OMIT,
1430-
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
14311409
source_node_attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
14321410
source_node_labels: typing.Optional[typing.Sequence[str]] = OMIT,
14331411
source_node_name: typing.Optional[str] = OMIT,
@@ -1471,10 +1449,6 @@ async def add_fact_triple(
14711449
invalid_at : typing.Optional[str]
14721450
The time (if any) at which the fact stops being true
14731451
1474-
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1475-
Optional metadata key-value pairs for the shadow episode created for this fact triple.
1476-
Max 10 keys. Values must be strings, numbers, or booleans.
1477-
14781452
source_node_attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
14791453
Additional attributes of the source node. Values must be scalar types (string, number, boolean, or null).
14801454
Nested objects and arrays are not allowed.
@@ -1549,7 +1523,6 @@ async def main() -> None:
15491523
fact_uuid=fact_uuid,
15501524
graph_id=graph_id,
15511525
invalid_at=invalid_at,
1552-
metadata=metadata,
15531526
source_node_attributes=source_node_attributes,
15541527
source_node_labels=source_node_labels,
15551528
source_node_name=source_node_name,

‎src/zep_cloud/graph/episode/client.py‎

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
from ...types.success_response import SuccessResponse
1111
from .raw_client import AsyncRawEpisodeClient, RawEpisodeClient
1212

13+
# this is used as the default value for optional parameters
14+
OMIT = typing.cast(typing.Any, ...)
15+
1316

1417
class EpisodeClient:
1518
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -170,6 +173,47 @@ def delete(self, uuid_: str, *, request_options: typing.Optional[RequestOptions]
170173
_response = self._raw_client.delete(uuid_, request_options=request_options)
171174
return _response.data
172175

176+
def update(
177+
self,
178+
uuid_: str,
179+
*,
180+
metadata: typing.Dict[str, typing.Optional[typing.Any]],
181+
request_options: typing.Optional[RequestOptions] = None,
182+
) -> Episode:
183+
"""
184+
Update episode metadata with merge semantics. Supplied keys overwrite or add to existing metadata; keys set to null are removed.
185+
186+
Parameters
187+
----------
188+
uuid_ : str
189+
Episode UUID
190+
191+
metadata : typing.Dict[str, typing.Optional[typing.Any]]
192+
Updated metadata. Merged with existing metadata: supplied keys overwrite/add, keys set to null are removed. Maximum 10 keys. Values must be scalars (string, number, boolean, or null).
193+
194+
request_options : typing.Optional[RequestOptions]
195+
Request-specific configuration.
196+
197+
Returns
198+
-------
199+
Episode
200+
Updated episode
201+
202+
Examples
203+
--------
204+
from zep_cloud import Zep
205+
206+
client = Zep(
207+
api_key="YOUR_API_KEY",
208+
)
209+
client.graph.episode.update(
210+
uuid_="uuid",
211+
metadata={"key": "value"},
212+
)
213+
"""
214+
_response = self._raw_client.update(uuid_, metadata=metadata, request_options=request_options)
215+
return _response.data
216+
173217
def get_nodes_and_edges(
174218
self, uuid_: str, *, request_options: typing.Optional[RequestOptions] = None
175219
) -> EpisodeMentions:
@@ -395,6 +439,55 @@ async def main() -> None:
395439
_response = await self._raw_client.delete(uuid_, request_options=request_options)
396440
return _response.data
397441

442+
async def update(
443+
self,
444+
uuid_: str,
445+
*,
446+
metadata: typing.Dict[str, typing.Optional[typing.Any]],
447+
request_options: typing.Optional[RequestOptions] = None,
448+
) -> Episode:
449+
"""
450+
Update episode metadata with merge semantics. Supplied keys overwrite or add to existing metadata; keys set to null are removed.
451+
452+
Parameters
453+
----------
454+
uuid_ : str
455+
Episode UUID
456+
457+
metadata : typing.Dict[str, typing.Optional[typing.Any]]
458+
Updated metadata. Merged with existing metadata: supplied keys overwrite/add, keys set to null are removed. Maximum 10 keys. Values must be scalars (string, number, boolean, or null).
459+
460+
request_options : typing.Optional[RequestOptions]
461+
Request-specific configuration.
462+
463+
Returns
464+
-------
465+
Episode
466+
Updated episode
467+
468+
Examples
469+
--------
470+
import asyncio
471+
472+
from zep_cloud import AsyncZep
473+
474+
client = AsyncZep(
475+
api_key="YOUR_API_KEY",
476+
)
477+
478+
479+
async def main() -> None:
480+
await client.graph.episode.update(
481+
uuid_="uuid",
482+
metadata={"key": "value"},
483+
)
484+
485+
486+
asyncio.run(main())
487+
"""
488+
_response = await self._raw_client.update(uuid_, metadata=metadata, request_options=request_options)
489+
return _response.data
490+
398491
async def get_nodes_and_edges(
399492
self, uuid_: str, *, request_options: typing.Optional[RequestOptions] = None
400493
) -> EpisodeMentions:

0 commit comments

Comments
 (0)