Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2ae5251
chore: Fix fact ratings table
paul-paliychuk Apr 16, 2025
791352a
Merge branch 'main' of github.com:getzep/zep-python
paul-paliychuk May 13, 2025
be6b1b7
Merge branch 'main' of github.com:getzep/zep-python
paul-paliychuk May 26, 2025
e2adc9f
chore: Bump version
paul-paliychuk May 26, 2025
c80c78c
SDK regeneration
fern-api[bot] May 26, 2025
cd968d7
SDK regeneration
fern-api[bot] May 26, 2025
3e75648
SDK regeneration
fern-api[bot] May 26, 2025
96ad439
feat: Add support for custom entity edges
paul-paliychuk May 27, 2025
cc47bdf
Merge branch 'v2' of github.com:getzep/zep-python into v2
paul-paliychuk May 27, 2025
6a5be5e
simplify ontology client
paul-paliychuk May 27, 2025
1c23a19
SDK regeneration
fern-api[bot] May 28, 2025
626ca50
SDK regeneration
fern-api[bot] May 29, 2025
1d958ad
chore: Update doc string
paul-paliychuk Jun 2, 2025
0ec9e36
Merge branch 'main' of github.com:getzep/zep-python into v2
paul-paliychuk Jun 3, 2025
6e9c331
feat: Update sync version of set entity type method
paul-paliychuk Jun 3, 2025
bb5382a
SDK regeneration
fern-api[bot] Jun 4, 2025
ecb706e
SDK regeneration
fern-api[bot] Jun 4, 2025
a341d16
chore: Bump version
paul-paliychuk Jun 4, 2025
3d5ced0
Merge branch 'main' of github.com:getzep/zep-python into v2
paul-paliychuk Jun 4, 2025
32a3342
SDK regeneration
fern-api[bot] Jun 5, 2025
47bb410
SDK regeneration
fern-api[bot] Jun 5, 2025
3990f92
SDK regeneration
fern-api[bot] Jun 5, 2025
368e86c
SDK regeneration
fern-api[bot] Jun 5, 2025
daa52bd
SDK regeneration
fern-api[bot] Jun 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zep-cloud"
version = "2.13.1"
version = "2.14.0"
description = ""
readme = "README.md"
authors = []
Expand Down
2 changes: 2 additions & 0 deletions src/zep_cloud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
EntityTypeResponse,
Episode,
EpisodeData,
EpisodeMentions,
EpisodeResponse,
Fact,
FactRatingExamples,
Expand Down Expand Up @@ -88,6 +89,7 @@
"EntityTypeResponse",
"Episode",
"EpisodeData",
"EpisodeMentions",
"EpisodeResponse",
"Fact",
"FactRatingExamples",
Expand Down
2 changes: 1 addition & 1 deletion src/zep_cloud/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "zep-cloud",
"X-Fern-SDK-Version": "2.13.0",
"X-Fern-SDK-Version": "2.14.0",
}
headers["Authorization"] = f"Api-Key {self.api_key}"
return headers
Expand Down
18 changes: 9 additions & 9 deletions src/zep_cloud/graph/episode/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from ...errors.not_found_error import NotFoundError
from ...types.api_error import ApiError as types_api_error_ApiError
from ...types.episode import Episode
from ...types.episode_mentions import EpisodeMentions
from ...types.episode_response import EpisodeResponse
from ...types.graph_search_results import GraphSearchResults
from ...types.success_response import SuccessResponse


