Skip to content

Commit 3d22bf4

Browse files
Add exclusion filters + ignore default ontology on user level (#292)
* chore: Fix fact ratings table * SDK regeneration * chore: Version bump * chore: Version bump * SDK regeneration * chore: Add support for user/graph ontology targets * SDK regeneration * chore: Add support for setting entity/edges on a list of users/graphs * SDK regeneration * chore: Bump version * SDK regeneration * feat: Update compose context string util to include episodes and display entity attributes * chore: Bump version * fix: tests * chore: Remove redundant timestamp conversion branch * SDK regeneration * chore: Version bump * SDK regeneration * SDK regeneration * fix: tests * chore: Version bump * SDK regeneration * chore: Simplify date parsing in string composition utility * chore: Add python date util dep * chore: Bump version * SDK regeneration * SDK regeneration * chore: Bump version * SDK regeneration * chore: Remove langchain dependency * chore: Bump version * SDK regeneration * SDK regeneration * SDK regeneration * chore: Bump version * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * chore: Bump version * SDK regeneration * SDK regeneration * SDK regeneration --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 7b92c0b commit 3d22bf4

File tree

7 files changed

+70
-3
lines changed

7 files changed

+70
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "zep-cloud"
33

44
[tool.poetry]
55
name = "zep-cloud"
6-
version = "3.8.0"
6+
version = "3.9.0"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,6 +1958,14 @@ client.user.add(
19581958
<dl>
19591959
<dd>
19601960

1961+
**disable_default_ontology:** `typing.Optional[bool]` — When true, disables the use of default/fallback ontology for the user's graph.
1962+
1963+
</dd>
1964+
</dl>
1965+
1966+
<dl>
1967+
<dd>
1968+
19611969
**email:** `typing.Optional[str]` — The email address of the user.
19621970

19631971
</dd>
@@ -2284,6 +2292,14 @@ client.user.update(
22842292
<dl>
22852293
<dd>
22862294

2295+
**disable_default_ontology:** `typing.Optional[bool]` — When true, disables the use of default/fallback ontology for the user's graph.
2296+
2297+
</dd>
2298+
</dl>
2299+
2300+
<dl>
2301+
<dd>
2302+
22872303
**email:** `typing.Optional[str]` — The email address of the user.
22882304

22892305
</dd>

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.8.0",
25+
"User-Agent": "zep-cloud/3.9.0",
2626
"X-Fern-Language": "Python",
2727
"X-Fern-SDK-Name": "zep-cloud",
28-
"X-Fern-SDK-Version": "3.8.0",
28+
"X-Fern-SDK-Version": "3.9.0",
2929
**(self.get_custom_headers() or {}),
3030
}
3131
headers["Authorization"] = f"Api-Key {self.api_key}"

src/zep_cloud/types/search_filters.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ class SearchFilters(UniversalBaseModel):
2222
List of edge types to filter on
2323
"""
2424

25+
exclude_edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
26+
"""
27+
List of edge types to exclude from results
28+
"""
29+
30+
exclude_node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
31+
"""
32+
List of node labels to exclude from results
33+
"""
34+
2535
expired_at: typing.Optional[typing.List[typing.List[DateFilter]]] = pydantic.Field(default=None)
2636
"""
2737
2D array of date filters for the expired_at field.

src/zep_cloud/types/user.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
class User(UniversalBaseModel):
1313
created_at: typing.Optional[str] = None
1414
deleted_at: typing.Optional[str] = None
15+
disable_default_ontology: typing.Optional[bool] = None
1516
email: typing.Optional[str] = None
1617
fact_rating_instruction: typing.Optional[ModelsFactRatingInstruction] = None
1718
first_name: typing.Optional[str] = None

src/zep_cloud/user/client.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def add(
3535
self,
3636
*,
3737
user_id: str,
38+
disable_default_ontology: typing.Optional[bool] = OMIT,
3839
email: typing.Optional[str] = OMIT,
3940
fact_rating_instruction: typing.Optional[FactRatingInstruction] = OMIT,
4041
first_name: typing.Optional[str] = OMIT,
@@ -50,6 +51,9 @@ def add(
5051
user_id : str
5152
The unique identifier of the user.
5253
54+
disable_default_ontology : typing.Optional[bool]
55+
When true, disables the use of default/fallback ontology for the user's graph.
56+
5357
email : typing.Optional[str]
5458
The email address of the user.
5559
@@ -86,6 +90,7 @@ def add(
8690
"""
8791
_response = self._raw_client.add(
8892
user_id=user_id,
93+
disable_default_ontology=disable_default_ontology,
8994
email=email,
9095
fact_rating_instruction=fact_rating_instruction,
9196
first_name=first_name,
@@ -201,6 +206,7 @@ def update(
201206
self,
202207
user_id: str,
203208
*,
209+
disable_default_ontology: typing.Optional[bool] = OMIT,
204210
email: typing.Optional[str] = OMIT,
205211
fact_rating_instruction: typing.Optional[FactRatingInstruction] = OMIT,
206212
first_name: typing.Optional[str] = OMIT,
@@ -216,6 +222,9 @@ def update(
216222
user_id : str
217223
User ID
218224
225+
disable_default_ontology : typing.Optional[bool]
226+
When true, disables the use of default/fallback ontology for the user's graph.
227+
219228
email : typing.Optional[str]
220229
The email address of the user.
221230
@@ -252,6 +261,7 @@ def update(
252261
"""
253262
_response = self._raw_client.update(
254263
user_id,
264+
disable_default_ontology=disable_default_ontology,
255265
email=email,
256266
fact_rating_instruction=fact_rating_instruction,
257267
first_name=first_name,
@@ -376,6 +386,7 @@ async def add(
376386
self,
377387
*,
378388
user_id: str,
389+
disable_default_ontology: typing.Optional[bool] = OMIT,
379390
email: typing.Optional[str] = OMIT,
380391
fact_rating_instruction: typing.Optional[FactRatingInstruction] = OMIT,
381392
first_name: typing.Optional[str] = OMIT,
@@ -391,6 +402,9 @@ async def add(
391402
user_id : str
392403
The unique identifier of the user.
393404
405+
disable_default_ontology : typing.Optional[bool]
406+
When true, disables the use of default/fallback ontology for the user's graph.
407+
394408
email : typing.Optional[str]
395409
The email address of the user.
396410
@@ -435,6 +449,7 @@ async def main() -> None:
435449
"""
436450
_response = await self._raw_client.add(
437451
user_id=user_id,
452+
disable_default_ontology=disable_default_ontology,
438453
email=email,
439454
fact_rating_instruction=fact_rating_instruction,
440455
first_name=first_name,
@@ -574,6 +589,7 @@ async def update(
574589
self,
575590
user_id: str,
576591
*,
592+
disable_default_ontology: typing.Optional[bool] = OMIT,
577593
email: typing.Optional[str] = OMIT,
578594
fact_rating_instruction: typing.Optional[FactRatingInstruction] = OMIT,
579595
first_name: typing.Optional[str] = OMIT,
@@ -589,6 +605,9 @@ async def update(
589605
user_id : str
590606
User ID
591607
608+
disable_default_ontology : typing.Optional[bool]
609+
When true, disables the use of default/fallback ontology for the user's graph.
610+
592611
email : typing.Optional[str]
593612
The email address of the user.
594613
@@ -633,6 +652,7 @@ async def main() -> None:
633652
"""
634653
_response = await self._raw_client.update(
635654
user_id,
655+
disable_default_ontology=disable_default_ontology,
636656
email=email,
637657
fact_rating_instruction=fact_rating_instruction,
638658
first_name=first_name,

src/zep_cloud/user/raw_client.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def add(
3333
self,
3434
*,
3535
user_id: str,
36+
disable_default_ontology: typing.Optional[bool] = OMIT,
3637
email: typing.Optional[str] = OMIT,
3738
fact_rating_instruction: typing.Optional[FactRatingInstruction] = OMIT,
3839
first_name: typing.Optional[str] = OMIT,
@@ -48,6 +49,9 @@ def add(
4849
user_id : str
4950
The unique identifier of the user.
5051
52+
disable_default_ontology : typing.Optional[bool]
53+
When true, disables the use of default/fallback ontology for the user's graph.
54+
5155
email : typing.Optional[str]
5256
The email address of the user.
5357
@@ -75,6 +79,7 @@ def add(
7579
"users",
7680
method="POST",
7781
json={
82+
"disable_default_ontology": disable_default_ontology,
7883
"email": email,
7984
"fact_rating_instruction": convert_and_respect_annotation_metadata(
8085
object_=fact_rating_instruction, annotation=FactRatingInstruction, direction="write"
@@ -339,6 +344,7 @@ def update(
339344
self,
340345
user_id: str,
341346
*,
347+
disable_default_ontology: typing.Optional[bool] = OMIT,
342348
email: typing.Optional[str] = OMIT,
343349
fact_rating_instruction: typing.Optional[FactRatingInstruction] = OMIT,
344350
first_name: typing.Optional[str] = OMIT,
@@ -354,6 +360,9 @@ def update(
354360
user_id : str
355361
User ID
356362
363+
disable_default_ontology : typing.Optional[bool]
364+
When true, disables the use of default/fallback ontology for the user's graph.
365+
357366
email : typing.Optional[str]
358367
The email address of the user.
359368
@@ -381,6 +390,7 @@ def update(
381390
f"users/{jsonable_encoder(user_id)}",
382391
method="PATCH",
383392
json={
393+
"disable_default_ontology": disable_default_ontology,
384394
"email": email,
385395
"fact_rating_instruction": convert_and_respect_annotation_metadata(
386396
object_=fact_rating_instruction, annotation=FactRatingInstruction, direction="write"
@@ -640,6 +650,7 @@ async def add(
640650
self,
641651
*,
642652
user_id: str,
653+
disable_default_ontology: typing.Optional[bool] = OMIT,
643654
email: typing.Optional[str] = OMIT,
644655
fact_rating_instruction: typing.Optional[FactRatingInstruction] = OMIT,
645656
first_name: typing.Optional[str] = OMIT,
@@ -655,6 +666,9 @@ async def add(
655666
user_id : str
656667
The unique identifier of the user.
657668
669+
disable_default_ontology : typing.Optional[bool]
670+
When true, disables the use of default/fallback ontology for the user's graph.
671+
658672
email : typing.Optional[str]
659673
The email address of the user.
660674
@@ -682,6 +696,7 @@ async def add(
682696
"users",
683697
method="POST",
684698
json={
699+
"disable_default_ontology": disable_default_ontology,
685700
"email": email,
686701
"fact_rating_instruction": convert_and_respect_annotation_metadata(
687702
object_=fact_rating_instruction, annotation=FactRatingInstruction, direction="write"
@@ -948,6 +963,7 @@ async def update(
948963
self,
949964
user_id: str,
950965
*,
966+
disable_default_ontology: typing.Optional[bool] = OMIT,
951967
email: typing.Optional[str] = OMIT,
952968
fact_rating_instruction: typing.Optional[FactRatingInstruction] = OMIT,
953969
first_name: typing.Optional[str] = OMIT,
@@ -963,6 +979,9 @@ async def update(
963979
user_id : str
964980
User ID
965981
982+
disable_default_ontology : typing.Optional[bool]
983+
When true, disables the use of default/fallback ontology for the user's graph.
984+
966985
email : typing.Optional[str]
967986
The email address of the user.
968987
@@ -990,6 +1009,7 @@ async def update(
9901009
f"users/{jsonable_encoder(user_id)}",
9911010
method="PATCH",
9921011
json={
1012+
"disable_default_ontology": disable_default_ontology,
9931013
"email": email,
9941014
"fact_rating_instruction": convert_and_respect_annotation_metadata(
9951015
object_=fact_rating_instruction, annotation=FactRatingInstruction, direction="write"

0 commit comments

Comments
 (0)