From 1e5ba5693b6e95563b81b375d55cb2fc0b4fd651 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 21:40:57 +0000 Subject: [PATCH] SDK regeneration --- src/zep_cloud/core/client_wrapper.py | 2 +- src/zep_cloud/graph/client.py | 24 ++++++++++++++---------- src/zep_cloud/types/entity_edge.py | 14 +++++++------- src/zep_cloud/types/entity_node.py | 8 ++++---- src/zep_cloud/types/episode.py | 12 ++++++------ src/zep_cloud/types/episode_response.py | 2 +- 6 files changed, 33 insertions(+), 29 deletions(-) diff --git a/src/zep_cloud/core/client_wrapper.py b/src/zep_cloud/core/client_wrapper.py index 1bdf3e0..57bf138 100644 --- a/src/zep_cloud/core/client_wrapper.py +++ b/src/zep_cloud/core/client_wrapper.py @@ -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": "v1.0.10", + "X-Fern-SDK-Version": "1.0.10", } headers["Authorization"] = f"Api-Key {self.api_key}" return headers diff --git a/src/zep_cloud/graph/client.py b/src/zep_cloud/graph/client.py index 7bb7578..2b6a8fc 100644 --- a/src/zep_cloud/graph/client.py +++ b/src/zep_cloud/graph/client.py @@ -93,12 +93,12 @@ def add( def search( self, *, + query: str, center_node_uuid: typing.Optional[str] = OMIT, group_id: typing.Optional[str] = OMIT, limit: typing.Optional[int] = OMIT, min_score: typing.Optional[float] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - query: typing.Optional[str] = OMIT, reranker: typing.Optional[Reranker] = OMIT, scope: typing.Optional[GraphSearchScope] = OMIT, user_id: typing.Optional[str] = OMIT, @@ -109,6 +109,9 @@ def search( Parameters ---------- + query : str + The string to search for (required) + center_node_uuid : typing.Optional[str] Node to rerank around for node distance reranking @@ -124,9 +127,6 @@ def search( mmr_lambda : typing.Optional[float] weighting for maximal marginal relevance - query : typing.Optional[str] - The string to search for (required) - reranker : typing.Optional[Reranker] Defaults to RRF @@ -151,7 +151,9 @@ def search( client = Zep( api_key="YOUR_API_KEY", ) - client.graph.search() + client.graph.search( + query="query", + ) """ _response = self._client_wrapper.httpx_client.request( "graph/search", @@ -255,12 +257,12 @@ async def add( async def search( self, *, + query: str, center_node_uuid: typing.Optional[str] = OMIT, group_id: typing.Optional[str] = OMIT, limit: typing.Optional[int] = OMIT, min_score: typing.Optional[float] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - query: typing.Optional[str] = OMIT, reranker: typing.Optional[Reranker] = OMIT, scope: typing.Optional[GraphSearchScope] = OMIT, user_id: typing.Optional[str] = OMIT, @@ -271,6 +273,9 @@ async def search( Parameters ---------- + query : str + The string to search for (required) + center_node_uuid : typing.Optional[str] Node to rerank around for node distance reranking @@ -286,9 +291,6 @@ async def search( mmr_lambda : typing.Optional[float] weighting for maximal marginal relevance - query : typing.Optional[str] - The string to search for (required) - reranker : typing.Optional[Reranker] Defaults to RRF @@ -313,7 +315,9 @@ async def search( client = AsyncZep( api_key="YOUR_API_KEY", ) - await client.graph.search() + await client.graph.search( + query="query", + ) """ _response = await self._client_wrapper.httpx_client.request( "graph/search", diff --git a/src/zep_cloud/types/entity_edge.py b/src/zep_cloud/types/entity_edge.py index 52782d8..d8ab947 100644 --- a/src/zep_cloud/types/entity_edge.py +++ b/src/zep_cloud/types/entity_edge.py @@ -8,12 +8,12 @@ class EntityEdge(pydantic_v1.BaseModel): - created_at: typing.Optional[str] = pydantic_v1.Field(default=None) + created_at: str = pydantic_v1.Field() """ Creation time of the edge """ - episodes: typing.Optional[typing.List[str]] = pydantic_v1.Field(default=None) + episodes: typing.List[str] = pydantic_v1.Field() """ List of episode ids that reference these entity edges """ @@ -23,7 +23,7 @@ class EntityEdge(pydantic_v1.BaseModel): Datetime of when the node was invalidated """ - fact: typing.Optional[str] = pydantic_v1.Field(default=None) + fact: str = pydantic_v1.Field() """ Fact representing the edge and nodes that it connects """ @@ -33,22 +33,22 @@ class EntityEdge(pydantic_v1.BaseModel): Datetime of when the fact stopped being true """ - name: typing.Optional[str] = pydantic_v1.Field(default=None) + name: str = pydantic_v1.Field() """ Name of the edge, relation name """ - source_node_uuid: typing.Optional[str] = pydantic_v1.Field(default=None) + source_node_uuid: str = pydantic_v1.Field() """ UUID of the source node """ - target_node_uuid: typing.Optional[str] = pydantic_v1.Field(default=None) + target_node_uuid: str = pydantic_v1.Field() """ UUID of the target node """ - uuid_: typing.Optional[str] = pydantic_v1.Field(alias="uuid", default=None) + uuid_: str = pydantic_v1.Field(alias="uuid") """ UUID of the edge """ diff --git a/src/zep_cloud/types/entity_node.py b/src/zep_cloud/types/entity_node.py index de7ea62..575b52e 100644 --- a/src/zep_cloud/types/entity_node.py +++ b/src/zep_cloud/types/entity_node.py @@ -8,7 +8,7 @@ class EntityNode(pydantic_v1.BaseModel): - created_at: typing.Optional[str] = pydantic_v1.Field(default=None) + created_at: str = pydantic_v1.Field() """ Creation time of the node """ @@ -18,17 +18,17 @@ class EntityNode(pydantic_v1.BaseModel): Labels associated with the node """ - name: typing.Optional[str] = pydantic_v1.Field(default=None) + name: str = pydantic_v1.Field() """ Name of the node """ - summary: typing.Optional[str] = pydantic_v1.Field(default=None) + summary: str = pydantic_v1.Field() """ Regional summary of surrounding edges """ - uuid_: typing.Optional[str] = pydantic_v1.Field(alias="uuid", default=None) + uuid_: str = pydantic_v1.Field(alias="uuid") """ UUID of the node """ diff --git a/src/zep_cloud/types/episode.py b/src/zep_cloud/types/episode.py index f80bafe..21ea6b0 100644 --- a/src/zep_cloud/types/episode.py +++ b/src/zep_cloud/types/episode.py @@ -9,12 +9,12 @@ class Episode(pydantic_v1.BaseModel): - content: typing.Optional[str] = None - created_at: typing.Optional[str] = None - name: typing.Optional[str] = None - source: typing.Optional[EpisodeType] = None - source_description: typing.Optional[str] = None - uuid_: typing.Optional[str] = pydantic_v1.Field(alias="uuid", default=None) + content: str + created_at: str + name: str + source: EpisodeType + source_description: str + uuid_: str = pydantic_v1.Field(alias="uuid") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/zep_cloud/types/episode_response.py b/src/zep_cloud/types/episode_response.py index bf66cb2..865f849 100644 --- a/src/zep_cloud/types/episode_response.py +++ b/src/zep_cloud/types/episode_response.py @@ -9,7 +9,7 @@ class EpisodeResponse(pydantic_v1.BaseModel): - episodes: typing.Optional[typing.List[Episode]] = None + episodes: typing.List[Episode] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}