Expand Down Expand Up @@ -240,7 +240,7 @@ def delete(self, uuid_: str, *, request_options: typing.Optional[RequestOptions]

def get_nodes_and_edges(
self, uuid_: str, *, request_options: typing.Optional[RequestOptions] = None
) -> GraphSearchResults:
) -> EpisodeMentions:
"""
Returns nodes and edges mentioned in an episode

Expand All @@ -254,8 +254,8 @@ def get_nodes_and_edges(

Returns
-------
GraphSearchResults
Graph search results
EpisodeMentions
Edges and nodes mentioned in an episode

Examples
--------
Expand All @@ -273,7 +273,7 @@ def get_nodes_and_edges(
)
try:
if 200 <= _response.status_code < 300:
return pydantic_v1.parse_obj_as(GraphSearchResults, _response.json()) # type: ignore
return pydantic_v1.parse_obj_as(EpisodeMentions, _response.json()) # type: ignore
if _response.status_code == 400:
raise BadRequestError(
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
Expand Down Expand Up @@ -542,7 +542,7 @@ async def main() -> None:

async def get_nodes_and_edges(
self, uuid_: str, *, request_options: typing.Optional[RequestOptions] = None
) -> GraphSearchResults:
) -> EpisodeMentions:
"""
Returns nodes and edges mentioned in an episode

Expand All @@ -556,8 +556,8 @@ async def get_nodes_and_edges(

Returns
-------
GraphSearchResults
Graph search results
EpisodeMentions
Edges and nodes mentioned in an episode

Examples
--------
Expand All @@ -583,7 +583,7 @@ async def main() -> None:
)
try:
if 200 <= _response.status_code < 300:
return pydantic_v1.parse_obj_as(GraphSearchResults, _response.json()) # type: ignore
return pydantic_v1.parse_obj_as(EpisodeMentions, _response.json()) # type: ignore
if _response.status_code == 400:
raise BadRequestError(
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
Expand Down
2 changes: 2 additions & 0 deletions src/zep_cloud/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from .entity_type_response import EntityTypeResponse
from .episode import Episode
from .episode_data import EpisodeData
from .episode_mentions import EpisodeMentions
from .episode_response import EpisodeResponse
from .fact import Fact
from .fact_rating_examples import FactRatingExamples
Expand Down Expand Up @@ -80,6 +81,7 @@
"EntityTypeResponse",
"Episode",
"EpisodeData",
"EpisodeMentions",
"EpisodeResponse",
"Fact",
"FactRatingExamples",
Expand Down
11 changes: 11 additions & 0 deletions src/zep_cloud/types/episode.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,23 @@
from ..core.datetime_utils import serialize_datetime
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .graph_data_type import GraphDataType
from .role_type import RoleType


class Episode(pydantic_v1.BaseModel):
content: str
created_at: str
processed: typing.Optional[bool] = None
role: typing.Optional[str] = pydantic_v1.Field(default=None)
"""
Optional role, will only be present if the episode was created using memory.add API
"""

role_type: typing.Optional[RoleType] = pydantic_v1.Field(default=None)
"""
Optional role_type, will only be present if the episode was created using memory.add API
"""

session_id: typing.Optional[str] = pydantic_v1.Field(default=None)
"""
Optional session ID. Will be present only if the episode corresponds to the messages added using memory.add API
Expand Down
32 changes: 32 additions & 0 deletions src/zep_cloud/types/episode_mentions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ..core.datetime_utils import serialize_datetime
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .entity_edge import EntityEdge
from .entity_node import EntityNode


class EpisodeMentions(pydantic_v1.BaseModel):
edges: typing.Optional[typing.List[EntityEdge]] = None
nodes: typing.Optional[typing.List[EntityNode]] = None

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}

return deep_union_pydantic_dicts(
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
)

class Config:
frozen = True
smart_union = True
extra = pydantic_v1.Extra.allow
json_encoders = {dt.datetime: serialize_datetime}
2 changes: 2 additions & 0 deletions src/zep_cloud/types/graph_search_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .entity_edge import EntityEdge
from .entity_node import EntityNode
from .episode import Episode


class GraphSearchResults(pydantic_v1.BaseModel):
edges: typing.Optional[typing.List[EntityEdge]] = None
episodes: typing.Optional[typing.List[Episode]] = None
nodes: typing.Optional[typing.List[EntityNode]] = None

def json(self, **kwargs: typing.Any) -> str:
Expand Down
2 changes: 1 addition & 1 deletion src/zep_cloud/types/graph_search_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

import typing

GraphSearchScope = typing.Union[typing.Literal["edges", "nodes"], typing.Any]
GraphSearchScope = typing.Union[typing.Literal["edges", "nodes", "episodes"], typing.Any]