Skip to content

Commit 5880c9b

Browse files
Update Add Facts request object (#204)
* SDK regeneration * SDK regeneration * SDK regeneration * chore: Bump version * chore: Bump version * SDK regeneration * SDK regeneration * SDK regeneration * feat: Update memory example to include latest api * fix: Decrease sleep in example * SDK regeneration * SDK regeneration * chore: Bump version --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent e206e23 commit 5880c9b

File tree

6 files changed

+40
-6
lines changed

6 files changed

+40
-6
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 = "1.0.8"
3+
version = "1.0.9"
44
description = ""
55
readme = "README.md"
66
authors = []

src/zep_cloud/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This file was auto-generated by Fern from our API Definition.
22

33
from .types import (
4+
AddedFact,
45
ApiError,
56
ClassifySessionRequest,
67
ClassifySessionResponse,
@@ -42,6 +43,7 @@
4243
from .version import __version__
4344

4445
__all__ = [
46+
"AddedFact",
4547
"ApiError",
4648
"BadRequestError",
4749
"ClassifySessionRequest",

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": "1.0.8",
20+
"X-Fern-SDK-Version": "1.0.9",
2121
}
2222
headers["Authorization"] = f"Api-Key {self.api_key}"
2323
return headers

src/zep_cloud/memory/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from ..errors.conflict_error import ConflictError
1313
from ..errors.internal_server_error import InternalServerError
1414
from ..errors.not_found_error import NotFoundError
15+
from ..types.added_fact import AddedFact
1516
from ..types.api_error import ApiError as types_api_error_ApiError
1617
from ..types.classify_session_request import ClassifySessionRequest
1718
from ..types.classify_session_response import ClassifySessionResponse
@@ -806,7 +807,7 @@ def add_session_facts(
806807
self,
807808
session_id: str,
808809
*,
809-
facts: typing.Optional[typing.Sequence[str]] = OMIT,
810+
facts: typing.Optional[typing.Sequence[AddedFact]] = OMIT,
810811
request_options: typing.Optional[RequestOptions] = None,
811812
) -> SuccessResponse:
812813
"""
@@ -817,7 +818,7 @@ def add_session_facts(
817818
session_id : str
818819
Session ID
819820
820-
facts : typing.Optional[typing.Sequence[str]]
821+
facts : typing.Optional[typing.Sequence[AddedFact]]
821822
822823
request_options : typing.Optional[RequestOptions]
823824
Request-specific configuration.
@@ -2181,7 +2182,7 @@ async def add_session_facts(
21812182
self,
21822183
session_id: str,
21832184
*,
2184-
facts: typing.Optional[typing.Sequence[str]] = OMIT,
2185+
facts: typing.Optional[typing.Sequence[AddedFact]] = OMIT,
21852186
request_options: typing.Optional[RequestOptions] = None,
21862187
) -> SuccessResponse:
21872188
"""
@@ -2192,7 +2193,7 @@ async def add_session_facts(
21922193
session_id : str
21932194
Session ID
21942195
2195-
facts : typing.Optional[typing.Sequence[str]]
2196+
facts : typing.Optional[typing.Sequence[AddedFact]]
21962197
21972198
request_options : typing.Optional[RequestOptions]
21982199
Request-specific configuration.

src/zep_cloud/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This file was auto-generated by Fern from our API Definition.
22

3+
from .added_fact import AddedFact
34
from .api_error import ApiError
45
from .classify_session_request import ClassifySessionRequest
56
from .classify_session_response import ClassifySessionResponse
@@ -36,6 +37,7 @@
3637
from .user_list_response import UserListResponse
3738

3839
__all__ = [
40+
"AddedFact",
3941
"ApiError",
4042
"ClassifySessionRequest",
4143
"ClassifySessionResponse",

src/zep_cloud/types/added_fact.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
9+
10+
class AddedFact(pydantic_v1.BaseModel):
11+
fact: typing.Optional[str] = None
12+
13+
def json(self, **kwargs: typing.Any) -> str:
14+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
15+
return super().json(**kwargs_with_defaults)
16+
17+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
18+
kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
19+
kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
20+
21+
return deep_union_pydantic_dicts(
22+
super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
23+
)
24+
25+
class Config:
26+
frozen = True
27+
smart_union = True
28+
extra = pydantic_v1.Extra.allow
29+
json_encoders = {dt.datetime: serialize_datetime}

0 commit comments

Comments
 (0)