Skip to content

Commit fc776a6

Browse files
Return episode as a result of graph.add (#238)
* SDK regeneration * SDK regeneration * chore: Version bump * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * chore: Version bump * poetry lock * chore: version bump * SDK regeneration * chore: Version bump * SDK regeneration --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 23c8c69 commit fc776a6

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "zep-cloud"
3-
version = "2.6.0"
3+
version = "2.6.1"
44
description = ""
55
readme = "README.md"
66
authors = []

src/zep_cloud/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1717
headers: typing.Dict[str, str] = {
1818
"X-Fern-Language": "Python",
1919
"X-Fern-SDK-Name": "zep-cloud",
20-
"X-Fern-SDK-Version": "2.6.0",
20+
"X-Fern-SDK-Version": "2.6.1",
2121
}
2222
headers["Authorization"] = f"Api-Key {self.api_key}"
2323
return headers

src/zep_cloud/graph/client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
from ..errors.internal_server_error import InternalServerError
1212
from ..types.add_triple_response import AddTripleResponse
1313
from ..types.api_error import ApiError as types_api_error_ApiError
14+
from ..types.episode import Episode
1415
from ..types.graph_data_type import GraphDataType
1516
from ..types.graph_search_results import GraphSearchResults
1617
from ..types.graph_search_scope import GraphSearchScope
1718
from ..types.reranker import Reranker
1819
from ..types.search_filters import SearchFilters
19-
from ..types.success_response import SuccessResponse
2020
from .edge.client import AsyncEdgeClient, EdgeClient
2121
from .episode.client import AsyncEpisodeClient, EpisodeClient
2222
from .node.client import AsyncNodeClient, NodeClient
@@ -40,7 +40,7 @@ def add(
4040
type: typing.Optional[GraphDataType] = OMIT,
4141
user_id: typing.Optional[str] = OMIT,
4242
request_options: typing.Optional[RequestOptions] = None
43-
) -> SuccessResponse:
43+
) -> Episode:
4444
"""
4545
Add data to the graph. 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.
4646
@@ -59,8 +59,8 @@ def add(
5959
6060
Returns
6161
-------
62-
SuccessResponse
63-
Data added
62+
Episode
63+
Added episode
6464
6565
Examples
6666
--------
@@ -80,7 +80,7 @@ def add(
8080
)
8181
try:
8282
if 200 <= _response.status_code < 300:
83-
return pydantic_v1.parse_obj_as(SuccessResponse, _response.json()) # type: ignore
83+
return pydantic_v1.parse_obj_as(Episode, _response.json()) # type: ignore
8484
if _response.status_code == 400:
8585
raise BadRequestError(
8686
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
@@ -341,7 +341,7 @@ async def add(
341341
type: typing.Optional[GraphDataType] = OMIT,
342342
user_id: typing.Optional[str] = OMIT,
343343
request_options: typing.Optional[RequestOptions] = None
344-
) -> SuccessResponse:
344+
) -> Episode:
345345
"""
346346
Add data to the graph. 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.
347347
@@ -360,8 +360,8 @@ async def add(
360360
361361
Returns
362362
-------
363-
SuccessResponse
364-
Data added
363+
Episode
364+
Added episode
365365
366366
Examples
367367
--------
@@ -389,7 +389,7 @@ async def main() -> None:
389389
)
390390
try:
391391
if 200 <= _response.status_code < 300:
392-
return pydantic_v1.parse_obj_as(SuccessResponse, _response.json()) # type: ignore
392+
return pydantic_v1.parse_obj_as(Episode, _response.json()) # type: ignore
393393
if _response.status_code == 400:
394394
raise BadRequestError(
395395
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore

0 commit comments

Comments
 (0)