From 1c52b1c18e4ad47b5394f00f358e225fa172cba7 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 24 Nov 2026 15:41:35 +0000
Subject: [PATCH 1/3] [fern-generated] Update SDK
Generated by Fern
CLI Version: unknown
Generators:
- fernapi/fern-python-sdk: 5.39.2
---
.fern/metadata.json | 6 +-
poetry.lock | 337 +-
pyproject.toml | 3 +-
reference.md | 1293 +++++--
src/zep_cloud/__init__.py | 48 +
src/zep_cloud/batch/client.py | 14 +-
src/zep_cloud/batch/raw_client.py | 23 +
src/zep_cloud/core/client_wrapper.py | 4 +-
src/zep_cloud/graph/client.py | 422 ++-
src/zep_cloud/graph/hyperedge/client.py | 6 +
src/zep_cloud/graph/hyperedge/raw_client.py | 6 +
src/zep_cloud/graph/raw_client.py | 3036 +++++++++++------
src/zep_cloud/project/client.py | 332 +-
src/zep_cloud/project/raw_client.py | 1304 +++++--
src/zep_cloud/thread/raw_client.py | 22 +
src/zep_cloud/trace_connection/client.py | 6 +-
src/zep_cloud/trace_connection/raw_client.py | 6 +-
src/zep_cloud/types/__init__.py | 48 +
.../types/add_hyperedge_edge_result.py | 5 +-
src/zep_cloud/types/added_edge.py | 1 +
src/zep_cloud/types/batch_item.py | 8 +-
src/zep_cloud/types/batch_item_error.py | 28 +
src/zep_cloud/types/batch_item_error_code.py | 7 +
src/zep_cloud/types/content_policy_event.py | 9 +-
.../types/content_policy_event_drop_reason.py | 2 +-
.../types/content_policy_matched_by.py | 5 +
src/zep_cloud/types/content_policy_rule.py | 30 +-
.../types/content_policy_rule_action.py | 5 +
.../types/content_policy_rule_request.py | 32 +-
.../content_policy_rule_request_action.py | 5 +
src/zep_cloud/types/context_episode.py | 18 +-
src/zep_cloud/types/custom_instruction.py | 2 +-
src/zep_cloud/types/edge_list_filters.py | 2 +-
src/zep_cloud/types/episode.py | 18 +-
src/zep_cloud/types/episode_content_policy.py | 2 +
.../types/episode_content_policy_status.py | 2 +-
src/zep_cloud/types/episode_list_filters.py | 2 +-
src/zep_cloud/types/episode_search_filters.py | 2 +-
src/zep_cloud/types/episode_wait_status.py | 7 +
.../types/graph_content_policy_request.py | 2 +-
src/zep_cloud/types/graph_query_response.py | 6 +
.../graph_query_response_answer_status.py | 5 +
src/zep_cloud/types/inclusion_rule.py | 44 +
src/zep_cloud/types/inclusion_rule_effect.py | 5 +
src/zep_cloud/types/inclusion_rule_target.py | 5 +
src/zep_cloud/types/inclusion_rules.py | 28 +
.../ingestion_trace_candidate_outcome.py | 33 +
...gestion_trace_candidate_outcome_outcome.py | 8 +
src/zep_cloud/types/ingestion_trace_output.py | 7 +
src/zep_cloud/types/ingestion_trace_status.py | 2 +-
src/zep_cloud/types/knowledge_entry.py | 27 +
src/zep_cloud/types/knowledge_response.py | 28 +
src/zep_cloud/types/node_list_filters.py | 2 +-
src/zep_cloud/types/search_filters.py | 2 +-
src/zep_cloud/types/set_knowledge_request.py | 23 +
src/zep_cloud/types/task_result.py | 2 +-
src/zep_cloud/types/task_result_episode.py | 2 +-
src/zep_cloud/user/client.py | 4 +-
src/zep_cloud/user/raw_client.py | 4 +-
59 files changed, 5362 insertions(+), 1985 deletions(-)
create mode 100644 src/zep_cloud/types/batch_item_error.py
create mode 100644 src/zep_cloud/types/batch_item_error_code.py
create mode 100644 src/zep_cloud/types/content_policy_matched_by.py
create mode 100644 src/zep_cloud/types/content_policy_rule_action.py
create mode 100644 src/zep_cloud/types/content_policy_rule_request_action.py
create mode 100644 src/zep_cloud/types/episode_wait_status.py
create mode 100644 src/zep_cloud/types/graph_query_response_answer_status.py
create mode 100644 src/zep_cloud/types/inclusion_rule.py
create mode 100644 src/zep_cloud/types/inclusion_rule_effect.py
create mode 100644 src/zep_cloud/types/inclusion_rule_target.py
create mode 100644 src/zep_cloud/types/inclusion_rules.py
create mode 100644 src/zep_cloud/types/ingestion_trace_candidate_outcome.py
create mode 100644 src/zep_cloud/types/ingestion_trace_candidate_outcome_outcome.py
create mode 100644 src/zep_cloud/types/knowledge_entry.py
create mode 100644 src/zep_cloud/types/knowledge_response.py
create mode 100644 src/zep_cloud/types/set_knowledge_request.py
diff --git a/.fern/metadata.json b/.fern/metadata.json
index 2cd12b67..9f036f67 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -12,10 +12,10 @@
},
"pyproject_python_version": "^3.10"
},
- "originGitCommit": "ed4d7fcaa984c22ae4ad55dd1970106aae190446",
+ "originGitCommit": "dafc2ed95ba6ee8e971da48fcb6c15731385b688",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
- "requestedVersion": "4.1.0",
+ "requestedVersion": "4.2.0",
"ciProvider": "github",
- "sdkVersion": "4.1.0"
+ "sdkVersion": "4.2.0"
}
\ No newline at end of file
diff --git a/poetry.lock b/poetry.lock
index f336f01a..11d615cc 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -289,14 +289,14 @@ files = [
[[package]]
name = "certifi"
-version = "2026.10.23"
+version = "2026.11.20"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.7"
groups = ["main"]
files = [
- {file = "certifi-2026.10.23-py3-none-any.whl", hash = "sha256:e9b54de76e530bb6cf0ccd036787103acb58fd42ba930ea8bf948ddbaa2f61d1"},
- {file = "certifi-2026.10.23.tar.gz", hash = "sha256:a9895e6e2758b371e0545e321a3a8fd1fcfd9829ada8824a936dfb16aaaf36cd"},
+ {file = "certifi-2026.11.20-py3-none-any.whl", hash = "sha256:7422df25243767b9877031a2248cb14d09ddac9beee846f4cef3d5c9191d488f"},
+ {file = "certifi-2026.11.20.tar.gz", hash = "sha256:af1cb240a8133f105aa52684a3a3258339d7f2fd0bd4e2812698ff5cf5588c4e"},
]
[[package]]
@@ -314,15 +314,15 @@ files = [
[[package]]
name = "exceptiongroup"
-version = "1.3.1"
+version = "1.3.2"
description = "Backport of PEP 654 (exception groups)"
optional = false
python-versions = ">=3.7"
groups = ["main", "dev"]
markers = "python_version == \"3.10\""
files = [
- {file = "exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598"},
- {file = "exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219"},
+ {file = "exceptiongroup-1.3.2-py3-none-any.whl", hash = "sha256:41c6a70dfec22050d3d8b43386b059a4dc0bca3f3d40a40971cb206fff1785af"},
+ {file = "exceptiongroup-1.3.2.tar.gz", hash = "sha256:ca82e69f0cb535fbde934885744b67669a3efddd50fe7bc00d3398839fcaddec"},
]
[package.dependencies]
@@ -831,26 +831,26 @@ reports = ["lxml"]
[[package]]
name = "mypy-extensions"
-version = "1.1.0"
+version = "1.2.0"
description = "Type system extensions for programs checked with the mypy type checker."
optional = false
-python-versions = ">=3.8"
+python-versions = ">=3.10"
groups = ["dev"]
files = [
- {file = "mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505"},
- {file = "mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558"},
+ {file = "mypy_extensions-1.2.0-py3-none-any.whl", hash = "sha256:993e7a20aa5671eb41a7132cf555af30062da99729601601b9a8382b11cae768"},
+ {file = "mypy_extensions-1.2.0.tar.gz", hash = "sha256:c6e275a07f1c2fc096b62940452d0eaa3f3af7de45d704787866240a7c6d5a51"},
]
[[package]]
name = "packaging"
-version = "26.3"
+version = "26.4"
description = "Core utilities for Python packages"
optional = false
-python-versions = ">=3.9"
+python-versions = ">=3.10"
groups = ["dev"]
files = [
- {file = "packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c"},
- {file = "packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79"},
+ {file = "packaging-26.4-py3-none-any.whl", hash = "sha256:81383611a09c1bc0b08b76e0fd5829d7c6824c65b27a6aee339da133f4233ea2"},
+ {file = "packaging-26.4.tar.gz", hash = "sha256:c4b671c41ddb9bf26e543c37723610d28fb6bf7affc4da17cf048d419d2c062a"},
]
[[package]]
@@ -1016,19 +1016,19 @@ files = [
[[package]]
name = "pydantic"
-version = "2.14.2"
+version = "2.14.4"
description = "Data validation using Python type hints"
optional = false
python-versions = ">=3.10"
groups = ["main"]
files = [
- {file = "pydantic-2.14.2-py3-none-any.whl", hash = "sha256:7efbf7507b937931cd32a5755acb00ea1cf5ccb1d4e8067a5850d5069e382118"},
- {file = "pydantic-2.14.2.tar.gz", hash = "sha256:fb7b2db6cefe8414dd612edeede49c4c433acb0432b0f92b95024e45f66c505d"},
+ {file = "pydantic-2.14.4-py3-none-any.whl", hash = "sha256:653a2ad9f6d8858529c77c72717d0ea991d6c6837fe683246b2f4b2bbfc3fadc"},
+ {file = "pydantic-2.14.4.tar.gz", hash = "sha256:7c19f1d46f8accf55a4617a6116e1ade64840870f397b846a2c53fb9019414ba"},
]
[package.dependencies]
annotated-types = ">=0.6.0"
-pydantic-core = "2.50.2"
+pydantic-core = "2.50.5"
typing-extensions = ">=4.16.0"
typing-inspection = ">=0.4.4"
@@ -1038,153 +1038,152 @@ timezone = ["tzdata ; platform_system == \"Windows\""]
[[package]]
name = "pydantic-core"
-version = "2.50.2"
+version = "2.50.5"
description = "Core functionality for Pydantic validation and serialization"
optional = false
python-versions = ">=3.10"
groups = ["main"]
files = [
- {file = "pydantic_core-2.50.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:6258754c473b3045a7aa30b833a8a331a1ab36c6147cb230789861d80bb26f83"},
- {file = "pydantic_core-2.50.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a786cf782ebb2e45a43c7118d75d452aac982b79577dfe804d8dbf2878f0b589"},
- {file = "pydantic_core-2.50.2-cp310-cp310-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:ea71b94a2eb5d2fc102926321f56d2ee8eddfad2673eadb1d23e9f287a492715"},
- {file = "pydantic_core-2.50.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:71615edeaf1ae70f5f3f558426072eede0168b7e5190fd9633878e29a0b85732"},
- {file = "pydantic_core-2.50.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:1a5e859f5a8a6d834b0a13acaa0eaddf1a9b4b015fcda13bab7b471e18299d32"},
- {file = "pydantic_core-2.50.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:d71a9a9352acbcb5c73d39dd003383599428067b6eda5cf7c5d335a7a0da37e1"},
- {file = "pydantic_core-2.50.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:bf7f99a0e6616cea754e2334d129091f3260d011369d9b8c658522bfb2427619"},
- {file = "pydantic_core-2.50.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5c12a5a080570a91bbcbf6d10db008b80e3f5dea015ef2f0137bbec70f24f3f3"},
- {file = "pydantic_core-2.50.2-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:89213368eef163350af37127939ace099010e8102757905c3e329f1175950ed8"},
- {file = "pydantic_core-2.50.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d93c066a38f83376b5bc020e563666784d1b680a70d6ceb625fdb541af7a312e"},
- {file = "pydantic_core-2.50.2-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:eec187d2876abb6a74203efbe2aa796455c1809334acf4e739dde35da8cfb69f"},
- {file = "pydantic_core-2.50.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:701bc55d08c22f981973ca4f6fdf4ea102ee1ee3a21b818b66fdb161ea711a4a"},
- {file = "pydantic_core-2.50.2-cp310-cp310-win32.whl", hash = "sha256:7f9821dfc0c473c96ad55ce4189c7cb4f9c94e7d4f563afb874173243dec1162"},
- {file = "pydantic_core-2.50.2-cp310-cp310-win_amd64.whl", hash = "sha256:3939538e640c94ab779a05f2d45dafedd01d65d93e1290797f3ac5b59fcb6455"},
- {file = "pydantic_core-2.50.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:2115d7ca6d58554af8a14da3dd32d361a4fe999fae52f115a6155679b5b00e72"},
- {file = "pydantic_core-2.50.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b2dd65864aad38dbcc57c3d0e2c978d4286e063378137d8fc0c9fcd558943285"},
- {file = "pydantic_core-2.50.2-cp311-cp311-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:26b778d4ebb75f181d36220ff0f54a513fc46f053d9b09ce79993c2f00bc45cc"},
- {file = "pydantic_core-2.50.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e80c47314c7233e7105a7efcfffd89d56e479e558189d1959eeeaf2639a27680"},
- {file = "pydantic_core-2.50.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:3bfe12243b3ded517c6734d91f127489e2f51bf95cb533b53130fe360333db80"},
- {file = "pydantic_core-2.50.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:01eb0282d0b3a065d55956d1be9ce398c46db3dd6d277a6cb2358c8aa8c53179"},
- {file = "pydantic_core-2.50.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:196b87b48b2695426920e8470d20f9e99f019ebd86f15808aa018b68086840cd"},
- {file = "pydantic_core-2.50.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:86e7abd24a67f61a4bfe8df059b67a2bdd8bf33705178e98463195d140bd3780"},
- {file = "pydantic_core-2.50.2-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:aff31602e8518594e6f6bc670cdb27e37cb7dbeb2d5d0b76a7707b70fe951ddf"},
- {file = "pydantic_core-2.50.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a88851e8e332588cb8cced8b5318d1163c7d0bb87830aa8dcafbc4ae9602b73c"},
- {file = "pydantic_core-2.50.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:3b1bb3950e0794a795c9344d818d5b476189b0c9c9755e8eb8fde87c3acee17a"},
- {file = "pydantic_core-2.50.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:928a44ad1e21a7e923eb924d601605f0694cd187d2ce5d40bf7ad76650f4627d"},
- {file = "pydantic_core-2.50.2-cp311-cp311-win32.whl", hash = "sha256:9a87744e683d9a13f60b7fa5242c17f8d283ffa94ad727cb19063b48c3d34960"},
- {file = "pydantic_core-2.50.2-cp311-cp311-win_amd64.whl", hash = "sha256:b958c217c6e56bef261f516e4caf5d490b079ad6a428752afada5a764cca6c71"},
- {file = "pydantic_core-2.50.2-cp311-cp311-win_arm64.whl", hash = "sha256:b0e6a2152706d84f7da8b9d34dcecc7e9bde678af32c40bd5b405f427ae0fbdb"},
- {file = "pydantic_core-2.50.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:e3d824b6152e1c0fd58dc6266f2de470eb7b2286135294f5f7cd26a0f0693738"},
- {file = "pydantic_core-2.50.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:596921489390a002d6a5e303384a0f1f98384f8bb550fbf38a1aafa6093da0f9"},
- {file = "pydantic_core-2.50.2-cp312-cp312-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:36d8b9725684ca3bf658b90a101d335fc8cae405bb22196b7b5ef41344913756"},
- {file = "pydantic_core-2.50.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:43a8fd56f3c681f3cda2d5c842ad28e88241df742dfcbe8fd1dd437a3056e1f6"},
- {file = "pydantic_core-2.50.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:6f5a432c6c1ef18a1a02a04b3616b8d3f2f88b13faa46caae1ac6559ab202234"},
- {file = "pydantic_core-2.50.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5d3cd8be71c4da3c9b42cc92f17e5e3036bdca98bf18555a0e072c3fe87abbb4"},
- {file = "pydantic_core-2.50.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:6a438cb8a3f87f2c49e82e43fb19511d4d5043f53e0787dc4df937ccb904373a"},
- {file = "pydantic_core-2.50.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9667637665acba166a7dbbc786f14c50512d3a01f7199e0e1a13b929e92d7c7a"},
- {file = "pydantic_core-2.50.2-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:b3e681208e2d39fde13fbea449ef2736a85ec1ea2afa41e9193a8c536e71dafe"},
- {file = "pydantic_core-2.50.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6eb6ff07964f39e33c6f57fefe939514e76b8c0d4a694e5663e2e04e80cc1798"},
- {file = "pydantic_core-2.50.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:4eb54c25e3463d73e1e4ed439ffc45d1d7e590df40bc7bb06f11a906afd996c3"},
- {file = "pydantic_core-2.50.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:91238117cd296352f54f24117ff5a227bdea428865dba1244aa0cdd1424c0bc2"},
- {file = "pydantic_core-2.50.2-cp312-cp312-win32.whl", hash = "sha256:98722314e12a8e4fa346e0afd3fff2098b5732875ff45592b450a7b589b43c4f"},
- {file = "pydantic_core-2.50.2-cp312-cp312-win_amd64.whl", hash = "sha256:b381574614245f18fdb2d6d1aa8f149e225869c47b5ee7f81812de8977817314"},
- {file = "pydantic_core-2.50.2-cp312-cp312-win_arm64.whl", hash = "sha256:f07c965a8aa6d62145f122641f292129984f39a3e3697585b19298a1488287db"},
- {file = "pydantic_core-2.50.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:93eb41d626d9a2749a678823c70bba8c25033cef474ae8001fd7621adbbd8437"},
- {file = "pydantic_core-2.50.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7c539d452cba22f250103c7d1c00cbe9038eb705e657476e701c43374efd9f2e"},
- {file = "pydantic_core-2.50.2-cp313-cp313-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:53bd25e8ab54c02bb4c55d4848c1d36f75f3b9a7356e83179fe27794d9e9e6c4"},
- {file = "pydantic_core-2.50.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f142cd663d1148ed32993ed9a58e5c67ea312f446a01a6c13a956945aafc9f23"},
- {file = "pydantic_core-2.50.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:126f158474346f457c0759c29c1a6334acd5f7f99dd272bb27d19314f3d81b4d"},
- {file = "pydantic_core-2.50.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:0b94a515f44f1ebcb25395bcdba506c4cdaf6d3fcb0466b9658521b41e5ff057"},
- {file = "pydantic_core-2.50.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a55c1163e829a08707b4a92c8ee02a5a3a3847ced74aa4da94e3e975ffe1ec63"},
- {file = "pydantic_core-2.50.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:31a1fb3ffbd1195b24490f671d12623dd4c9bfa56d6af0a299fa43b516134f5b"},
- {file = "pydantic_core-2.50.2-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:83d6f42ae6eba44548a1a3d4f900a5b1500fdd14f09f04754a8800ab0d544432"},
- {file = "pydantic_core-2.50.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:9fcde11462e0faab4c2a2ae8cd4516f7dd8239eec583bd88c5524d8064ad2d0c"},
- {file = "pydantic_core-2.50.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:848984e231190ae49bc8b5229e64d2a6fba4231dc6046e1b6b28ddc060bc7601"},
- {file = "pydantic_core-2.50.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:8772c2c0091e6fc2d0499151793d31bf811826986b0727052935a95104845544"},
- {file = "pydantic_core-2.50.2-cp313-cp313-win32.whl", hash = "sha256:bd6ecae08c0d871cf93b6f0d4ee76b06c65be44ea22311981a022b2f1948cf9d"},
- {file = "pydantic_core-2.50.2-cp313-cp313-win_amd64.whl", hash = "sha256:e5c801bdf3cc92274b8fc2c7023c8751e5ae81260c009ac558ff55ce712a2d45"},
- {file = "pydantic_core-2.50.2-cp313-cp313-win_arm64.whl", hash = "sha256:fd9aa71a800c87c0f7ab53fa38009169a23a82c685989626ca74a4bd483e1b67"},
- {file = "pydantic_core-2.50.2-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:efad0bdc67d3b119c3bab6b94d341a27333c2bb89ed75dfa182a4a06cd0ea329"},
- {file = "pydantic_core-2.50.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:6ffb4dce3ecb2cd563aa30f9eb5088a1cf1f4f688b90cbb374fa96e49fc50b02"},
- {file = "pydantic_core-2.50.2-cp314-cp314-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:150f6e101f575c21a4ecfed1be1c05bb89a0ad49cb9c846ed377583bd71b32c2"},
- {file = "pydantic_core-2.50.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1db9cab6197e797824f0479dd2ae5fd2e272aa61c61b7faa5a6e450ca7a0d3b7"},
- {file = "pydantic_core-2.50.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:1b9f652e17a13bbc09b45f74c3c326cca72059ce4dcdef687fcb04389db413a9"},
- {file = "pydantic_core-2.50.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:823b222c4fc861a82c650998a6117ecbd150cc71bf8b78f9a31bf3f48c456108"},
- {file = "pydantic_core-2.50.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:783abdfac21247d33bec40aa683d26bba30d61655c40de38b2decc4797aabf92"},
- {file = "pydantic_core-2.50.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b29b7c5adf4b2be7c941f7f76432aa3269cd5052ff8610376b8ece24d7b02c51"},
- {file = "pydantic_core-2.50.2-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:4ac996e42a93d80122a23edce44e02c6b9c4913f5c6198a077da31475341a39a"},
- {file = "pydantic_core-2.50.2-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:99e1d482138a71902415ba375bb4627679a5fefd3bd07803c3a8f37632f4981d"},
- {file = "pydantic_core-2.50.2-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:a53d5f11cd6d15569ba3e53f3498077f0d5e633f6ec604d2ea613e895017ebee"},
- {file = "pydantic_core-2.50.2-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:23385c4626f8b5a7792aa381ea573d9432cfbf4c21375a0a5eed2a4fb64e0e58"},
- {file = "pydantic_core-2.50.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:9a8a62281fd9c6a373b3fd3d473685e6838d43341eecde5f47729748e2c11ee3"},
- {file = "pydantic_core-2.50.2-cp314-cp314-win32.whl", hash = "sha256:18f008ef58cd30782f81b6e0119e20b7e884edcefbc2d370162ebe033f6e5c99"},
- {file = "pydantic_core-2.50.2-cp314-cp314-win_amd64.whl", hash = "sha256:b62c89545d21d930c333208fd548e7b4f262228ba3a322fd75c987a75ab11f31"},
- {file = "pydantic_core-2.50.2-cp314-cp314-win_arm64.whl", hash = "sha256:6e731bf5a5e8e25398544d7709e39068ec4230b0177e4db7fa955692fd415ba3"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:33c6800ab9563adaa0d7893e9cd8f5b972ef1e6a23df70498e05c24f3fcec5e1"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f81df206b937d0dca5efb38c25fc99037d82dbcd3740e34c3f81997d2322ac1c"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:21ea3b00f1e87c66f3f9e92f9f6fec20495ac0e60d7d2e68ba1fc49739d7cf40"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9eff570402175c7d5fff8497d5a9c05580664a79bb66c07b8f205d17f69e580b"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:240fec32a74af0979f7253532859b3fd209ad5eea822416bb010929dba445c3d"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92acf02c770b9d5c4e9a3e8d64e9d95ae26456a86ebb7b7cf64a97f899e5871b"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:1ac5b99bc7b0a68ec64f5f75a6828a7bab5535c8df0cdc07901deb50e0815910"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:713d7c33c0e231e3786eb0ec95885814dd65d5f3a09754399b6acbf5e9365f11"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:61e13100b30d8d25fc0d1f0297014b32941bf0975a3584bd08f3adebb68d1ead"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:523fe6574aea50f456cbc301c1cdddcbf237939f7657f9af99b4f0f71942b59c"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:6c25b8826be85714b27dafe908d3461e1b09e3e31c0279a7029040c832c781ef"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:a59db03b80a156a6fbeae41096866d1cb89cdf31031ba44c768a804538880636"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-win32.whl", hash = "sha256:0d090ae76d5b09c003600c7779b3adcf3d1b49268f616c5c51d844e54c8e318d"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-win_amd64.whl", hash = "sha256:9b01a092955c1c7530196ad526755cff4f2d11f37ca9a6fc9ebe37ca49a48977"},
- {file = "pydantic_core-2.50.2-cp314-cp314t-win_arm64.whl", hash = "sha256:4ea01f30e119f1ec7a2034e85c40f491d469896aef02cd6436fd9292fe1be3fb"},
- {file = "pydantic_core-2.50.2-cp315-cp315-macosx_10_12_x86_64.whl", hash = "sha256:a3317630e2791f56071b82f89bb71624146125e4311e6643f708c6ba744b5ac5"},
- {file = "pydantic_core-2.50.2-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:f73930dacad5e611fe019e18df6f53c30629b1843d038d303b8dec86a32493bd"},
- {file = "pydantic_core-2.50.2-cp315-cp315-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:e2e6240a0a5ad847017b3d65187877fdb7a11d5a58d43c30736f9f523478913b"},
- {file = "pydantic_core-2.50.2-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1fdf5b52ed22f1404c2433d0b46df2d86d9befb742d0b9b4042a2325c43cdb97"},
- {file = "pydantic_core-2.50.2-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:4e9392ddf67fe97ab9889f796d468c9908a8754b8b6c7520eb03a65012b9a1e7"},
- {file = "pydantic_core-2.50.2-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:48e944091b7bff233920bed8a60b0ed6c96c73d3c5836bf51c4b9a4bfb58e4ca"},
- {file = "pydantic_core-2.50.2-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:91c92856b846aa690ea6239ffd6c5003c5e3e296a69095570bf4efee5bfa0bdc"},
- {file = "pydantic_core-2.50.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5299296ff5cafcb69851fd652de8f9268a0bb036bcbedbfcaa94cf743baf3986"},
- {file = "pydantic_core-2.50.2-cp315-cp315-manylinux_2_31_riscv64.whl", hash = "sha256:d3d049b557875f9d15230eec8a731749a7a873d8ed6a051903b05bdf46e0e65f"},
- {file = "pydantic_core-2.50.2-cp315-cp315-musllinux_1_1_aarch64.whl", hash = "sha256:b0b25d647036972c2951059046cb498f72b7af5a2def27bf8e5f44c3067ab7dd"},
- {file = "pydantic_core-2.50.2-cp315-cp315-musllinux_1_1_armv7l.whl", hash = "sha256:8835566b3e94026da3ce2249f9ee35c9d2ebe4cd131f6a39bfc82708d3010a46"},
- {file = "pydantic_core-2.50.2-cp315-cp315-musllinux_1_1_x86_64.whl", hash = "sha256:3fbcd402e4b607d4b8de5d4591215f31f042af03f9d09e58f693a6221e32833f"},
- {file = "pydantic_core-2.50.2-cp315-cp315-win32.whl", hash = "sha256:8431ecb131489cbdaf6f51f7ade47475f73aff4f1912552f75ba19a6cfe233a8"},
- {file = "pydantic_core-2.50.2-cp315-cp315-win_amd64.whl", hash = "sha256:04cf672960b8c4fc28bb159c8cdd101fbd311c520237a5c0360448b851adfb41"},
- {file = "pydantic_core-2.50.2-cp315-cp315-win_arm64.whl", hash = "sha256:36917e29c0b815d6b940bc91560fcf453b5b85d55c579796373f0ea11d1c111a"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-macosx_10_12_x86_64.whl", hash = "sha256:bd1fe69056a19c377a6c6de2c1240fb8676ba0512a969965efb486510c5e0f1f"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:9b2383933b1dd7a8c93e02f99ebfd305f1286057172483b8e6898bed3fef69d3"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:a1b4d60bad57d6e0e7cd30cc4d1dc646d258dd6dfb7935ce76c7dd72dd1e98b0"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:93bedc68c4138088ea3c042189c01d2945f530f0dcc36e1ea02df8418bd4f1cd"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:d684ff87d00de2f6abcbbfa9b0fdce8b513dd799a900809dcfa7eb62ad69832a"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:bb6d49f00e2babd40af4889d6b9f4bf50879f522dd4e2e22cb705cac5e0c5e8e"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:6d47b2d0e00e030e0ebdb08115a37da7294e7a6d196d134a77ed7ee6c142284b"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:95838be125133fa314753f8cc5168f7c41e3a9dd5eef5383dbbbeed511bd4853"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-manylinux_2_31_riscv64.whl", hash = "sha256:2d4a043c820363359e40ac96270e1915e5376e116be1f59cee0701775de3e376"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-musllinux_1_1_aarch64.whl", hash = "sha256:57bccd3e1128736c792094da1feac6da46ec3feb1957ef649a9b3e4f8de6fa04"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-musllinux_1_1_armv7l.whl", hash = "sha256:24120c644322a35b5eb765416ac8442214c45689e255f5fc6e761e7e7c743c8b"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-musllinux_1_1_x86_64.whl", hash = "sha256:b1adf2f37521b578c438f6ec61d1c1d0c20b076863ddd5d8b6f3ab658857db3f"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-win32.whl", hash = "sha256:d79aaa468193c1bed6b0560d3c5c9f9e369e3efb0b128b38a2537e2d51d42773"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-win_amd64.whl", hash = "sha256:cc488daac19e6f5292180fac5e0ef7efffabeef4e096af9a17a75a7d3d6781f6"},
- {file = "pydantic_core-2.50.2-cp315-cp315t-win_arm64.whl", hash = "sha256:91315aea7adb51821d4a3378ede953bfdd76e3bf71551de4a82d7638cef7dc02"},
- {file = "pydantic_core-2.50.2-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:adec010c824290d4ca87047e8d8bfa4f85ac29f545f326cd5321696805d311ed"},
- {file = "pydantic_core-2.50.2-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:f47c1349c3b4274aeb18459d54244881a5c0dee0fdccedffca45704ba5c9e0a0"},
- {file = "pydantic_core-2.50.2-graalpy311-graalpy242_311_native-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4ee64baeab403b9de9c92846c5c1abec28ffb046cbc023bfae059897841f88af"},
- {file = "pydantic_core-2.50.2-graalpy311-graalpy242_311_native-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:16ec8e07c37f02dcf68939cc7f202ba9a148cc155ee2acf22d337e10b24c2cb7"},
- {file = "pydantic_core-2.50.2-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:d18d56c1ec63b304f4bb3c7db7e0d311e61cca1b1c944590a4b13ac39b2ca92b"},
- {file = "pydantic_core-2.50.2-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:41ed8abeffda6a880207fdc0cd1343a448cec3cc6b38b53f730c0745f745292d"},
- {file = "pydantic_core-2.50.2-graalpy312-graalpy250_312_native-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b7abcfaf66c1dc14c5ed928c349614f223c972a8b021b4be9548dbea6c817371"},
- {file = "pydantic_core-2.50.2-graalpy312-graalpy250_312_native-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:9e7460abce637f90e37f8c443559fbd687c38884d05cb69ef265e634945f4324"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b583ddeee6a6bb5bbc04462167c68034913221139d52d9f155ca6d1637a2fdcf"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:5ab5738c39b25b5dc5a721270e2269a2f5e86e614375e6c07ee6caab8cbc0f2f"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp73-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:21a902e546032c82b7275552345a2342d862e0541aea7226c91067c396e68b3f"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:92ada606285dab054e40848a951f583c537cde1e54701ea1305ec0096877012d"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c1b65a42afc73b39e6ae908ec7b9c3b9898676a7b15ce4c66d4965f7071007c8"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c324a7e0c0012e3974053f81a270d8f1aa23227571f4ddd3254c911bb356459b"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:cb8d2d7b07cbe2d7488de7e53671f836c4f4a8032dcda079df33dc1b7e2397c0"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:7c6e1bd6cadae13958e52897ef020e85c9916a95917149fca463bb0c0421a7c6"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp80-macosx_10_12_x86_64.whl", hash = "sha256:f078e276848bc23d1f92f46fc88d5b9cbb824b9acc60d9e07116620e502e16a9"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp80-macosx_11_0_arm64.whl", hash = "sha256:3435c443da7510a6de1a30c68beae338852a11f0440cc8320ea756a162f38dbe"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp80-manylinux_2_28_x86_64.whl", hash = "sha256:b5675a12a7b67063fe3ca187e735b0463cf13fabc10166ae4d4b2f775fd0632d"},
- {file = "pydantic_core-2.50.2-pp311-pypy311_pp80-win_amd64.whl", hash = "sha256:f5ba7ef10ce82737e173fa95cafa1c8210918f7e653715b2c7a7a31877a74848"},
- {file = "pydantic_core-2.50.2.tar.gz", hash = "sha256:1b0e8dc3932cf4e9ed5727570325cacc716b9409ffc794a221c0ccc72e8eb775"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:302517f9f5589e07ead02d38fbb443947a211461b39b18f46948b20941fa8d98"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:55e0d60384a9b14641749d2ba6721f82409248288f066b95d555c6dd484273d2"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:93a10c0b967c0dc6c2253d3a82b9117d2a841b8e344c637edc0a14220852b115"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:252ce30d79b47954cc3a49f8a0d812ac24a356627391fcec90a68733c755707e"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:5da0e7da9d7cdc39df85d1b927b77d40218cf40acbfc523048c95ce44d33abb9"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:bb103c150e1a0f1b8b2710a66ce1f741c7922b22ef07a290aea0e6cf702d8bbf"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:6e01a2033691ea2cbd91e499d6b6573f446dc926ccdfc670ed576991cef85cdb"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:92c0ebab606f982730aaaa741a30cd5e0f68dc7c005a5baa9b332fc182232c61"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:706c75cd9f8bd1798367f463ea81df52eff5fb2e4c4ef83997dd4ae538adc109"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d84b427c6badf48adc2586be1dc5c8677fc2f22a09da50e5d3f342d3daf3b2b4"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5eafde2cd1d97b7f60efc423d8504b22defd9d2fb9c4a358ffd1230e5fe65311"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:dc5717ed8981efdbbafc15a2533a690703cf80e96b886a158c61c9ec9bafcc28"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-win32.whl", hash = "sha256:15124b48e0acb6d24664690e052d50be51901286886bc124090960f1df869f30"},
+ {file = "pydantic_core-2.50.5-cp310-cp310-win_amd64.whl", hash = "sha256:b7e6a76b77513cd633a08addfda8409623ad884a4d91ee3664fb05cf094b2c35"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:bcc830e4f48499fd30a870f07c30752273ae2ddccce34d65d51c9fc880c380ab"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:40d5da89a632e6c6c938f93fdf54c534882d258a80f51ccfe1650cdedc12e82c"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:f7509c6f8a0f9d9eac58340dd567f0eb71ce2f762df09f0d51280e30da3fe687"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ba2b34529984a8e3cb1bc62a7687617722695a2cb4e57958de32a0eba128a07a"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:f8dc2008577c5e02eaa1eb3fbfa8fe0eba9af27ff6a740e9f1dae6661e88efcb"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:4dcf7b2cdfb9c59c1d377de318f3c8462121f32db939299999484ea0b1eadf18"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:ed4a01922af0d41b2a3b9433818cbb73b6b28e8dea344c90917c1fdcceb9960f"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:488319076ec92908b91fc6265ce761f1d78748f69f85518564fd16bf333e1b70"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:50d12ba7cab98b355ba65d65655e969f66934ab7a3d2d0c8abd61ae2282efce5"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:be4615d4b5f90c65dce2295dcf32eff7f05ea5d0d3a82421c03c572785cb9bf8"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:65b0f52abcd06dbb53961db9cc3610929f4f6518c3726d965a9babdaf7bd79c9"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:05815bbe2c7bec58d1ce456cc0a98f368e6ef9345b1d9311f42b814d34ad7086"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-win32.whl", hash = "sha256:e65f78eb3d930ac30ff3557fc74a0771300096fb002f588a6fe8d946e83f14ad"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-win_amd64.whl", hash = "sha256:d4ebf349b1b60049e80df5d9ea6725b1b7e434a7d006474b0f664fa72a6b3c75"},
+ {file = "pydantic_core-2.50.5-cp311-cp311-win_arm64.whl", hash = "sha256:736782cfbca37b4d81e6f3c7a3414de25db045dcdb7a05e55b64191a33c5ac45"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:24d23de96195ff9637e5940a7fbde3bea6a355b26fb5f491737dd803aa5d5a93"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a9bcf23628860d5a90cacdc188ee3b7d0547a38eb985214f03e7002a6ca0e558"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:30988977d38909df645183a9869a9d12211485639ac4757de18585f0ccb6f3dc"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:07a62d44515d674d750cfd86b7ce1dd93111be870f378d7c27b37aeb78d0cb4a"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:7dfc0431e94659ae8449303ca4fb1588dc1e00282d6636d00d72bb4bd6459b4d"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:004c784d4642bd1112a9fa9a022543aa17793fd32004f7e903ee97df2086bad4"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:fa66340c6d3e08a276803812e7665312dfc75dd24eedfa8e09f18a0f8e3e0e8f"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:470bbc2495367f60d3ca849a8039e4c164701d10637e7743f4427d92651bdb6d"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:43a6eaee9eeac4a54f2ff6567e1b0ec51651b37a40d862cab2e6fd16109e6528"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b66f2434c895652ac21c030d5a3a92c7811f0f9b98af41bf35be899c2d34aa4c"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:2cb80e0323b31d4669c4d72a466d99c885e13deb06205aa079ea6594e7ad1ef8"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3cf575867ecaf89aca440e5a4253d2facf1ca37bab30a4e8c205ec611228126a"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-win32.whl", hash = "sha256:57d4350167130c9c136b7efa35e6e7ee9539779698755b01007834d32c7a1f7d"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-win_amd64.whl", hash = "sha256:baa107902f8e38011a5f79836d905eb6bfaac1d4b0bd09fc86509b711d0b09c8"},
+ {file = "pydantic_core-2.50.5-cp312-cp312-win_arm64.whl", hash = "sha256:2d785ae9ff0ac485567f27f4fc53712268916e04be4a590160e5bf55b096225a"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:e5d5d77a9446f44688a5ef420d92c9facac0865ef5565215db54be184ab7906f"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:639a51931869c0594d8723b2f529c547db1aa33dc9571d001dc205d896170c08"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:c69eb2e09d2830949e6e8f395d4eb8c714ba083213ccff64932ded681fe69a4e"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8bbe282e79dc71b24ba7be284eacf27c8ddff8f26911e2030a0dd123c6aed326"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:43917f090dfda561575a72f75814f76a0680964b70d7b44c84e44d217bdeade7"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:93ee3b4f9c64fb1c39892413c4196d0a84790a7e0e5d72b463882c432c1ffafe"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:57b79401d870c9df395799c596d81875b647ecf3030129d86659a54f6bfcc0db"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:cbfde3ad127786f1dea1a6cd89a5eb824a16203f24743ad2b4e07506f43bc844"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:1793ec63c8f247131aa4dfc8c4da645b9c5872cf26b53ce240f143f59ad116e4"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:5027c263fbceb821cfb4b385d36d485e19efca1d9adcc4e5bec69c04ca3cdc83"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:dac78f91e263c4c9a4d587b9d97b3b5b2561293b33247452cc3cfe5b500e8cfb"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:b9348cfd798b8199d34da5258becf2fc8f5e4e7a3b51da30c34b81b996a07b34"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-win32.whl", hash = "sha256:22f5f0c37251611191a55e801a5150aa21f348fa10eac8eac9fa43c29937a7b1"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-win_amd64.whl", hash = "sha256:d34c0d4dd4a318f2be788a60a972c3a1ed5da0155a7c06d6dd810dc5d60ad704"},
+ {file = "pydantic_core-2.50.5-cp313-cp313-win_arm64.whl", hash = "sha256:cbec4aad328be58961c738b83fc2c7bd993242d2366f949d914e8c09266dee0e"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:00598ae680c6e4a17cda01910e49c0da8ce15610505e6c57cec3f15d83daef88"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e8fe516a4b3b06e4ff83b9adee4a786d28a617e5fb5fe90bda49fb6f52a5ac19"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:63a0ba0d7ccf37c8c724bb7ed13c3aa0aa4c743f4f5f376c92c47e584844c7b1"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:27bc22dc8d50335bc62296261a7dc4c2572149910ba7c274ef0f945b5be0d570"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:2f6a8c9b8647378c0dc128805e6b98da39d36019a0e7cac134badeaedb14f849"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:feb8c87dbc4684777ddafbf37c922d9e2748272ba61e362ebf85db73ebda6234"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:e0a7ae307b4e1eff195cd23a757da07f70a115e45175039caf5f3979a20c7edb"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:88b543705849d0c59343f97c38296dbf59eb7b3c9565bd4fe1ed638ba38da5ed"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:4ae5c9f84dfa43643d10328a212f709c7602c5e70df376d217ae5770d374ccd9"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:922455cc5baddb0f2c82b7ba649e57e89183442b32fe512670db6ebb9b66b251"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:aa69eaeed433cfe5de809fb84c95536a5aed991b28290d0db059fe6766c69274"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:9f2bf218dbc93363fe3e31cc53d36db8d6ff4122179406bec05f33bb79c0e2c1"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:b2910ec0fa5aeb9bef70156f2b79f4783978fdcfaa7b2f1b5d1814458d2e79a1"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-win32.whl", hash = "sha256:1deb966176b1b66be4281c83f10a0b6b1cecedeb25f53ee894bf27b22376facd"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-win_amd64.whl", hash = "sha256:887424ba7c2145e97f131bc2cc73383a8c464d7bcd56eb98bbd941afb6868b95"},
+ {file = "pydantic_core-2.50.5-cp314-cp314-win_arm64.whl", hash = "sha256:e7dd59f498ef42077f22db607571249db41997227018cb84644ba0059f8b5719"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:372f4ab3e67b2387871950cfa27d94d644c3475e650836ea52e25c2e4fbd7975"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0c9f0002e4ec37db931e4ee8b7dafab2c7288ef66354e74fe16484e60eac6616"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:d16cb794449c2bc0e5cb0ab0022813419bf5283266f2a7ff1fc54e5c6e27dcee"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:71633f82d51d4796a48026bd6eca5ec83e4a0edbe6187d59bbc45ace1111ebae"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:f20c692c599ebac7f04f3a0102b969f3f9d6667ffe1e72629fc7fbf8b6375234"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:2f0a86887c644247eff4cc7b9e609042a49833dcd72f84574e7b8beea89729ab"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:655d0cc2ddbc3fb1f4f8a8e3724552ee2ba6b8561289e9e6e06186982b27bceb"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1d53befcfd415bd9212e685372c825e62f29b83820db78512c9d3659f13d29e9"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:5f33c92da4aa5714fb6fcb086358274598e8ff62b6607afd132a38657aa64f02"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:3129b52ee2861d0270db8bd140fc9b53ee9821247ca47fda2613a899ce9a1ea3"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:041f4730fa7a8bf975e88436d439bdc72f3f16e584a470ffbe47392628d99de6"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:48b5deaaee4f1b99603173cd291127523e43ee9f51db58c7ff98d16dc5c6fc93"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-win32.whl", hash = "sha256:8c7244134b93ce028e9166c1b5d3e4537349307ccf3e65d746b4c6b1bbed8c89"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-win_amd64.whl", hash = "sha256:159f6bc1b616e0ca0938eb568d87ca03c633d6f06306ac47b9c3e5dd8c14d39a"},
+ {file = "pydantic_core-2.50.5-cp314-cp314t-win_arm64.whl", hash = "sha256:5274f8314ce3be1df07ae8ebceeb97a73b8409d842fd7677c5d0a85a68793ec1"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-macosx_10_12_x86_64.whl", hash = "sha256:c4c4313dc66f45822b3d7f39aa74e59e7987cf7572b3309005b26d956a0098a9"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:e93587aaa5660536b9188686e8fe0544b577ec57d896d424b5b2118b151a6845"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:0a7d599d0c5afbab98c0e4441f5b76163c6fcfd2ecf73dd6418e468a7ac452b8"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:568e928322f0b6b94671fc1a4dbc867627af74695b0c060ac6d4f25b6a7425d8"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:bdafd6b05bf012772b7d7325a98d26f19b7918e21dabdd5970c885262245aae3"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:008de9d97f2b0c8e596fb5d93d49b63be158e8be5ac35856903b338cbcfd21f3"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:f8fd7e9c44bb4c9214d41c3bef79cba5a513b29c3bcbfdaaf0440ca6f5fb65ea"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0d6e614776c8c99495dcfc6ce8f826277fb4388a5e5cbee23c199cbe39e6dcb3"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-manylinux_2_31_riscv64.whl", hash = "sha256:bcd9d9b38e61dfd43e00f621ce00da2ffed35047fad532c4afcadf4f9ca0d672"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-musllinux_1_1_aarch64.whl", hash = "sha256:4888829471cd8d85c096ef0e1f41a066c7d76e88309a4fbff4069f70d07673be"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-musllinux_1_1_armv7l.whl", hash = "sha256:ad0e0221deec2a2385300d76b9259da7036c0ed784502c154ae237dafd67605f"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-musllinux_1_1_x86_64.whl", hash = "sha256:20337f547d79911457cd4739bb6699213a53089f946af87633a48fad3f74f5e1"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-win32.whl", hash = "sha256:09c732c097816c89d46ddb70f89d72e853e3a1bbac6475961c60a88aad9fe612"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-win_amd64.whl", hash = "sha256:0d4edc3350e21e0ef773ef9395227ca072832f05e484cadcf4d8663b63a231c0"},
+ {file = "pydantic_core-2.50.5-cp315-cp315-win_arm64.whl", hash = "sha256:af453c0c20372ca8acf3c46de2a89b242491853dc61d0171ba24608d33310e09"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-macosx_10_12_x86_64.whl", hash = "sha256:9e255e7c32d9c2f396d3daa833e7d8d701eec7bf8e13ca092b4b83ce7d9487fd"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:c334b8759496f9e597b68e1309b2fb3d824fd24a29e562afa86b61005eb9d54d"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:90dabbf4f38f37de1663ce932d37c6f694a005f6470ae2f0d97755d9e3f90ffd"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5ec2e8caf5eadea7be683fc7025d60563e920f1f52fe18ae46c49558e67b8cd0"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.whl", hash = "sha256:44e6c35bf3a9b6785db0c083df8a6929343f9c8fc27186991d21653242c77c19"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f33be114a0ee27870cffd31057ed60bf5a0cd522dcbdc1dda0bdad70f8302cb0"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:12178e58af383bd4c32b2fe141188bc7e540c5eb33ad550856fa5863b4c31bd5"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:679f15dd3bd2a82bde350ec8c94c0f8f05f05dba39fb3464cd4136a724da9844"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-manylinux_2_31_riscv64.whl", hash = "sha256:11806d9b4888f1645d74fc24237f21dad559b42fb8930481b3df414997be6ee5"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-musllinux_1_1_aarch64.whl", hash = "sha256:b43115385de7db83bd2fe7a08dea8580bce3acc3f54200c4f4fe32a4a49688d4"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-musllinux_1_1_armv7l.whl", hash = "sha256:86bd5aad5ccbaced98139d08b4314f253c086897830f4bcf9c1d1f02f740683d"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-musllinux_1_1_x86_64.whl", hash = "sha256:90ff55049623eccbfa997332e2b91358dc2c4c30ca6e664b45438723cbe181df"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-win32.whl", hash = "sha256:7c3faea08d44b4a7b57b30f1113e6404e6aa62a4f3489a22359fb27d6003d8b1"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-win_amd64.whl", hash = "sha256:b2b64d3204f9c33f03ed3111eb754902ea76ca5aa61ab4b2bdf9f767a4a1f279"},
+ {file = "pydantic_core-2.50.5-cp315-cp315t-win_arm64.whl", hash = "sha256:8ba2dcbeea0ab8836e804c54e905075125c702cf78e592d998eecf2764b64144"},
+ {file = "pydantic_core-2.50.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:68334f281460fb2a85bbb9e2545438bf2fd2c9a166823a60b84541a3c8f2d2e0"},
+ {file = "pydantic_core-2.50.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:851a78a30265bb203186fd0e19712c1a4431083eb5a1e1715f758a029cd8aa6e"},
+ {file = "pydantic_core-2.50.5-graalpy312-graalpy250_312_native-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:47f4d79fe4876feace216a5b2263c40d792476b4a6508c38d66a2facd3f1f4cc"},
+ {file = "pydantic_core-2.50.5-graalpy312-graalpy250_312_native-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:98b92dad690e6578cc0b504eda53d53adaa4f34bd09c97a547a957e419544eb7"},
+ {file = "pydantic_core-2.50.5-graalpy313-graalpy253_313_native-macosx_11_0_arm64.whl", hash = "sha256:d7826407ed74ff8e6cc6e6df7ffbf180e9b449ab1516f28eb5f6e2a489bc5129"},
+ {file = "pydantic_core-2.50.5-graalpy313-graalpy253_313_native-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c415a8da7c89a3dd32d988a9117bf0a52371769b77b0943bcfd50b281ecefb8d"},
+ {file = "pydantic_core-2.50.5-graalpy313-graalpy253_313_native-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea7429e3adb2f2fd81e2d6e8942e5c1cd760a6e6be5b7574d2ee5499b5e19e67"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ea215f7f5d2df866e3b5448c0bbb4a35285086ac6ab18687796704cbd5f2c5a3"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:4ac243e358837f62d085f07b98625fa3831abdb28e8f77196934345bbff0fb0b"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp73-manylinux1_i686.manylinux_2_5_i686.whl", hash = "sha256:d3ada66d0601feeeba504a6daac73e47ed164357e46930366f135c4121594d53"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0dd037d96e98f6db8b69a44ab7d5c20a07fb0a2051775746a9e1b5fc8f52867f"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:3f800fc0f304f3b0e09d07d4287f9f0bc9bfe5319d1d7cabeaf265737c516083"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a5f6622451fa3cd71c8ff15df24307cb3f8b5dc35a723de281646c34872d7179"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:2f5f29ff80ce0cf93102198cddebdbb3411881de177359c770e5c9c99495a6b3"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:6a069ceeca397bd8da2e8ef6383595c63ea17de37d5f2d5cde729bdc0dfe6774"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp80-macosx_10_12_x86_64.whl", hash = "sha256:e8faa73de2e9231f604cfa44c471d0986e7e9c45129d7888839a34196e46a7df"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp80-macosx_11_0_arm64.whl", hash = "sha256:ef461e9299ae665fab67c6f054847178b8fd510da10b4ef745a074b922efbf0a"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp80-manylinux_2_28_x86_64.whl", hash = "sha256:1f22c36d952f33bac936273ca0be115693a1d7c1c9496ca7d699e6a338656d6e"},
+ {file = "pydantic_core-2.50.5-pp311-pypy311_pp80-win_amd64.whl", hash = "sha256:b6f48c4bf1c77ace644b125f168418438fbc9b8e4c3b290915cc7d055d83c8b1"},
+ {file = "pydantic_core-2.50.5.tar.gz", hash = "sha256:1e740886083ff95530d694e6a3f09ed914bcf92a496d16acd307c6c3484fc36d"},
]
[package.dependencies]
@@ -1231,14 +1230,14 @@ dev = ["argcomplete", "asynctest ; python_version < \"3.11\"", "attrs (>=23.1)",
[[package]]
name = "pytest-asyncio"
-version = "1.4.1.post1"
+version = "1.5.0"
description = "Pytest support for asyncio"
optional = false
python-versions = ">=3.10"
groups = ["dev"]
files = [
- {file = "pytest_asyncio-1.4.1.post1-py3-none-any.whl", hash = "sha256:0755e488cc0a2b9bd2eab7292cc6390d4cbb8390f1020745647bae5a708e0165"},
- {file = "pytest_asyncio-1.4.1.post1.tar.gz", hash = "sha256:f582d9ea4a1c082195abe8bd29a1fe106aeb1cd435e3dad2d3bc2749935c36a2"},
+ {file = "pytest_asyncio-1.5.0-py3-none-any.whl", hash = "sha256:557f255ee03cc84f84a8d5f438bc9c6e0f714bf86970ae743c7ecb5a38d7e07d"},
+ {file = "pytest_asyncio-1.5.0.tar.gz", hash = "sha256:92c8fa83ca419fd0d4bd6a34df6520dae435841d3733c319343249492adf37f7"},
]
[package.dependencies]
@@ -1404,14 +1403,14 @@ files = [
[[package]]
name = "types-python-dateutil"
-version = "2.9.0.20261029"
+version = "2.9.0.20261122"
description = "Typing stubs for python-dateutil"
optional = false
python-versions = ">=3.10"
groups = ["dev"]
files = [
- {file = "types_python_dateutil-2.9.0.20261029-py3-none-any.whl", hash = "sha256:8fd04c6e1722d2523a74d6670596fc0007077651465b686f144ae1d200dcacf5"},
- {file = "types_python_dateutil-2.9.0.20261029.tar.gz", hash = "sha256:3258b491686c441d8074cfc8712308741900c9ff128a06421baec3767c503511"},
+ {file = "types_python_dateutil-2.9.0.20261122-py3-none-any.whl", hash = "sha256:c2c257d7ce04f8ede622bb2452223461ee3016872f59d2351522723073e226ff"},
+ {file = "types_python_dateutil-2.9.0.20261122.tar.gz", hash = "sha256:1db0012e9e63028891e36fd8a9f685dc4e8cf89353fbefcf6b1eb55538e9f7ed"},
]
[[package]]
@@ -1428,14 +1427,14 @@ files = [
[[package]]
name = "typing-inspection"
-version = "0.4.4"
+version = "0.4.5"
description = "Runtime typing introspection tools"
optional = false
python-versions = ">=3.10"
groups = ["main"]
files = [
- {file = "typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147"},
- {file = "typing_inspection-0.4.4.tar.gz", hash = "sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47"},
+ {file = "typing_inspection-0.4.5-py3-none-any.whl", hash = "sha256:bc210535442b39e1bf2805e0c7a17dfd6a4ace760c84c7f7d16245d23a6b1c39"},
+ {file = "typing_inspection-0.4.5.tar.gz", hash = "sha256:7f16c411e7930dc79596d42ab44672a3fe5f60eb34b781a1647e7872363120c7"},
]
[package.dependencies]
diff --git a/pyproject.toml b/pyproject.toml
index d5fe3bed..aa035819 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,11 +1,10 @@
[project]
name = "zep-cloud"
dynamic = ["version"]
-version = "4.1.0"
[tool.poetry]
name = "zep-cloud"
-version = "4.1.0"
+version = "4.2.0"
description = "The Python SDK for Zep, the context layer for AI agents."
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 6faff97f..7e163490 100644
--- a/reference.md
+++ b/reference.md
@@ -960,7 +960,7 @@ client = Zep(
)
client.batch.list_items(
- batch_uuid="batch_uuid",
+ batch_uuid="366ac0d2-69b5-4140-89e8-15d025a33340",
)
```
@@ -1035,9 +1035,12 @@ client = Zep(
)
client.batch.add_items(
- batch_uuid="batch_uuid",
+ batch_uuid="366ac0d2-69b5-4140-89e8-15d025a33340",
items=[
BatchItemInput(
+ data="A sample item.",
+ data_type="text",
+ graph_uuid="815f9d31-eef0-4201-90e6-02c1e6f16e90",
type="graph_episode",
)
],
@@ -1564,7 +1567,7 @@ client.graph.create()
**content_policy:** `typing.Optional[GraphContentPolicyRequest]`
-Content policy additions for the graph. The graph binds the current
+Experimental. Content policy additions for the graph. The graph binds the current
project content policy plus these additions, and the binding does not
change after creation.
@@ -1771,7 +1774,7 @@ client.graph.lookup()
-
-Experimental. Retrieves the graph records for a natural-language question about a graph with a read-only retrieval loop. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. deep: A model plans its own searches. It can page through complete lists and read more records before it answers. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and in closed release. Zep enables the operation only for select accounts. The request, the response, the events, and the modes of the operation can change. A request from an account without access returns `404 not_found`. To get access, contact support@getzep.com.
+Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval. Zep explores the graph with searches and graph traversals, and it uses the records from each retrieval round to plan the next round. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items and an `answer_status` of `answered`, `partial`, or `refused`. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: Optimized for latency. Retrieves the context for multi-hop queries. The query runs at most 3 search rounds. deep: Runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and available to every Zep account. The request, the response, the events, and the modes of the operation can change.
@@ -1823,7 +1826,7 @@ client.graph.query_stream(
-
-**query:** `str` — The natural-language question about the graph.
+**query:** `str` — The natural-language query for the graph.
@@ -1858,7 +1861,13 @@ The default is false: the response has the records and no answer.
-
-**mode:** `typing.Optional[GraphQueryRequestMode]` — The retrieval mode. The default is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. A BYOM project or BYOC deployment also needs a SystemOne decision model for fast. deep: A model plans its own searches. It can page through complete lists and read more records before it answers.
+**mode:** `typing.Optional[GraphQueryRequestMode]`
+
+The retrieval mode. The default is fast.
+Fast mode is optimized for latency. It retrieves the context for multi-hop queries.
+The query runs at most 3 search rounds. A BYOM project needs a decision model for fast mode.
+A BYOC deployment needs a decision model (SystemOne or Gemini Decisions) for fast mode.
+Deep mode runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode.
@@ -1890,7 +1899,7 @@ The default is false: the response has the records and no answer.
-
-Experimental. Retrieves the graph records for a natural-language question about a graph with a read-only retrieval loop. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. deep: A model plans its own searches. It can page through complete lists and read more records before it answers. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and in closed release. Zep enables the operation only for select accounts. The request, the response, the events, and the modes of the operation can change. A request from an account without access returns `404 not_found`. To get access, contact support@getzep.com.
+Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval. Zep explores the graph with searches and graph traversals, and it uses the records from each retrieval round to plan the next round. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items and an `answer_status` of `answered`, `partial`, or `refused`. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: Optimized for latency. Retrieves the context for multi-hop queries. The query runs at most 3 search rounds. deep: Runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and available to every Zep account. The request, the response, the events, and the modes of the operation can change.
@@ -1942,7 +1951,7 @@ client.graph.query_stream(
-
-**query:** `str` — The natural-language question about the graph.
+**query:** `str` — The natural-language query for the graph.
@@ -1977,7 +1986,13 @@ The default is false: the response has the records and no answer.
-
-**mode:** `typing.Optional[GraphQueryRequestMode]` — The retrieval mode. The default is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. A BYOM project or BYOC deployment also needs a SystemOne decision model for fast. deep: A model plans its own searches. It can page through complete lists and read more records before it answers.
+**mode:** `typing.Optional[GraphQueryRequestMode]`
+
+The retrieval mode. The default is fast.
+Fast mode is optimized for latency. It retrieves the context for multi-hop queries.
+The query runs at most 3 search rounds. A BYOM project needs a decision model for fast mode.
+A BYOC deployment needs a decision model (SystemOne or Gemini Decisions) for fast mode.
+Deep mode runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode.
@@ -2280,7 +2295,7 @@ client.graph.clone(
-
-Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.
+Experimental: the request, the response, and the behavior of this operation can change. Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.
@@ -2353,7 +2368,7 @@ client.graph.get_content_policy(
-
-Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.
+Experimental: the request, the response, and the behavior of this operation can change. Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.
@@ -2549,69 +2564,24 @@ block.
-client.graph.get_instructions(...) -> Instructions
-
--
-
-#### 🔌 Usage
-
-
--
-
+
client.graph.get_inclusion_rules(...) -> InclusionRules
-
-```python
-from zep_cloud import Zep
-from zep_cloud.environment import ZepEnvironment
-
-client = Zep(
- api_key="",
- environment=ZepEnvironment.DEFAULT,
-)
-
-client.graph.get_instructions(
- graph_uuid="graph_uuid",
-)
-
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
+#### 📝 Description
-
-**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
-
-
-
-
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
-
+Returns the graph rules, for example {"inclusion_rules":[],"inherited":true}.
-
-
-
-
-
-client.graph.set_instructions(...) -> Instructions
-
--
-
#### 🔌 Usage
@@ -2629,7 +2599,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.set_instructions(
+client.graph.get_inclusion_rules(
graph_uuid="graph_uuid",
)
@@ -2647,15 +2617,7 @@ client.graph.set_instructions(
-
-**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
-
-
-
-
-
--
-
-**request:** `Instructions`
+**graph_uuid:** `str` — Graph UUID
@@ -2675,7 +2637,7 @@ client.graph.set_instructions(
-client.graph.list_metadata_keys(...) -> GraphMetadataKeyList
+client.graph.set_inclusion_rules(...) -> InclusionRules
-
@@ -2687,7 +2649,7 @@ client.graph.set_instructions(
-
-Returns the append-only metadata keys recorded for a graph. A key can remain in the list after no episode or message uses it.
+Replaces the graph rules. Request: {"inclusion_rules":[]}. Response: {"inclusion_rules":[],"inherited":true}.
@@ -2710,7 +2672,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.list_metadata_keys(
+client.graph.set_inclusion_rules(
graph_uuid="graph_uuid",
)
@@ -2728,15 +2690,7 @@ client.graph.list_metadata_keys(
-
-**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
-
-
-
-
-
--
-
-**page_size:** `typing.Optional[int]` — The maximum number of keys per page.
+**graph_uuid:** `str` — Graph UUID
@@ -2744,7 +2698,7 @@ client.graph.list_metadata_keys(
-
-**cursor:** `typing.Optional[str]` — Opaque page cursor
+**request:** `InclusionRules`
@@ -2764,7 +2718,7 @@ client.graph.list_metadata_keys(
-client.graph.get_observation_steering(...) -> ObservationSteering
+client.graph.get_instructions(...) -> Instructions
-
@@ -2785,7 +2739,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.get_observation_steering(
+client.graph.get_instructions(
graph_uuid="graph_uuid",
)
@@ -2823,7 +2777,7 @@ client.graph.get_observation_steering(
-client.graph.set_observation_steering(...) -> ObservationSteering
+client.graph.set_instructions(...) -> Instructions
-
@@ -2844,7 +2798,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.set_observation_steering(
+client.graph.set_instructions(
graph_uuid="graph_uuid",
)
@@ -2870,7 +2824,7 @@ client.graph.set_observation_steering(
-
-**request:** `ObservationSteering`
+**request:** `Instructions`
@@ -2890,10 +2844,25 @@ client.graph.set_observation_steering(
-client.graph.get_ontology(...) -> Ontology
+client.graph.get_knowledge(...) -> KnowledgeResponse
+
+-
+
+#### 📝 Description
+
-
+
+-
+
+Returns the domain knowledge in effect at this scope. The knowledge_api account flag must be enabled.
+Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+
+
+
+
+
#### 🔌 Usage
@@ -2911,7 +2880,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.get_ontology(
+client.graph.get_knowledge(
graph_uuid="graph_uuid",
)
@@ -2929,7 +2898,7 @@ client.graph.get_ontology(
-
-**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
+**graph_uuid:** `str` — The UUID of the graph or its user.
@@ -2949,10 +2918,26 @@ client.graph.get_ontology(
-client.graph.set_ontology(...) -> Ontology
+client.graph.set_knowledge(...) -> KnowledgeResponse
+
+-
+
+#### 📝 Description
+
-
+
+-
+
+Replaces the complete set of domain knowledge entries at this scope. The knowledge_api account flag must be enabled.
+Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+Request example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}]}
+
+
+
+
+
#### 🔌 Usage
@@ -2970,7 +2955,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.set_ontology(
+client.graph.set_knowledge(
graph_uuid="graph_uuid",
)
@@ -2988,7 +2973,7 @@ client.graph.set_ontology(
-
-**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
+**graph_uuid:** `str` — The UUID of the graph or its user.
@@ -2996,7 +2981,7 @@ client.graph.set_ontology(
-
-**request:** `Ontology`
+**request:** `SetKnowledgeRequest`
@@ -3016,7 +3001,7 @@ client.graph.set_ontology(
-client.graph.search_edges(...) -> EdgePage
+client.graph.list_metadata_keys(...) -> GraphMetadataKeyList
-
@@ -3028,7 +3013,7 @@ client.graph.set_ontology(
-
-Edge search does not support node_labels, exclude_node_labels, or content_policy_violated. content_policy_violated is supported on episode search only. An edge has two nodes, so a node label filter is not defined for edge search. To filter edges by node label, use graph.edge.list, graph.node.list_neighbors, or graph.get_subgraph. To search the edges of nodes that have a label, do these two steps. First, call graph.search_nodes with node_labels. Then, call graph.search_edges with connected_node_uuids set to the UUIDs of the returned nodes.
+Returns the append-only metadata keys recorded for a graph. A key can remain in the list after no episode or message uses it.
@@ -3051,9 +3036,8 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.search_edges(
+client.graph.list_metadata_keys(
graph_uuid="graph_uuid",
- query="query",
)
```
@@ -3078,7 +3062,7 @@ client.graph.search_edges(
-
-**query:** `str` — The search query.
+**page_size:** `typing.Optional[int]` — The maximum number of keys per page.
@@ -3086,7 +3070,7 @@ client.graph.search_edges(
-
-**page_size:** `typing.Optional[int]` — The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
+**cursor:** `typing.Optional[str]` — Opaque page cursor
@@ -3094,71 +3078,58 @@ client.graph.search_edges(
-
-**cursor:** `typing.Optional[str]` — Opaque page cursor
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
--
-**bfs_origin_node_uuids:** `typing.Optional[typing.List[str]]` — Nodes used as BFS origins for graph-distance-aware retrieval.
-
+
+client.graph.get_observation_steering(...) -> ObservationSteering
-
-**center_node_uuid:** `typing.Optional[str]`
+#### 🔌 Usage
-The node to rank results by distance from. Required when reranker is
-node_distance.
-
-
-
+
+-
-
-**filter_low_quality_results:** `typing.Optional[bool]`
+```python
+from zep_cloud import Zep
+from zep_cloud.environment import ZepEnvironment
-The default is false. When true, Zep removes low-quality results at the knee of the
-cross-encoder score curve. The filter never removes a result with a score
-of 0.9 or more. It keeps at least 5 results, or all results when fewer
-than 5 are available. The filter only removes results, so a page still
-returns up to page_size results. Use this field only with reranker
-cross_encoder. It is not supported for episode search. Invalid
-combinations return a 400 error. The cutoff is approximate, not guaranteed.
-When the cross-encoder does not score the results, for example after a
-timeout, Zep returns the results without the filter.
-
-
-
+client = Zep(
+ api_key="",
+ environment=ZepEnvironment.DEFAULT,
+)
-
--
+client.graph.get_observation_steering(
+ graph_uuid="graph_uuid",
+)
-**filters:** `typing.Optional[EdgeSearchFilters]` — Filters constraining which items are returned.
-
+```
+
+
+#### ⚙️ Parameters
+
-
-**mmr_lambda:** `typing.Optional[float]`
-
-The diversity weighting used for maximal marginal relevance reranking.
-Required when reranker is mmr.
-
-
-
-
-
-**reranker:** `typing.Optional[SearchEdgesRequestReranker]` — The reranking strategy applied to retrieved results. Defaults to rrf.
+**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -3178,24 +3149,10 @@ Required when reranker is mmr.
-client.graph.search_episodes(...) -> EpisodePage
-
--
-
-#### 📝 Description
-
-
--
-
+
client.graph.set_observation_steering(...) -> ObservationSteering
-
-Episode search supports only the metadata_filters and content_policy_violated filters. Every other filter returns unsupported_filter.
-
-
-
-
-
#### 🔌 Usage
@@ -3213,9 +3170,8 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.search_episodes(
+client.graph.set_observation_steering(
graph_uuid="graph_uuid",
- query="query",
)
```
@@ -3240,7 +3196,7 @@ client.graph.search_episodes(
-
-**query:** `str` — The search query.
+**request:** `ObservationSteering`
@@ -3248,34 +3204,242 @@ client.graph.search_episodes(
-
-**page_size:** `typing.Optional[int]` — The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
--
-**cursor:** `typing.Optional[str]` — Opaque page cursor
-
+
+client.graph.get_ontology(...) -> Ontology
-
-**bfs_origin_node_uuids:** `typing.Optional[typing.List[str]]` — Nodes used as BFS origins for graph-distance-aware retrieval.
-
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from zep_cloud import Zep
+from zep_cloud.environment import ZepEnvironment
+
+client = Zep(
+ api_key="",
+ environment=ZepEnvironment.DEFAULT,
+)
+
+client.graph.get_ontology(
+ graph_uuid="graph_uuid",
+)
+
+```
+
+
+#### ⚙️ Parameters
+
-
-**center_node_uuid:** `typing.Optional[str]`
+
+-
-The node to rank results by distance from. Required when reranker is
-node_distance.
+**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.graph.set_ontology(...) -> Ontology
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from zep_cloud import Zep
+from zep_cloud.environment import ZepEnvironment
+
+client = Zep(
+ api_key="",
+ environment=ZepEnvironment.DEFAULT,
+)
+
+client.graph.set_ontology(
+ graph_uuid="graph_uuid",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+
+
+
+
+-
+
+**request:** `Ontology`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.graph.search_edges(...) -> EdgePage
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Edge search does not support node_labels, exclude_node_labels, or content_policy_violated. content_policy_violated is supported on episode search only. An edge has two nodes, so a node label filter is not defined for edge search. To filter edges by node label, use graph.edge.list, graph.node.list_neighbors, or graph.get_subgraph. To search the edges of nodes that have a label, do these two steps. First, call graph.search_nodes with node_labels. Then, call graph.search_edges with connected_node_uuids set to the UUIDs of the returned nodes.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from zep_cloud import Zep
+from zep_cloud.environment import ZepEnvironment
+
+client = Zep(
+ api_key="",
+ environment=ZepEnvironment.DEFAULT,
+)
+
+client.graph.search_edges(
+ graph_uuid="graph_uuid",
+ query="query",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+
+
+
+
+-
+
+**query:** `str` — The search query.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` — The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` — Opaque page cursor
+
+
+
+
+
+-
+
+**bfs_origin_node_uuids:** `typing.Optional[typing.List[str]]` — Nodes used as BFS origins for graph-distance-aware retrieval.
+
+
+
+
+
+-
+
+**center_node_uuid:** `typing.Optional[str]`
+
+The node to rank results by distance from. Required when reranker is
+node_distance.
@@ -3301,7 +3465,7 @@ timeout, Zep returns the results without the filter.
-
-**filters:** `typing.Optional[EpisodeSearchFilters]` — Filters constraining which items are returned.
+**filters:** `typing.Optional[EdgeSearchFilters]` — Filters constraining which items are returned.
@@ -3320,7 +3484,7 @@ Required when reranker is mmr.
-
-**reranker:** `typing.Optional[SearchEpisodesRequestReranker]` — The reranking strategy applied to retrieved results. Defaults to rrf.
+**reranker:** `typing.Optional[SearchEdgesRequestReranker]` — The reranking strategy applied to retrieved results. Defaults to rrf.
@@ -3340,7 +3504,7 @@ Required when reranker is mmr.
-client.graph.search_nodes(...) -> NodePage
+client.graph.search_episodes(...) -> EpisodePage
-
@@ -3352,7 +3516,7 @@ Required when reranker is mmr.
-
-Node search does not support edge_types, exclude_edge_types, edge_uuids, connected_node_uuids, source_node_uuids, target_node_uuids, date_filters, or content_policy_violated. content_policy_violated is supported on episode search only. The edge filters select edges. To get the nodes that an edge connects, use graph.search_edges or graph.node.list_neighbors. To filter nodes by created_at, use graph.node.list.
+Episode search supports only the metadata_filters and content_policy_violated filters. Every other filter returns unsupported_filter.
@@ -3375,7 +3539,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.search_nodes(
+client.graph.search_episodes(
graph_uuid="graph_uuid",
query="query",
)
@@ -3463,7 +3627,7 @@ timeout, Zep returns the results without the filter.
-
-**filters:** `typing.Optional[NodeSearchFilters]` — Filters constraining which items are returned.
+**filters:** `typing.Optional[EpisodeSearchFilters]` — Filters constraining which items are returned.
@@ -3482,7 +3646,7 @@ Required when reranker is mmr.
-
-**reranker:** `typing.Optional[SearchNodesRequestReranker]` — The reranking strategy applied to retrieved results. Defaults to rrf.
+**reranker:** `typing.Optional[SearchEpisodesRequestReranker]` — The reranking strategy applied to retrieved results. Defaults to rrf.
@@ -3502,7 +3666,7 @@ Required when reranker is mmr.
-client.graph.search_observations(...) -> ObservationPage
+client.graph.search_nodes(...) -> NodePage
-
@@ -3514,7 +3678,7 @@ Required when reranker is mmr.
-
-Observation search supports no filters. Every filter returns unsupported_filter.
+Node search does not support edge_types, exclude_edge_types, edge_uuids, connected_node_uuids, source_node_uuids, target_node_uuids, date_filters, or content_policy_violated. content_policy_violated is supported on episode search only. The edge filters select edges. To get the nodes that an edge connects, use graph.search_edges or graph.node.list_neighbors. To filter nodes by created_at, use graph.node.list.
@@ -3537,7 +3701,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.search_observations(
+client.graph.search_nodes(
graph_uuid="graph_uuid",
query="query",
)
@@ -3625,7 +3789,7 @@ timeout, Zep returns the results without the filter.
-
-**filters:** `typing.Optional[ObservationSearchFilters]` — Filters constraining which items are returned.
+**filters:** `typing.Optional[NodeSearchFilters]` — Filters constraining which items are returned.
@@ -3644,7 +3808,7 @@ Required when reranker is mmr.
-
-**reranker:** `typing.Optional[SearchObservationsRequestReranker]` — The reranking strategy applied to retrieved results. Defaults to rrf.
+**reranker:** `typing.Optional[SearchNodesRequestReranker]` — The reranking strategy applied to retrieved results. Defaults to rrf.
@@ -3664,7 +3828,7 @@ Required when reranker is mmr.
-client.graph.search_thread_summaries(...) -> ThreadSummaryPage
+client.graph.search_observations(...) -> ObservationPage
-
@@ -3676,7 +3840,7 @@ Required when reranker is mmr.
-
-Thread-summary search supports only the metadata_filters filter, which matches the metadata of the thread episodes. Every other filter returns unsupported_filter.
+Observation search supports no filters. Every filter returns unsupported_filter.
@@ -3699,7 +3863,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.search_thread_summaries(
+client.graph.search_observations(
graph_uuid="graph_uuid",
query="query",
)
@@ -3787,7 +3951,7 @@ timeout, Zep returns the results without the filter.
-
-**filters:** `typing.Optional[ThreadSummarySearchFilters]` — Filters constraining which items are returned.
+**filters:** `typing.Optional[ObservationSearchFilters]` — Filters constraining which items are returned.
@@ -3806,7 +3970,7 @@ Required when reranker is mmr.
-
-**reranker:** `typing.Optional[SearchThreadSummariesRequestReranker]` — The reranking strategy applied to retrieved results. Defaults to rrf.
+**reranker:** `typing.Optional[SearchObservationsRequestReranker]` — The reranking strategy applied to retrieved results. Defaults to rrf.
@@ -3826,10 +3990,482 @@ Required when reranker is mmr.
-client.graph.get_subgraph(...) -> SubgraphResponse
+client.graph.search_thread_summaries(...) -> ThreadSummaryPage
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Thread-summary search supports only the metadata_filters filter, which matches the metadata of the thread episodes. Every other filter returns unsupported_filter.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
-
+```python
+from zep_cloud import Zep
+from zep_cloud.environment import ZepEnvironment
+
+client = Zep(
+ api_key="",
+ environment=ZepEnvironment.DEFAULT,
+)
+
+client.graph.search_thread_summaries(
+ graph_uuid="graph_uuid",
+ query="query",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+
+
+
+
+-
+
+**query:** `str` — The search query.
+
+
+
+
+
+-
+
+**page_size:** `typing.Optional[int]` — The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` — Opaque page cursor
+
+
+
+
+
+-
+
+**bfs_origin_node_uuids:** `typing.Optional[typing.List[str]]` — Nodes used as BFS origins for graph-distance-aware retrieval.
+
+
+
+
+
+-
+
+**center_node_uuid:** `typing.Optional[str]`
+
+The node to rank results by distance from. Required when reranker is
+node_distance.
+
+
+
+
+
+-
+
+**filter_low_quality_results:** `typing.Optional[bool]`
+
+The default is false. When true, Zep removes low-quality results at the knee of the
+cross-encoder score curve. The filter never removes a result with a score
+of 0.9 or more. It keeps at least 5 results, or all results when fewer
+than 5 are available. The filter only removes results, so a page still
+returns up to page_size results. Use this field only with reranker
+cross_encoder. It is not supported for episode search. Invalid
+combinations return a 400 error. The cutoff is approximate, not guaranteed.
+When the cross-encoder does not score the results, for example after a
+timeout, Zep returns the results without the filter.
+
+
+
+
+
+-
+
+**filters:** `typing.Optional[ThreadSummarySearchFilters]` — Filters constraining which items are returned.
+
+
+
+
+
+-
+
+**mmr_lambda:** `typing.Optional[float]`
+
+The diversity weighting used for maximal marginal relevance reranking.
+Required when reranker is mmr.
+
+
+
+
+
+-
+
+**reranker:** `typing.Optional[SearchThreadSummariesRequestReranker]` — The reranking strategy applied to retrieved results. Defaults to rrf.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.graph.get_subgraph(...) -> SubgraphResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from zep_cloud import Zep
+from zep_cloud.environment import ZepEnvironment
+
+client = Zep(
+ api_key="",
+ environment=ZepEnvironment.DEFAULT,
+)
+
+client.graph.get_subgraph(
+ graph_uuid="graph_uuid",
+ seed_node_uuids=[
+ "seed_node_uuids"
+ ],
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+
+
+
+
+-
+
+**seed_node_uuids:** `typing.List[str]` — The node UUIDs to expand from, in traversal-priority order.
+
+
+
+
+
+-
+
+**depth:** `typing.Optional[int]` — The maximum traversal depth from the seed nodes. Defaults to 1.
+
+
+
+
+
+-
+
+**direction:** `typing.Optional[SubgraphRequestDirection]`
+
+The edge orientation to follow during expansion: in, out, or both.
+Defaults to both.
+
+
+
+
+
+-
+
+**filters:** `typing.Optional[SearchFilters]` — Filters constraining the traversed edges and included nodes.
+
+
+
+
+
+-
+
+**max_edges:** `typing.Optional[int]` — The maximum number of edges in the response. Defaults to 200.
+
+
+
+
+
+-
+
+**max_nodes:** `typing.Optional[int]` — The maximum number of nodes in the response. Defaults to 100.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.graph.warm(...) -> AsyncResult
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from zep_cloud import Zep
+from zep_cloud.environment import ZepEnvironment
+
+client = Zep(
+ api_key="",
+ environment=ZepEnvironment.DEFAULT,
+)
+
+client.graph.warm(
+ graph_uuid="graph_uuid",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Lookup
+client.lookup.batch(...) -> LookupBatchResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from zep_cloud import Zep
+from zep_cloud.environment import ZepEnvironment
+
+client = Zep(
+ api_key="",
+ environment=ZepEnvironment.DEFAULT,
+)
+
+client.lookup.batch()
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**graphs:** `typing.Optional[typing.List[str]]` — Developer-assigned graph IDs to resolve to UUIDs.
+
+
+
+
+
+-
+
+**threads:** `typing.Optional[typing.List[str]]` — Developer-assigned thread IDs to resolve to UUIDs.
+
+
+
+
+
+-
+
+**users:** `typing.Optional[typing.List[str]]` — Developer-assigned user IDs to resolve to UUIDs.
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+## Project
+client.project.get() -> Project
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from zep_cloud import Zep
+from zep_cloud.environment import ZepEnvironment
+
+client = Zep(
+ api_key="",
+ environment=ZepEnvironment.DEFAULT,
+)
+
+client.project.get()
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.project.update(...) -> Project
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Set `hyperedges_enabled` to `true` to enable extraction. A member needs the `project.edit` permission. Project API keys receive `403 permission_denied`.
+
+
+
+
+
#### 🔌 Usage
@@ -3847,12 +4483,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.get_subgraph(
- graph_uuid="graph_uuid",
- seed_node_uuids=[
- "seed_node_uuids"
- ],
-)
+client.project.update()
```
@@ -3868,7 +4499,10 @@ client.graph.get_subgraph(
-
-**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
+**default_time_zone:** `typing.Optional[str]`
+
+The project's IANA fallback time zone. Set to null to clear the existing
+value.
@@ -3876,7 +4510,10 @@ client.graph.get_subgraph(
-
-**seed_node_uuids:** `typing.List[str]` — The node UUIDs to expand from, in traversal-priority order.
+**hyperedges_enabled:** `typing.Optional[bool]`
+
+Set to true to enable hyperedge extraction. This setting cannot be disabled.
+A member needs project.edit. Project API keys receive 403 permission_denied.
@@ -3884,7 +4521,10 @@ client.graph.get_subgraph(
-
-**depth:** `typing.Optional[int]` — The maximum traversal depth from the seed nodes. Defaults to 1.
+**include_policy_violating_episodes:** `typing.Optional[bool]`
+
+When true, episode reads on graphs with a content policy include the
+episodes that violated the policy.
@@ -3892,56 +4532,35 @@ client.graph.get_subgraph(
-
-**direction:** `typing.Optional[SubgraphRequestDirection]`
-
-The edge orientation to follow during expansion: in, out, or both.
-Defaults to both.
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
--
-**filters:** `typing.Optional[SearchFilters]` — Filters constraining the traversed edges and included nodes.
-
+
+client.project.get_content_policy() -> ContentPolicy
-
-**max_edges:** `typing.Optional[int]` — The maximum number of edges in the response. Defaults to 200.
-
-
-
+#### 📝 Description
-
-**max_nodes:** `typing.Optional[int]` — The maximum number of nodes in the response. Defaults to 100.
-
-
-
-
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
-
-
-
+Experimental: the request, the response, and the behavior of this operation can change. Returns the current content policy revision of the project. A new graph binds this revision at creation.
-
-
-
-
-client.graph.warm(...) -> AsyncResult
-
--
#### 🔌 Usage
@@ -3960,9 +4579,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.graph.warm(
- graph_uuid="graph_uuid",
-)
+client.project.get_content_policy()
```
@@ -3978,14 +4595,6 @@ client.graph.warm(
-
-**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
-
-
-
-
-
--
-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -3998,11 +4607,24 @@ client.graph.warm(
-## Lookup
-client.lookup.batch(...) -> LookupBatchResponse
+client.project.set_content_policy(...) -> ContentPolicy
+
+-
+
+#### 📝 Description
+
-
+
+-
+
+Experimental: this operation and the new rule fields can change. The typed rule fields are in private preview and are available only to enabled accounts. Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. For example, {"categories":[{"key":"health"}],"rules":[{"category_key":"health","action":"exclude","entity_types":["Person"],"condition":"The statement names a person's health condition.","prohibited_examples":["Jordan has a chronic back condition."],"patterns":["diagnosed with"]}]}.
+
+
+
+
+
#### 🔌 Usage
@@ -4020,7 +4642,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.lookup.batch()
+client.project.set_content_policy()
```
@@ -4036,15 +4658,10 @@ client.lookup.batch()
-
-**graphs:** `typing.Optional[typing.List[str]]` — Developer-assigned graph IDs to resolve to UUIDs.
-
-
-
-
-
--
+**categories:** `typing.Optional[typing.List[ContentPolicyCategoryRequest]]`
-**threads:** `typing.Optional[typing.List[str]]` — Developer-assigned thread IDs to resolve to UUIDs.
+The categories of the policy. Maximum 16. An empty list with no rules
+means no content policy.
@@ -4052,7 +4669,7 @@ client.lookup.batch()
-
-**users:** `typing.Optional[typing.List[str]]` — Developer-assigned user IDs to resolve to UUIDs.
+**rules:** `typing.Optional[typing.List[ContentPolicyRuleRequest]]` — The rules of the policy. Maximum 32.
@@ -4072,11 +4689,24 @@ client.lookup.batch()
-## Project
-client.project.get() -> Project
+client.project.list_content_policy_revisions(...) -> ContentPolicyRevisionPage
+
+-
+
+#### 📝 Description
+
+
+-
+
-
+Experimental: the request, the response, and the behavior of this operation can change. Lists every revision of the project content policy, newest first, including revision 0.
+
+
+
+
+
#### 🔌 Usage
@@ -4094,7 +4724,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.project.get()
+client.project.list_content_policy_revisions()
```
@@ -4110,6 +4740,22 @@ client.project.get()
-
+**page_size:** `typing.Optional[int]` — The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages.
+
+
+
+
+
+-
+
+**cursor:** `typing.Optional[str]` — Opaque page cursor
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -4122,7 +4768,7 @@ client.project.get()
-client.project.update(...) -> Project
+client.project.get_content_policy_revision(...) -> ContentPolicy
-
@@ -4134,7 +4780,7 @@ client.project.get()
-
-Set `hyperedges_enabled` to `true` to enable extraction. A member needs the `project.edit` permission. Project API keys receive `403 permission_denied`.
+Experimental: the request, the response, and the behavior of this operation can change.
@@ -4157,7 +4803,9 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.project.update()
+client.project.get_content_policy_revision(
+ revision_uuid="revision_uuid",
+)
```
@@ -4173,32 +4821,7 @@ client.project.update()
-
-**default_time_zone:** `typing.Optional[str]`
-
-The project's IANA fallback time zone. Set to null to clear the existing
-value.
-
-
-
-
-
--
-
-**hyperedges_enabled:** `typing.Optional[bool]`
-
-Set to true to enable hyperedge extraction. This setting cannot be disabled.
-A member needs project.edit. Project API keys receive 403 permission_denied.
-
-
-
-
-
--
-
-**include_policy_violating_episodes:** `typing.Optional[bool]`
-
-When true, episode reads on graphs with a content policy include the
-episodes that violated the policy.
+**revision_uuid:** `str` — Revision UUID
@@ -4218,7 +4841,7 @@ episodes that violated the policy.
-client.project.get_content_policy() -> ContentPolicy
+client.project.get_inclusion_rules() -> InclusionRules
-
@@ -4230,7 +4853,7 @@ episodes that violated the policy.
-
-Returns the current content policy revision of the project. A new graph binds this revision at creation.
+Returns the project rules, for example {"inclusion_rules":[],"inherited":false}.
@@ -4253,7 +4876,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.project.get_content_policy()
+client.project.get_inclusion_rules()
```
@@ -4281,7 +4904,7 @@ client.project.get_content_policy()
-client.project.set_content_policy(...) -> ContentPolicy
+client.project.set_inclusion_rules(...) -> InclusionRules
-
@@ -4293,7 +4916,7 @@ client.project.get_content_policy()
-
-Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. An empty policy (no categories and no rules) removes the content policy for new graphs.
+Replaces the project rules. Request: {"inclusion_rules":[]}. Response: {"inclusion_rules":[],"inherited":false}.
@@ -4316,7 +4939,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.project.set_content_policy()
+client.project.set_inclusion_rules()
```
@@ -4332,18 +4955,7 @@ client.project.set_content_policy()
-
-**categories:** `typing.Optional[typing.List[ContentPolicyCategoryRequest]]`
-
-The categories of the policy. Maximum 16. An empty list with no rules
-means no content policy.
-
-
-
-
-
--
-
-**rules:** `typing.Optional[typing.List[ContentPolicyRuleRequest]]` — The rules of the policy. Maximum 32.
+**request:** `InclusionRules`
@@ -4363,24 +4975,10 @@ means no content policy.
-client.project.list_content_policy_revisions(...) -> ContentPolicyRevisionPage
-
--
-
-#### 📝 Description
-
-
--
-
+
client.project.get_instructions() -> Instructions
-
-Lists every revision of the project content policy, newest first, including revision 0.
-
-
-
-
-
#### 🔌 Usage
@@ -4398,7 +4996,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.project.list_content_policy_revisions()
+client.project.get_instructions()
```
@@ -4414,22 +5012,6 @@ client.project.list_content_policy_revisions()
-
-**page_size:** `typing.Optional[int]` — The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages.
-
-
-
-
-
--
-
-**cursor:** `typing.Optional[str]` — Opaque page cursor
-
-
-
-
-
--
-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -4442,7 +5024,7 @@ client.project.list_content_policy_revisions()
-client.project.get_content_policy_revision(...) -> ContentPolicy
+client.project.set_instructions(...) -> Instructions
-
@@ -4463,9 +5045,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.project.get_content_policy_revision(
- revision_uuid="revision_uuid",
-)
+client.project.set_instructions()
```
@@ -4481,7 +5061,7 @@ client.project.get_content_policy_revision(
-
-**revision_uuid:** `str` — Revision UUID
+**request:** `Instructions`
@@ -4501,10 +5081,25 @@ client.project.get_content_policy_revision(
-client.project.get_instructions() -> Instructions
+client.project.get_knowledge() -> KnowledgeResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
-
+Returns the domain knowledge in effect at this scope. The knowledge_api account flag must be enabled.
+Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+
+
+
+
+
#### 🔌 Usage
@@ -4522,7 +5117,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.project.get_instructions()
+client.project.get_knowledge()
```
@@ -4550,10 +5145,26 @@ client.project.get_instructions()
-client.project.set_instructions(...) -> Instructions
+client.project.set_knowledge(...) -> KnowledgeResponse
-
+#### 📝 Description
+
+
+-
+
+
+-
+
+Replaces the complete set of domain knowledge entries at this scope. The knowledge_api account flag must be enabled.
+Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+Request example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}]}
+
+
+
+
+
#### 🔌 Usage
@@ -4571,7 +5182,7 @@ client = Zep(
environment=ZepEnvironment.DEFAULT,
)
-client.project.set_instructions()
+client.project.set_knowledge()
```
@@ -4587,7 +5198,7 @@ client.project.set_instructions()
-
-**request:** `Instructions`
+**request:** `SetKnowledgeRequest`
@@ -6148,7 +6759,7 @@ client.trace_connection.delete(
-
-Verify changed settings before Zep stores them. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: `{"requests_per_minute":60,"retention_days":30}`.
+Verify changed settings before Zep stores them. A request that changes `api_url` must also include `credential`. Otherwise Zep returns `400 invalid_request`. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: `{"requests_per_minute":60,"retention_days":30}`.
@@ -6197,7 +6808,10 @@ client.trace_connection.update(
-
-**api_url:** `typing.Optional[str]` — APIURL is the new custom provider endpoint, when supplied.
+**api_url:** `typing.Optional[str]`
+
+APIURL is the new custom provider endpoint, when supplied.
+A request that changes api_url must also include credential.
@@ -7307,7 +7921,7 @@ client.user.create()
**content_policy:** `typing.Optional[GraphContentPolicyRequest]`
-Content policy additions for the user's graph. The graph binds the
+Experimental. Content policy additions for the user's graph. The graph binds the
current project content policy plus these additions, and the binding
does not change after creation.
@@ -16006,6 +16620,9 @@ client.graph.hyperedge.update(
Adds one member edge to an existing hyperedge. The new member inherits the
hyperedge's fact and timestamps and joins its episodes, so only its own
name and node pair are supplied.
+The response contains the UUID that Zep assigned and the name and nodes that you supplied.
+It does not contain the shared fact or timestamps of the hyperedge.
+To read them, use graph.hyperedge.get.
diff --git a/src/zep_cloud/__init__.py b/src/zep_cloud/__init__.py
index e5b5b2ac..9ee68a8d 100644
--- a/src/zep_cloud/__init__.py
+++ b/src/zep_cloud/__init__.py
@@ -134,6 +134,8 @@
AsyncResult,
Batch,
BatchItem,
+ BatchItemError,
+ BatchItemErrorCode,
BatchItemInput,
BatchItemInputDataType,
BatchItemInputRole,
@@ -156,9 +158,12 @@
ContentPolicyEventListFilters,
ContentPolicyEventListFiltersDropReason,
ContentPolicyEventPage,
+ ContentPolicyMatchedBy,
ContentPolicyRevisionPage,
ContentPolicyRule,
+ ContentPolicyRuleAction,
ContentPolicyRuleRequest,
+ ContentPolicyRuleRequestAction,
ContextEdge,
ContextEpisode,
ContextNode,
@@ -201,6 +206,7 @@
EpisodeListFilters,
EpisodePage,
EpisodeSearchFilters,
+ EpisodeWaitStatus,
ErrorBody,
Graph,
GraphContentPolicy,
@@ -223,6 +229,7 @@
GraphQueryPlanStep,
GraphQueryReasoningEvent,
GraphQueryResponse,
+ GraphQueryResponseAnswerStatus,
GraphQueryResultEvent,
GraphQueryResults,
GraphQueryStartedEvent,
@@ -245,7 +252,13 @@
HyperedgeListFilters,
HyperedgePage,
ImportedTraceReference,
+ InclusionRule,
+ InclusionRuleEffect,
+ InclusionRuleTarget,
+ InclusionRules,
IngestionTrace,
+ IngestionTraceCandidateOutcome,
+ IngestionTraceCandidateOutcomeOutcome,
IngestionTraceEdge,
IngestionTraceEdgeInvalidation,
IngestionTraceEdgeReference,
@@ -261,6 +274,8 @@
IngestionTraceStatus,
IngestionTraceStep,
Instructions,
+ KnowledgeEntry,
+ KnowledgeResponse,
LookupBatchResponse,
LookupItem,
LookupItemResourceType,
@@ -311,6 +326,7 @@
RoleType,
SearchFilters,
SearchListRequest,
+ SetKnowledgeRequest,
SkillDefinition,
SkillDefinitionSection,
SkillFailure,
@@ -563,6 +579,8 @@
"BadRequestError": ".errors",
"Batch": ".types",
"BatchItem": ".types",
+ "BatchItemError": ".types",
+ "BatchItemErrorCode": ".types",
"BatchItemInput": ".types",
"BatchItemInputDataType": ".types",
"BatchItemInputRole": ".types",
@@ -587,9 +605,12 @@
"ContentPolicyEventListFilters": ".types",
"ContentPolicyEventListFiltersDropReason": ".types",
"ContentPolicyEventPage": ".types",
+ "ContentPolicyMatchedBy": ".types",
"ContentPolicyRevisionPage": ".types",
"ContentPolicyRule": ".types",
+ "ContentPolicyRuleAction": ".types",
"ContentPolicyRuleRequest": ".types",
+ "ContentPolicyRuleRequestAction": ".types",
"ContentTooLargeError": ".errors",
"ContextEdge": ".types",
"ContextEpisode": ".types",
@@ -636,6 +657,7 @@
"EpisodeListFilters": ".types",
"EpisodePage": ".types",
"EpisodeSearchFilters": ".types",
+ "EpisodeWaitStatus": ".types",
"ErrorBody": ".types",
"ForbiddenError": ".errors",
"Graph": ".types",
@@ -663,6 +685,7 @@
"GraphQueryReasoningEvent": ".types",
"GraphQueryRequestMode": ".graph",
"GraphQueryResponse": ".types",
+ "GraphQueryResponseAnswerStatus": ".types",
"GraphQueryResultEvent": ".types",
"GraphQueryResults": ".types",
"GraphQueryStartedEvent": ".types",
@@ -685,7 +708,13 @@
"HyperedgeListFilters": ".types",
"HyperedgePage": ".types",
"ImportedTraceReference": ".types",
+ "InclusionRule": ".types",
+ "InclusionRuleEffect": ".types",
+ "InclusionRuleTarget": ".types",
+ "InclusionRules": ".types",
"IngestionTrace": ".types",
+ "IngestionTraceCandidateOutcome": ".types",
+ "IngestionTraceCandidateOutcomeOutcome": ".types",
"IngestionTraceEdge": ".types",
"IngestionTraceEdgeInvalidation": ".types",
"IngestionTraceEdgeReference": ".types",
@@ -702,6 +731,8 @@
"IngestionTraceStep": ".types",
"Instructions": ".types",
"InternalServerError": ".errors",
+ "KnowledgeEntry": ".types",
+ "KnowledgeResponse": ".types",
"LookupBatchResponse": ".types",
"LookupItem": ".types",
"LookupItemResourceType": ".types",
@@ -759,6 +790,7 @@
"SearchObservationsRequestReranker": ".graph",
"SearchThreadSummariesRequestReranker": ".graph",
"ServiceUnavailableError": ".errors",
+ "SetKnowledgeRequest": ".types",
"SkillDefinition": ".types",
"SkillDefinitionSection": ".types",
"SkillFailure": ".types",
@@ -1011,6 +1043,8 @@ def __dir__():
"BadRequestError",
"Batch",
"BatchItem",
+ "BatchItemError",
+ "BatchItemErrorCode",
"BatchItemInput",
"BatchItemInputDataType",
"BatchItemInputRole",
@@ -1035,9 +1069,12 @@ def __dir__():
"ContentPolicyEventListFilters",
"ContentPolicyEventListFiltersDropReason",
"ContentPolicyEventPage",
+ "ContentPolicyMatchedBy",
"ContentPolicyRevisionPage",
"ContentPolicyRule",
+ "ContentPolicyRuleAction",
"ContentPolicyRuleRequest",
+ "ContentPolicyRuleRequestAction",
"ContentTooLargeError",
"ContextEdge",
"ContextEpisode",
@@ -1084,6 +1121,7 @@ def __dir__():
"EpisodeListFilters",
"EpisodePage",
"EpisodeSearchFilters",
+ "EpisodeWaitStatus",
"ErrorBody",
"ForbiddenError",
"Graph",
@@ -1111,6 +1149,7 @@ def __dir__():
"GraphQueryReasoningEvent",
"GraphQueryRequestMode",
"GraphQueryResponse",
+ "GraphQueryResponseAnswerStatus",
"GraphQueryResultEvent",
"GraphQueryResults",
"GraphQueryStartedEvent",
@@ -1133,7 +1172,13 @@ def __dir__():
"HyperedgeListFilters",
"HyperedgePage",
"ImportedTraceReference",
+ "InclusionRule",
+ "InclusionRuleEffect",
+ "InclusionRuleTarget",
+ "InclusionRules",
"IngestionTrace",
+ "IngestionTraceCandidateOutcome",
+ "IngestionTraceCandidateOutcomeOutcome",
"IngestionTraceEdge",
"IngestionTraceEdgeInvalidation",
"IngestionTraceEdgeReference",
@@ -1150,6 +1195,8 @@ def __dir__():
"IngestionTraceStep",
"Instructions",
"InternalServerError",
+ "KnowledgeEntry",
+ "KnowledgeResponse",
"LookupBatchResponse",
"LookupItem",
"LookupItemResourceType",
@@ -1207,6 +1254,7 @@ def __dir__():
"SearchObservationsRequestReranker",
"SearchThreadSummariesRequestReranker",
"ServiceUnavailableError",
+ "SetKnowledgeRequest",
"SkillDefinition",
"SkillDefinitionSection",
"SkillFailure",
diff --git a/src/zep_cloud/batch/client.py b/src/zep_cloud/batch/client.py
index 823078c8..87683a46 100644
--- a/src/zep_cloud/batch/client.py
+++ b/src/zep_cloud/batch/client.py
@@ -232,7 +232,7 @@ def list_items(
api_key="YOUR_API_KEY",
)
response = client.batch.list_items(
- batch_uuid="batch_uuid",
+ batch_uuid="366ac0d2-69b5-4140-89e8-15d025a33340",
)
for item in response:
yield item
@@ -279,10 +279,13 @@ def add_items(
api_key="YOUR_API_KEY",
)
client.batch.add_items(
- batch_uuid="batch_uuid",
+ batch_uuid="366ac0d2-69b5-4140-89e8-15d025a33340",
items=[
BatchItemInput(
type="graph_episode",
+ graph_uuid="815f9d31-eef0-4201-90e6-02c1e6f16e90",
+ data_type="text",
+ data="A sample item.",
)
],
)
@@ -585,7 +588,7 @@ async def list_items(
async def main() -> None:
response = await client.batch.list_items(
- batch_uuid="batch_uuid",
+ batch_uuid="366ac0d2-69b5-4140-89e8-15d025a33340",
)
async for item in response:
yield item
@@ -641,10 +644,13 @@ async def add_items(
async def main() -> None:
await client.batch.add_items(
- batch_uuid="batch_uuid",
+ batch_uuid="366ac0d2-69b5-4140-89e8-15d025a33340",
items=[
BatchItemInput(
type="graph_episode",
+ graph_uuid="815f9d31-eef0-4201-90e6-02c1e6f16e90",
+ data_type="text",
+ data="A sample item.",
)
],
)
diff --git a/src/zep_cloud/batch/raw_client.py b/src/zep_cloud/batch/raw_client.py
index f80fe0ca..a8ff133c 100644
--- a/src/zep_cloud/batch/raw_client.py
+++ b/src/zep_cloud/batch/raw_client.py
@@ -15,6 +15,7 @@
from ..core.serialization import convert_and_respect_annotation_metadata
from ..errors.bad_request_error import BadRequestError
from ..errors.conflict_error import ConflictError
+from ..errors.forbidden_error import ForbiddenError
from ..errors.not_found_error import NotFoundError
from ..errors.unauthorized_error import UnauthorizedError
from ..types.api_error import ApiError as types_api_error_ApiError
@@ -694,6 +695,17 @@ def process(
),
),
)
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
@@ -1400,6 +1412,17 @@ async def process(
),
),
)
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
diff --git a/src/zep_cloud/core/client_wrapper.py b/src/zep_cloud/core/client_wrapper.py
index d2dca554..cb23a747 100644
--- a/src/zep_cloud/core/client_wrapper.py
+++ b/src/zep_cloud/core/client_wrapper.py
@@ -33,12 +33,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform
headers: typing.Dict[str, str] = {
- "User-Agent": "zep-cloud/4.1.0",
+ "User-Agent": "zep-cloud/4.2.0",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "zep-cloud",
- "X-Fern-SDK-Version": "4.1.0",
+ "X-Fern-SDK-Version": "4.2.0",
**(self.get_custom_headers() or {}),
}
headers["Authorization"] = f"Api-Key {self.api_key}"
diff --git a/src/zep_cloud/graph/client.py b/src/zep_cloud/graph/client.py
index a9b28d27..a3fb5196 100644
--- a/src/zep_cloud/graph/client.py
+++ b/src/zep_cloud/graph/client.py
@@ -32,7 +32,11 @@
from ..types.graph_page import GraphPage
from ..types.graph_query_response import GraphQueryResponse
from ..types.graph_query_stream_event import GraphQueryStreamEvent
+from ..types.inclusion_rule import InclusionRule
+from ..types.inclusion_rules import InclusionRules
from ..types.instructions import Instructions
+from ..types.knowledge_entry import KnowledgeEntry
+from ..types.knowledge_response import KnowledgeResponse
from ..types.node import Node
from ..types.node_page import NodePage
from ..types.node_search_filters import NodeSearchFilters
@@ -108,7 +112,7 @@ def create(
Parameters
----------
content_policy : typing.Optional[GraphContentPolicyRequest]
- Content policy additions for the graph. The graph binds the current
+ Experimental. Content policy additions for the graph. The graph binds the current
project content policy plus these additions, and the binding does not
change after creation.
@@ -266,7 +270,7 @@ def query_stream(
request_options: typing.Optional[RequestOptions] = None,
) -> typing.Iterator[GraphQueryStreamEvent]:
"""
- Experimental. Retrieves the graph records for a natural-language question about a graph with a read-only retrieval loop. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. deep: A model plans its own searches. It can page through complete lists and read more records before it answers. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and in closed release. Zep enables the operation only for select accounts. The request, the response, the events, and the modes of the operation can change. A request from an account without access returns `404 not_found`. To get access, contact support@getzep.com.
+ Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval. Zep explores the graph with searches and graph traversals, and it uses the records from each retrieval round to plan the next round. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items and an `answer_status` of `answered`, `partial`, or `refused`. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: Optimized for latency. Retrieves the context for multi-hop queries. The query runs at most 3 search rounds. deep: Runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and available to every Zep account. The request, the response, the events, and the modes of the operation can change.
Parameters
----------
@@ -274,7 +278,7 @@ def query_stream(
The graph UUIDs to query. The current release accepts one UUID.
query : str
- The natural-language question about the graph.
+ The natural-language query for the graph.
generate_answer : typing.Optional[bool]
When true, a model also writes an answer from the retrieved records.
@@ -284,7 +288,11 @@ def query_stream(
Optional caller guidance for the answer. The agent treats it as untrusted text.
mode : typing.Optional[GraphQueryRequestMode]
- The retrieval mode. The default is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. A BYOM project or BYOC deployment also needs a SystemOne decision model for fast. deep: A model plans its own searches. It can page through complete lists and read more records before it answers.
+ The retrieval mode. The default is fast.
+ Fast mode is optimized for latency. It retrieves the context for multi-hop queries.
+ The query runs at most 3 search rounds. A BYOM project needs a decision model for fast mode.
+ A BYOC deployment needs a decision model (SystemOne or Gemini Decisions) for fast mode.
+ Deep mode runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -329,7 +337,7 @@ def query(
request_options: typing.Optional[RequestOptions] = None,
) -> GraphQueryResponse:
"""
- Experimental. Retrieves the graph records for a natural-language question about a graph with a read-only retrieval loop. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. deep: A model plans its own searches. It can page through complete lists and read more records before it answers. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and in closed release. Zep enables the operation only for select accounts. The request, the response, the events, and the modes of the operation can change. A request from an account without access returns `404 not_found`. To get access, contact support@getzep.com.
+ Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval. Zep explores the graph with searches and graph traversals, and it uses the records from each retrieval round to plan the next round. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items and an `answer_status` of `answered`, `partial`, or `refused`. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: Optimized for latency. Retrieves the context for multi-hop queries. The query runs at most 3 search rounds. deep: Runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and available to every Zep account. The request, the response, the events, and the modes of the operation can change.
Parameters
----------
@@ -337,7 +345,7 @@ def query(
The graph UUIDs to query. The current release accepts one UUID.
query : str
- The natural-language question about the graph.
+ The natural-language query for the graph.
generate_answer : typing.Optional[bool]
When true, a model also writes an answer from the retrieved records.
@@ -347,7 +355,11 @@ def query(
Optional caller guidance for the answer. The agent treats it as untrusted text.
mode : typing.Optional[GraphQueryRequestMode]
- The retrieval mode. The default is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. A BYOM project or BYOC deployment also needs a SystemOne decision model for fast. deep: A model plans its own searches. It can page through complete lists and read more records before it answers.
+ The retrieval mode. The default is fast.
+ Fast mode is optimized for latency. It retrieves the context for multi-hop queries.
+ The query runs at most 3 search rounds. A BYOM project needs a decision model for fast mode.
+ A BYOC deployment needs a decision model (SystemOne or Gemini Decisions) for fast mode.
+ Deep mode runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -550,7 +562,7 @@ def get_content_policy(
self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
) -> GraphContentPolicy:
"""
- Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.
+ Experimental: the request, the response, and the behavior of this operation can change. Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.
Parameters
----------
@@ -589,7 +601,7 @@ def list_content_policy_events(
request_options: typing.Optional[RequestOptions] = None,
) -> SyncPager[ContentPolicyEvent, ContentPolicyEventPage]:
"""
- Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.
+ Experimental: the request, the response, and the behavior of this operation can change. Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.
Parameters
----------
@@ -702,6 +714,92 @@ def get_context(
)
return _response.data
+ def get_inclusion_rules(
+ self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> InclusionRules:
+ """
+ Returns the graph rules, for example {"inclusion_rules":[],"inherited":true}.
+
+ Parameters
+ ----------
+ graph_uuid : str
+ Graph UUID
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ InclusionRules
+ OK
+
+ Examples
+ --------
+ from zep_cloud import Zep
+
+ client = Zep(
+ api_key="YOUR_API_KEY",
+ )
+ client.graph.get_inclusion_rules(
+ graph_uuid="graph_uuid",
+ )
+ """
+ _response = self._raw_client.get_inclusion_rules(graph_uuid, request_options=request_options)
+ return _response.data
+
+ def set_inclusion_rules(
+ self,
+ graph_uuid: str,
+ *,
+ inclusion_rules: typing.Optional[typing.Sequence[InclusionRule]] = OMIT,
+ inherited: typing.Optional[bool] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> InclusionRules:
+ """
+ Replaces the graph rules. Request: {"inclusion_rules":[]}. Response: {"inclusion_rules":[],"inherited":true}.
+
+ Parameters
+ ----------
+ graph_uuid : str
+ Graph UUID
+
+ inclusion_rules : typing.Optional[typing.Sequence[InclusionRule]]
+ InclusionRules replaces the complete rule set at this scope.
+
+ inherited : typing.Optional[bool]
+ Inherited identifies a graph that uses project defaults.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ InclusionRules
+ OK
+
+ Examples
+ --------
+ from zep_cloud import Zep
+
+ client = Zep(
+ api_key="YOUR_API_KEY",
+ )
+ client.graph.set_inclusion_rules(
+ graph_uuid="graph_uuid",
+ )
+ """
+ _response = self._raw_client.set_inclusion_rules(
+ graph_uuid,
+ inclusion_rules=inclusion_rules,
+ inherited=inherited,
+ idempotency_key=idempotency_key,
+ request_options=request_options,
+ )
+ return _response.data
+
def get_instructions(
self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
) -> Instructions:
@@ -786,6 +884,87 @@ def set_instructions(
)
return _response.data
+ def get_knowledge(
+ self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> KnowledgeResponse:
+ """
+ Returns the domain knowledge in effect at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+
+ Parameters
+ ----------
+ graph_uuid : str
+ The UUID of the graph or its user.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ KnowledgeResponse
+ OK
+
+ Examples
+ --------
+ from zep_cloud import Zep
+
+ client = Zep(
+ api_key="YOUR_API_KEY",
+ )
+ client.graph.get_knowledge(
+ graph_uuid="graph_uuid",
+ )
+ """
+ _response = self._raw_client.get_knowledge(graph_uuid, request_options=request_options)
+ return _response.data
+
+ def set_knowledge(
+ self,
+ graph_uuid: str,
+ *,
+ knowledge: typing.Optional[typing.Sequence[KnowledgeEntry]] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> KnowledgeResponse:
+ """
+ Replaces the complete set of domain knowledge entries at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+ Request example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}]}
+
+ Parameters
+ ----------
+ graph_uuid : str
+ The UUID of the graph or its user.
+
+ knowledge : typing.Optional[typing.Sequence[KnowledgeEntry]]
+ The complete set of domain knowledge entries. An empty list clears the scope.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ KnowledgeResponse
+ OK
+
+ Examples
+ --------
+ from zep_cloud import Zep
+
+ client = Zep(
+ api_key="YOUR_API_KEY",
+ )
+ client.graph.set_knowledge(
+ graph_uuid="graph_uuid",
+ )
+ """
+ _response = self._raw_client.set_knowledge(
+ graph_uuid, knowledge=knowledge, idempotency_key=idempotency_key, request_options=request_options
+ )
+ return _response.data
+
def list_metadata_keys(
self,
graph_uuid: str,
@@ -1717,7 +1896,7 @@ async def create(
Parameters
----------
content_policy : typing.Optional[GraphContentPolicyRequest]
- Content policy additions for the graph. The graph binds the current
+ Experimental. Content policy additions for the graph. The graph binds the current
project content policy plus these additions, and the binding does not
change after creation.
@@ -1900,7 +2079,7 @@ async def query_stream(
request_options: typing.Optional[RequestOptions] = None,
) -> typing.AsyncIterator[GraphQueryStreamEvent]:
"""
- Experimental. Retrieves the graph records for a natural-language question about a graph with a read-only retrieval loop. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. deep: A model plans its own searches. It can page through complete lists and read more records before it answers. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and in closed release. Zep enables the operation only for select accounts. The request, the response, the events, and the modes of the operation can change. A request from an account without access returns `404 not_found`. To get access, contact support@getzep.com.
+ Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval. Zep explores the graph with searches and graph traversals, and it uses the records from each retrieval round to plan the next round. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items and an `answer_status` of `answered`, `partial`, or `refused`. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: Optimized for latency. Retrieves the context for multi-hop queries. The query runs at most 3 search rounds. deep: Runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and available to every Zep account. The request, the response, the events, and the modes of the operation can change.
Parameters
----------
@@ -1908,7 +2087,7 @@ async def query_stream(
The graph UUIDs to query. The current release accepts one UUID.
query : str
- The natural-language question about the graph.
+ The natural-language query for the graph.
generate_answer : typing.Optional[bool]
When true, a model also writes an answer from the retrieved records.
@@ -1918,7 +2097,11 @@ async def query_stream(
Optional caller guidance for the answer. The agent treats it as untrusted text.
mode : typing.Optional[GraphQueryRequestMode]
- The retrieval mode. The default is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. A BYOM project or BYOC deployment also needs a SystemOne decision model for fast. deep: A model plans its own searches. It can page through complete lists and read more records before it answers.
+ The retrieval mode. The default is fast.
+ Fast mode is optimized for latency. It retrieves the context for multi-hop queries.
+ The query runs at most 3 search rounds. A BYOM project needs a decision model for fast mode.
+ A BYOC deployment needs a decision model (SystemOne or Gemini Decisions) for fast mode.
+ Deep mode runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -1972,7 +2155,7 @@ async def query(
request_options: typing.Optional[RequestOptions] = None,
) -> GraphQueryResponse:
"""
- Experimental. Retrieves the graph records for a natural-language question about a graph with a read-only retrieval loop. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. deep: A model plans its own searches. It can page through complete lists and read more records before it answers. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and in closed release. Zep enables the operation only for select accounts. The request, the response, the events, and the modes of the operation can change. A request from an account without access returns `404 not_found`. To get access, contact support@getzep.com.
+ Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval. Zep explores the graph with searches and graph traversals, and it uses the records from each retrieval round to plan the next round. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items and an `answer_status` of `answered`, `partial`, or `refused`. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: Optimized for latency. Retrieves the context for multi-hop queries. The query runs at most 3 search rounds. deep: Runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and available to every Zep account. The request, the response, the events, and the modes of the operation can change.
Parameters
----------
@@ -1980,7 +2163,7 @@ async def query(
The graph UUIDs to query. The current release accepts one UUID.
query : str
- The natural-language question about the graph.
+ The natural-language query for the graph.
generate_answer : typing.Optional[bool]
When true, a model also writes an answer from the retrieved records.
@@ -1990,7 +2173,11 @@ async def query(
Optional caller guidance for the answer. The agent treats it as untrusted text.
mode : typing.Optional[GraphQueryRequestMode]
- The retrieval mode. The default is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. A BYOM project or BYOC deployment also needs a SystemOne decision model for fast. deep: A model plans its own searches. It can page through complete lists and read more records before it answers.
+ The retrieval mode. The default is fast.
+ Fast mode is optimized for latency. It retrieves the context for multi-hop queries.
+ The query runs at most 3 search rounds. A BYOM project needs a decision model for fast mode.
+ A BYOC deployment needs a decision model (SystemOne or Gemini Decisions) for fast mode.
+ Deep mode runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -2233,7 +2420,7 @@ async def get_content_policy(
self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
) -> GraphContentPolicy:
"""
- Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.
+ Experimental: the request, the response, and the behavior of this operation can change. Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.
Parameters
----------
@@ -2280,7 +2467,7 @@ async def list_content_policy_events(
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncPager[ContentPolicyEvent, ContentPolicyEventPage]:
"""
- Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.
+ Experimental: the request, the response, and the behavior of this operation can change. Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.
Parameters
----------
@@ -2410,6 +2597,108 @@ async def main() -> None:
)
return _response.data
+ async def get_inclusion_rules(
+ self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> InclusionRules:
+ """
+ Returns the graph rules, for example {"inclusion_rules":[],"inherited":true}.
+
+ Parameters
+ ----------
+ graph_uuid : str
+ Graph UUID
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ InclusionRules
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from zep_cloud import AsyncZep
+
+ client = AsyncZep(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.graph.get_inclusion_rules(
+ graph_uuid="graph_uuid",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_inclusion_rules(graph_uuid, request_options=request_options)
+ return _response.data
+
+ async def set_inclusion_rules(
+ self,
+ graph_uuid: str,
+ *,
+ inclusion_rules: typing.Optional[typing.Sequence[InclusionRule]] = OMIT,
+ inherited: typing.Optional[bool] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> InclusionRules:
+ """
+ Replaces the graph rules. Request: {"inclusion_rules":[]}. Response: {"inclusion_rules":[],"inherited":true}.
+
+ Parameters
+ ----------
+ graph_uuid : str
+ Graph UUID
+
+ inclusion_rules : typing.Optional[typing.Sequence[InclusionRule]]
+ InclusionRules replaces the complete rule set at this scope.
+
+ inherited : typing.Optional[bool]
+ Inherited identifies a graph that uses project defaults.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ InclusionRules
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from zep_cloud import AsyncZep
+
+ client = AsyncZep(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.graph.set_inclusion_rules(
+ graph_uuid="graph_uuid",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.set_inclusion_rules(
+ graph_uuid,
+ inclusion_rules=inclusion_rules,
+ inherited=inherited,
+ idempotency_key=idempotency_key,
+ request_options=request_options,
+ )
+ return _response.data
+
async def get_instructions(
self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
) -> Instructions:
@@ -2510,6 +2799,103 @@ async def main() -> None:
)
return _response.data
+ async def get_knowledge(
+ self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> KnowledgeResponse:
+ """
+ Returns the domain knowledge in effect at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+
+ Parameters
+ ----------
+ graph_uuid : str
+ The UUID of the graph or its user.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ KnowledgeResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from zep_cloud import AsyncZep
+
+ client = AsyncZep(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.graph.get_knowledge(
+ graph_uuid="graph_uuid",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_knowledge(graph_uuid, request_options=request_options)
+ return _response.data
+
+ async def set_knowledge(
+ self,
+ graph_uuid: str,
+ *,
+ knowledge: typing.Optional[typing.Sequence[KnowledgeEntry]] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> KnowledgeResponse:
+ """
+ Replaces the complete set of domain knowledge entries at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+ Request example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}]}
+
+ Parameters
+ ----------
+ graph_uuid : str
+ The UUID of the graph or its user.
+
+ knowledge : typing.Optional[typing.Sequence[KnowledgeEntry]]
+ The complete set of domain knowledge entries. An empty list clears the scope.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ KnowledgeResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from zep_cloud import AsyncZep
+
+ client = AsyncZep(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.graph.set_knowledge(
+ graph_uuid="graph_uuid",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.set_knowledge(
+ graph_uuid, knowledge=knowledge, idempotency_key=idempotency_key, request_options=request_options
+ )
+ return _response.data
+
async def list_metadata_keys(
self,
graph_uuid: str,
diff --git a/src/zep_cloud/graph/hyperedge/client.py b/src/zep_cloud/graph/hyperedge/client.py
index 10ce7ed3..729e761a 100644
--- a/src/zep_cloud/graph/hyperedge/client.py
+++ b/src/zep_cloud/graph/hyperedge/client.py
@@ -355,6 +355,9 @@ def create_edge(
Adds one member edge to an existing hyperedge. The new member inherits the
hyperedge's fact and timestamps and joins its episodes, so only its own
name and node pair are supplied.
+ The response contains the UUID that Zep assigned and the name and nodes that you supplied.
+ It does not contain the shared fact or timestamps of the hyperedge.
+ To read them, use graph.hyperedge.get.
Parameters
----------
@@ -837,6 +840,9 @@ async def create_edge(
Adds one member edge to an existing hyperedge. The new member inherits the
hyperedge's fact and timestamps and joins its episodes, so only its own
name and node pair are supplied.
+ The response contains the UUID that Zep assigned and the name and nodes that you supplied.
+ It does not contain the shared fact or timestamps of the hyperedge.
+ To read them, use graph.hyperedge.get.
Parameters
----------
diff --git a/src/zep_cloud/graph/hyperedge/raw_client.py b/src/zep_cloud/graph/hyperedge/raw_client.py
index 2c5a265c..519b06fa 100644
--- a/src/zep_cloud/graph/hyperedge/raw_client.py
+++ b/src/zep_cloud/graph/hyperedge/raw_client.py
@@ -688,6 +688,9 @@ def create_edge(
Adds one member edge to an existing hyperedge. The new member inherits the
hyperedge's fact and timestamps and joins its episodes, so only its own
name and node pair are supplied.
+ The response contains the UUID that Zep assigned and the name and nodes that you supplied.
+ It does not contain the shared fact or timestamps of the hyperedge.
+ To read them, use graph.hyperedge.get.
Parameters
----------
@@ -1567,6 +1570,9 @@ async def create_edge(
Adds one member edge to an existing hyperedge. The new member inherits the
hyperedge's fact and timestamps and joins its episodes, so only its own
name and node pair are supplied.
+ The response contains the UUID that Zep assigned and the name and nodes that you supplied.
+ It does not contain the shared fact or timestamps of the hyperedge.
+ To read them, use graph.hyperedge.get.
Parameters
----------
diff --git a/src/zep_cloud/graph/raw_client.py b/src/zep_cloud/graph/raw_client.py
index ae186be0..ee3a10df 100644
--- a/src/zep_cloud/graph/raw_client.py
+++ b/src/zep_cloud/graph/raw_client.py
@@ -51,7 +51,11 @@
from ..types.graph_page import GraphPage
from ..types.graph_query_response import GraphQueryResponse
from ..types.graph_query_stream_event import GraphQueryStreamEvent
+from ..types.inclusion_rule import InclusionRule
+from ..types.inclusion_rules import InclusionRules
from ..types.instructions import Instructions
+from ..types.knowledge_entry import KnowledgeEntry
+from ..types.knowledge_response import KnowledgeResponse
from ..types.node import Node
from ..types.node_page import NodePage
from ..types.node_search_filters import NodeSearchFilters
@@ -100,7 +104,7 @@ def create(
Parameters
----------
content_policy : typing.Optional[GraphContentPolicyRequest]
- Content policy additions for the graph. The graph binds the current
+ Experimental. Content policy additions for the graph. The graph binds the current
project content policy plus these additions, and the binding does not
change after creation.
@@ -467,7 +471,7 @@ def query_stream(
request_options: typing.Optional[RequestOptions] = None,
) -> typing.Iterator[HttpResponse[typing.Iterator[GraphQueryStreamEvent]]]:
"""
- Experimental. Retrieves the graph records for a natural-language question about a graph with a read-only retrieval loop. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. deep: A model plans its own searches. It can page through complete lists and read more records before it answers. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and in closed release. Zep enables the operation only for select accounts. The request, the response, the events, and the modes of the operation can change. A request from an account without access returns `404 not_found`. To get access, contact support@getzep.com.
+ Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval. Zep explores the graph with searches and graph traversals, and it uses the records from each retrieval round to plan the next round. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items and an `answer_status` of `answered`, `partial`, or `refused`. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: Optimized for latency. Retrieves the context for multi-hop queries. The query runs at most 3 search rounds. deep: Runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and available to every Zep account. The request, the response, the events, and the modes of the operation can change.
Parameters
----------
@@ -475,7 +479,7 @@ def query_stream(
The graph UUIDs to query. The current release accepts one UUID.
query : str
- The natural-language question about the graph.
+ The natural-language query for the graph.
generate_answer : typing.Optional[bool]
When true, a model also writes an answer from the retrieved records.
@@ -485,7 +489,11 @@ def query_stream(
Optional caller guidance for the answer. The agent treats it as untrusted text.
mode : typing.Optional[GraphQueryRequestMode]
- The retrieval mode. The default is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. A BYOM project or BYOC deployment also needs a SystemOne decision model for fast. deep: A model plans its own searches. It can page through complete lists and read more records before it answers.
+ The retrieval mode. The default is fast.
+ Fast mode is optimized for latency. It retrieves the context for multi-hop queries.
+ The query runs at most 3 search rounds. A BYOM project needs a decision model for fast mode.
+ A BYOC deployment needs a decision model (SystemOne or Gemini Decisions) for fast mode.
+ Deep mode runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -664,7 +672,7 @@ def query(
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[GraphQueryResponse]:
"""
- Experimental. Retrieves the graph records for a natural-language question about a graph with a read-only retrieval loop. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. deep: A model plans its own searches. It can page through complete lists and read more records before it answers. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and in closed release. Zep enables the operation only for select accounts. The request, the response, the events, and the modes of the operation can change. A request from an account without access returns `404 not_found`. To get access, contact support@getzep.com.
+ Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval. Zep explores the graph with searches and graph traversals, and it uses the records from each retrieval round to plan the next round. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items and an `answer_status` of `answered`, `partial`, or `refused`. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: Optimized for latency. Retrieves the context for multi-hop queries. The query runs at most 3 search rounds. deep: Runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and available to every Zep account. The request, the response, the events, and the modes of the operation can change.
Parameters
----------
@@ -672,7 +680,7 @@ def query(
The graph UUIDs to query. The current release accepts one UUID.
query : str
- The natural-language question about the graph.
+ The natural-language query for the graph.
generate_answer : typing.Optional[bool]
When true, a model also writes an answer from the retrieved records.
@@ -682,7 +690,11 @@ def query(
Optional caller guidance for the answer. The agent treats it as untrusted text.
mode : typing.Optional[GraphQueryRequestMode]
- The retrieval mode. The default is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. A BYOM project or BYOC deployment also needs a SystemOne decision model for fast. deep: A model plans its own searches. It can page through complete lists and read more records before it answers.
+ The retrieval mode. The default is fast.
+ Fast mode is optimized for latency. It retrieves the context for multi-hop queries.
+ The query runs at most 3 search rounds. A BYOM project needs a decision model for fast mode.
+ A BYOC deployment needs a decision model (SystemOne or Gemini Decisions) for fast mode.
+ Deep mode runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -1264,7 +1276,7 @@ def get_content_policy(
self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[GraphContentPolicy]:
"""
- Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.
+ Experimental: the request, the response, and the behavior of this operation can change. Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.
Parameters
----------
@@ -1361,7 +1373,7 @@ def list_content_policy_events(
request_options: typing.Optional[RequestOptions] = None,
) -> SyncPager[ContentPolicyEvent, ContentPolicyEventPage]:
"""
- Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.
+ Experimental: the request, the response, and the behavior of this operation can change. Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.
Parameters
----------
@@ -1624,34 +1636,36 @@ def get_context(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def get_instructions(
+ def get_inclusion_rules(
self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[Instructions]:
+ ) -> HttpResponse[InclusionRules]:
"""
+ Returns the graph rules, for example {"inclusion_rules":[],"inherited":true}.
+
Parameters
----------
graph_uuid : str
- The UUID of the graph. For a user graph, you can also use the UUID of the user.
+ Graph UUID
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[Instructions]
+ HttpResponse[InclusionRules]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/instructions",
+ f"graphs/{encode_path_param(graph_uuid)}/inclusion-rules",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Instructions,
+ InclusionRules,
parse_obj_as(
- type_=Instructions, # type: ignore
+ type_=InclusionRules, # type: ignore
object_=_response.json(),
),
)
@@ -1702,28 +1716,28 @@ def get_instructions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def set_instructions(
+ def set_inclusion_rules(
self,
graph_uuid: str,
*,
+ inclusion_rules: typing.Optional[typing.Sequence[InclusionRule]] = OMIT,
inherited: typing.Optional[bool] = OMIT,
- instructions: typing.Optional[typing.Sequence[CustomInstruction]] = OMIT,
idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[Instructions]:
+ ) -> HttpResponse[InclusionRules]:
"""
+ Replaces the graph rules. Request: {"inclusion_rules":[]}. Response: {"inclusion_rules":[],"inherited":true}.
+
Parameters
----------
graph_uuid : str
- The UUID of the graph. For a user graph, you can also use the UUID of the user.
+ Graph UUID
- inherited : typing.Optional[bool]
- Whether this is the project's default value rather than an override set on
- this graph.
+ inclusion_rules : typing.Optional[typing.Sequence[InclusionRule]]
+ InclusionRules replaces the complete rule set at this scope.
- instructions : typing.Optional[typing.Sequence[CustomInstruction]]
- The custom extraction instructions in effect at this scope, each with a
- name and text.
+ inherited : typing.Optional[bool]
+ Inherited identifies a graph that uses project defaults.
idempotency_key : typing.Optional[str]
@@ -1732,17 +1746,17 @@ def set_instructions(
Returns
-------
- HttpResponse[Instructions]
+ HttpResponse[InclusionRules]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/instructions",
+ f"graphs/{encode_path_param(graph_uuid)}/inclusion-rules",
method="PUT",
json={
- "inherited": inherited,
- "instructions": convert_and_respect_annotation_metadata(
- object_=instructions, annotation=typing.Sequence[CustomInstruction], direction="write"
+ "inclusion_rules": convert_and_respect_annotation_metadata(
+ object_=inclusion_rules, annotation=typing.Sequence[InclusionRule], direction="write"
),
+ "inherited": inherited,
},
headers={
"content-type": "application/json",
@@ -1754,9 +1768,9 @@ def set_instructions(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Instructions,
+ InclusionRules,
parse_obj_as(
- type_=Instructions, # type: ignore
+ type_=InclusionRules, # type: ignore
object_=_response.json(),
),
)
@@ -1807,124 +1821,9 @@ def set_instructions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def list_metadata_keys(
- self,
- graph_uuid: str,
- *,
- page_size: typing.Optional[int] = None,
- cursor: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> SyncPager[GraphMetadataKey, GraphMetadataKeyList]:
- """
- Returns the append-only metadata keys recorded for a graph. A key can remain in the list after no episode or message uses it.
-
- Parameters
- ----------
- graph_uuid : str
- The UUID of the graph. For a user graph, you can also use the UUID of the user.
-
- page_size : typing.Optional[int]
- The maximum number of keys per page.
-
- cursor : typing.Optional[str]
- Opaque page cursor
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- SyncPager[GraphMetadataKey, GraphMetadataKeyList]
- OK
- """
- _response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/metadata-keys",
- method="GET",
- params={
- "page_size": page_size,
- "cursor": cursor,
- },
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- _parsed_response = typing.cast(
- GraphMetadataKeyList,
- parse_obj_as(
- type_=GraphMetadataKeyList, # type: ignore
- object_=_response.json(),
- ),
- )
- _items = _parsed_response.items
- _parsed_next = _parsed_response.next_cursor
- _has_next = _parsed_next is not None and _parsed_next != ""
- _get_next = lambda: self.list_metadata_keys(
- graph_uuid,
- page_size=page_size,
- cursor=_parsed_next,
- request_options=request_options,
- )
- return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
- if _response.status_code == 400:
- raise BadRequestError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- if _response.status_code == 401:
- raise UnauthorizedError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- if _response.status_code == 403:
- raise ForbiddenError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- if _response.status_code == 404:
- raise NotFoundError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise core_api_error_ApiError(
- status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
- )
- except ValidationError as e:
- raise ParsingError(
- status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
- )
- raise core_api_error_ApiError(
- status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
- )
-
- def get_observation_steering(
+ def get_instructions(
self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[ObservationSteering]:
+ ) -> HttpResponse[Instructions]:
"""
Parameters
----------
@@ -1936,20 +1835,20 @@ def get_observation_steering(
Returns
-------
- HttpResponse[ObservationSteering]
+ HttpResponse[Instructions]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/observation-steering",
+ f"graphs/{encode_path_param(graph_uuid)}/instructions",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- ObservationSteering,
+ Instructions,
parse_obj_as(
- type_=ObservationSteering, # type: ignore
+ type_=Instructions, # type: ignore
object_=_response.json(),
),
)
@@ -2000,16 +1899,15 @@ def get_observation_steering(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def set_observation_steering(
+ def set_instructions(
self,
graph_uuid: str,
*,
inherited: typing.Optional[bool] = OMIT,
- instruction: typing.Optional[str] = OMIT,
- types: typing.Optional[typing.Sequence[ObservationType]] = OMIT,
+ instructions: typing.Optional[typing.Sequence[CustomInstruction]] = OMIT,
idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[ObservationSteering]:
+ ) -> HttpResponse[Instructions]:
"""
Parameters
----------
@@ -2020,13 +1918,9 @@ def set_observation_steering(
Whether this is the project's default value rather than an override set on
this graph.
- instruction : typing.Optional[str]
- The natural-language instruction steering how observations are generated
- at this scope.
-
- types : typing.Optional[typing.Sequence[ObservationType]]
- The named observation types, each with a description, that generation
- should steer toward at this scope.
+ instructions : typing.Optional[typing.Sequence[CustomInstruction]]
+ The custom extraction instructions in effect at this scope, each with a
+ name and text.
idempotency_key : typing.Optional[str]
@@ -2035,17 +1929,16 @@ def set_observation_steering(
Returns
-------
- HttpResponse[ObservationSteering]
+ HttpResponse[Instructions]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/observation-steering",
+ f"graphs/{encode_path_param(graph_uuid)}/instructions",
method="PUT",
json={
"inherited": inherited,
- "instruction": instruction,
- "types": convert_and_respect_annotation_metadata(
- object_=types, annotation=typing.Sequence[ObservationType], direction="write"
+ "instructions": convert_and_respect_annotation_metadata(
+ object_=instructions, annotation=typing.Sequence[CustomInstruction], direction="write"
),
},
headers={
@@ -2058,9 +1951,9 @@ def set_observation_steering(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- ObservationSteering,
+ Instructions,
parse_obj_as(
- type_=ObservationSteering, # type: ignore
+ type_=Instructions, # type: ignore
object_=_response.json(),
),
)
@@ -2111,34 +2004,37 @@ def set_observation_steering(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def get_ontology(
+ def get_knowledge(
self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[Ontology]:
+ ) -> HttpResponse[KnowledgeResponse]:
"""
+ Returns the domain knowledge in effect at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+
Parameters
----------
graph_uuid : str
- The UUID of the graph. For a user graph, you can also use the UUID of the user.
+ The UUID of the graph or its user.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[Ontology]
+ HttpResponse[KnowledgeResponse]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/ontology",
+ f"graphs/{encode_path_param(graph_uuid)}/knowledge",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Ontology,
+ KnowledgeResponse,
parse_obj_as(
- type_=Ontology, # type: ignore
+ type_=KnowledgeResponse, # type: ignore
object_=_response.json(),
),
)
@@ -2189,39 +2085,26 @@ def get_ontology(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def set_ontology(
+ def set_knowledge(
self,
graph_uuid: str,
*,
- edge_type_hierarchy: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- edge_types: typing.Optional[typing.Sequence[EdgeType]] = OMIT,
- entity_type_hierarchy: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- entity_types: typing.Optional[typing.Sequence[EntityType]] = OMIT,
- inherited: typing.Optional[bool] = OMIT,
+ knowledge: typing.Optional[typing.Sequence[KnowledgeEntry]] = OMIT,
idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[Ontology]:
+ ) -> HttpResponse[KnowledgeResponse]:
"""
+ Replaces the complete set of domain knowledge entries at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+ Request example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}]}
+
Parameters
----------
graph_uuid : str
- The UUID of the graph. For a user graph, you can also use the UUID of the user.
-
- edge_type_hierarchy : typing.Optional[typing.Dict[str, typing.Any]]
- The edge type hierarchy. Omitted when the ontology has no edge subtypes.
-
- edge_types : typing.Optional[typing.Sequence[EdgeType]]
- The edge types defined in the ontology in effect at this scope.
+ The UUID of the graph or its user.
- entity_type_hierarchy : typing.Optional[typing.Dict[str, typing.Any]]
- The entity type hierarchy. Omitted when the ontology has no entity subtypes.
-
- entity_types : typing.Optional[typing.Sequence[EntityType]]
- The entity types defined in the ontology in effect at this scope.
-
- inherited : typing.Optional[bool]
- Whether this is the project's default value rather than an override set on
- this graph.
+ knowledge : typing.Optional[typing.Sequence[KnowledgeEntry]]
+ The complete set of domain knowledge entries. An empty list clears the scope.
idempotency_key : typing.Optional[str]
@@ -2230,22 +2113,16 @@ def set_ontology(
Returns
-------
- HttpResponse[Ontology]
+ HttpResponse[KnowledgeResponse]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/ontology",
+ f"graphs/{encode_path_param(graph_uuid)}/knowledge",
method="PUT",
json={
- "edge_type_hierarchy": edge_type_hierarchy,
- "edge_types": convert_and_respect_annotation_metadata(
- object_=edge_types, annotation=typing.Sequence[EdgeType], direction="write"
- ),
- "entity_type_hierarchy": entity_type_hierarchy,
- "entity_types": convert_and_respect_annotation_metadata(
- object_=entity_types, annotation=typing.Sequence[EntityType], direction="write"
+ "knowledge": convert_and_respect_annotation_metadata(
+ object_=knowledge, annotation=typing.Sequence[KnowledgeEntry], direction="write"
),
- "inherited": inherited,
},
headers={
"content-type": "application/json",
@@ -2257,9 +2134,9 @@ def set_ontology(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Ontology,
+ KnowledgeResponse,
parse_obj_as(
- type_=Ontology, # type: ignore
+ type_=KnowledgeResponse, # type: ignore
object_=_response.json(),
),
)
@@ -2310,122 +2187,61 @@ def set_ontology(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def search_edges(
+ def list_metadata_keys(
self,
graph_uuid: str,
*,
- query: str,
page_size: typing.Optional[int] = None,
cursor: typing.Optional[str] = None,
- bfs_origin_node_uuids: typing.Optional[typing.Sequence[str]] = OMIT,
- center_node_uuid: typing.Optional[str] = OMIT,
- filter_low_quality_results: typing.Optional[bool] = OMIT,
- filters: typing.Optional[EdgeSearchFilters] = OMIT,
- mmr_lambda: typing.Optional[float] = OMIT,
- reranker: typing.Optional[SearchEdgesRequestReranker] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> SyncPager[Edge, EdgePage]:
+ ) -> SyncPager[GraphMetadataKey, GraphMetadataKeyList]:
"""
- Edge search does not support node_labels, exclude_node_labels, or content_policy_violated. content_policy_violated is supported on episode search only. An edge has two nodes, so a node label filter is not defined for edge search. To filter edges by node label, use graph.edge.list, graph.node.list_neighbors, or graph.get_subgraph. To search the edges of nodes that have a label, do these two steps. First, call graph.search_nodes with node_labels. Then, call graph.search_edges with connected_node_uuids set to the UUIDs of the returned nodes.
+ Returns the append-only metadata keys recorded for a graph. A key can remain in the list after no episode or message uses it.
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
- query : str
- The search query.
-
page_size : typing.Optional[int]
- The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
+ The maximum number of keys per page.
cursor : typing.Optional[str]
Opaque page cursor
- bfs_origin_node_uuids : typing.Optional[typing.Sequence[str]]
- Nodes used as BFS origins for graph-distance-aware retrieval.
-
- center_node_uuid : typing.Optional[str]
- The node to rank results by distance from. Required when reranker is
- node_distance.
-
- filter_low_quality_results : typing.Optional[bool]
- The default is false. When true, Zep removes low-quality results at the knee of the
- cross-encoder score curve. The filter never removes a result with a score
- of 0.9 or more. It keeps at least 5 results, or all results when fewer
- than 5 are available. The filter only removes results, so a page still
- returns up to page_size results. Use this field only with reranker
- cross_encoder. It is not supported for episode search. Invalid
- combinations return a 400 error. The cutoff is approximate, not guaranteed.
- When the cross-encoder does not score the results, for example after a
- timeout, Zep returns the results without the filter.
-
- filters : typing.Optional[EdgeSearchFilters]
- Filters constraining which items are returned.
-
- mmr_lambda : typing.Optional[float]
- The diversity weighting used for maximal marginal relevance reranking.
- Required when reranker is mmr.
-
- reranker : typing.Optional[SearchEdgesRequestReranker]
- The reranking strategy applied to retrieved results. Defaults to rrf.
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
Returns
-------
- SyncPager[Edge, EdgePage]
+ SyncPager[GraphMetadataKey, GraphMetadataKeyList]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/search/edges",
- method="POST",
+ f"graphs/{encode_path_param(graph_uuid)}/metadata-keys",
+ method="GET",
params={
"page_size": page_size,
"cursor": cursor,
},
- json={
- "query": query,
- "bfs_origin_node_uuids": bfs_origin_node_uuids,
- "center_node_uuid": center_node_uuid,
- "filter_low_quality_results": filter_low_quality_results,
- "filters": convert_and_respect_annotation_metadata(
- object_=filters, annotation=EdgeSearchFilters, direction="write"
- ),
- "mmr_lambda": mmr_lambda,
- "reranker": reranker,
- },
- headers={
- "content-type": "application/json",
- "Idempotency-Key": generate_idempotency_key(),
- },
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_parsed_response = typing.cast(
- EdgePage,
+ GraphMetadataKeyList,
parse_obj_as(
- type_=EdgePage, # type: ignore
+ type_=GraphMetadataKeyList, # type: ignore
object_=_response.json(),
),
)
_items = _parsed_response.items
_parsed_next = _parsed_response.next_cursor
_has_next = _parsed_next is not None and _parsed_next != ""
- _get_next = lambda: self.search_edges(
+ _get_next = lambda: self.list_metadata_keys(
graph_uuid,
- query=query,
page_size=page_size,
cursor=_parsed_next,
- bfs_origin_node_uuids=bfs_origin_node_uuids,
- center_node_uuid=center_node_uuid,
- filter_low_quality_results=filter_low_quality_results,
- filters=filters,
- mmr_lambda=mmr_lambda,
- reranker=reranker,
request_options=request_options,
)
return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
@@ -2486,125 +2302,38 @@ def search_edges(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def search_episodes(
- self,
- graph_uuid: str,
- *,
- query: str,
- page_size: typing.Optional[int] = None,
- cursor: typing.Optional[str] = None,
- bfs_origin_node_uuids: typing.Optional[typing.Sequence[str]] = OMIT,
- center_node_uuid: typing.Optional[str] = OMIT,
- filter_low_quality_results: typing.Optional[bool] = OMIT,
- filters: typing.Optional[EpisodeSearchFilters] = OMIT,
- mmr_lambda: typing.Optional[float] = OMIT,
- reranker: typing.Optional[SearchEpisodesRequestReranker] = OMIT,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> SyncPager[Episode, EpisodePage]:
+ def get_observation_steering(
+ self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[ObservationSteering]:
"""
- Episode search supports only the metadata_filters and content_policy_violated filters. Every other filter returns unsupported_filter.
-
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
- query : str
- The search query.
-
- page_size : typing.Optional[int]
- The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
-
- cursor : typing.Optional[str]
- Opaque page cursor
-
- bfs_origin_node_uuids : typing.Optional[typing.Sequence[str]]
- Nodes used as BFS origins for graph-distance-aware retrieval.
-
- center_node_uuid : typing.Optional[str]
- The node to rank results by distance from. Required when reranker is
- node_distance.
-
- filter_low_quality_results : typing.Optional[bool]
- The default is false. When true, Zep removes low-quality results at the knee of the
- cross-encoder score curve. The filter never removes a result with a score
- of 0.9 or more. It keeps at least 5 results, or all results when fewer
- than 5 are available. The filter only removes results, so a page still
- returns up to page_size results. Use this field only with reranker
- cross_encoder. It is not supported for episode search. Invalid
- combinations return a 400 error. The cutoff is approximate, not guaranteed.
- When the cross-encoder does not score the results, for example after a
- timeout, Zep returns the results without the filter.
-
- filters : typing.Optional[EpisodeSearchFilters]
- Filters constraining which items are returned.
-
- mmr_lambda : typing.Optional[float]
- The diversity weighting used for maximal marginal relevance reranking.
- Required when reranker is mmr.
-
- reranker : typing.Optional[SearchEpisodesRequestReranker]
- The reranking strategy applied to retrieved results. Defaults to rrf.
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- SyncPager[Episode, EpisodePage]
+ HttpResponse[ObservationSteering]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/search/episodes",
- method="POST",
- params={
- "page_size": page_size,
- "cursor": cursor,
- },
- json={
- "query": query,
- "bfs_origin_node_uuids": bfs_origin_node_uuids,
- "center_node_uuid": center_node_uuid,
- "filter_low_quality_results": filter_low_quality_results,
- "filters": convert_and_respect_annotation_metadata(
- object_=filters, annotation=EpisodeSearchFilters, direction="write"
- ),
- "mmr_lambda": mmr_lambda,
- "reranker": reranker,
- },
- headers={
- "content-type": "application/json",
- "Idempotency-Key": generate_idempotency_key(),
- },
+ f"graphs/{encode_path_param(graph_uuid)}/observation-steering",
+ method="GET",
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
- _parsed_response = typing.cast(
- EpisodePage,
+ _data = typing.cast(
+ ObservationSteering,
parse_obj_as(
- type_=EpisodePage, # type: ignore
+ type_=ObservationSteering, # type: ignore
object_=_response.json(),
),
)
- _items = _parsed_response.items
- _parsed_next = _parsed_response.next_cursor
- _has_next = _parsed_next is not None and _parsed_next != ""
- _get_next = lambda: self.search_episodes(
- graph_uuid,
- query=query,
- page_size=page_size,
- cursor=_parsed_next,
- bfs_origin_node_uuids=bfs_origin_node_uuids,
- center_node_uuid=center_node_uuid,
- filter_low_quality_results=filter_low_quality_results,
- filters=filters,
- mmr_lambda=mmr_lambda,
- reranker=reranker,
- request_options=request_options,
- )
- return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
+ return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -2627,17 +2356,6 @@ def search_episodes(
),
),
)
- if _response.status_code == 403:
- raise ForbiddenError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
@@ -2662,125 +2380,71 @@ def search_episodes(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def search_nodes(
+ def set_observation_steering(
self,
graph_uuid: str,
*,
- query: str,
- page_size: typing.Optional[int] = None,
- cursor: typing.Optional[str] = None,
- bfs_origin_node_uuids: typing.Optional[typing.Sequence[str]] = OMIT,
- center_node_uuid: typing.Optional[str] = OMIT,
- filter_low_quality_results: typing.Optional[bool] = OMIT,
- filters: typing.Optional[NodeSearchFilters] = OMIT,
- mmr_lambda: typing.Optional[float] = OMIT,
- reranker: typing.Optional[SearchNodesRequestReranker] = OMIT,
+ inherited: typing.Optional[bool] = OMIT,
+ instruction: typing.Optional[str] = OMIT,
+ types: typing.Optional[typing.Sequence[ObservationType]] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> SyncPager[Node, NodePage]:
+ ) -> HttpResponse[ObservationSteering]:
"""
- Node search does not support edge_types, exclude_edge_types, edge_uuids, connected_node_uuids, source_node_uuids, target_node_uuids, date_filters, or content_policy_violated. content_policy_violated is supported on episode search only. The edge filters select edges. To get the nodes that an edge connects, use graph.search_edges or graph.node.list_neighbors. To filter nodes by created_at, use graph.node.list.
-
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
- query : str
- The search query.
-
- page_size : typing.Optional[int]
- The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
-
- cursor : typing.Optional[str]
- Opaque page cursor
-
- bfs_origin_node_uuids : typing.Optional[typing.Sequence[str]]
- Nodes used as BFS origins for graph-distance-aware retrieval.
-
- center_node_uuid : typing.Optional[str]
- The node to rank results by distance from. Required when reranker is
- node_distance.
-
- filter_low_quality_results : typing.Optional[bool]
- The default is false. When true, Zep removes low-quality results at the knee of the
- cross-encoder score curve. The filter never removes a result with a score
- of 0.9 or more. It keeps at least 5 results, or all results when fewer
- than 5 are available. The filter only removes results, so a page still
- returns up to page_size results. Use this field only with reranker
- cross_encoder. It is not supported for episode search. Invalid
- combinations return a 400 error. The cutoff is approximate, not guaranteed.
- When the cross-encoder does not score the results, for example after a
- timeout, Zep returns the results without the filter.
+ inherited : typing.Optional[bool]
+ Whether this is the project's default value rather than an override set on
+ this graph.
- filters : typing.Optional[NodeSearchFilters]
- Filters constraining which items are returned.
+ instruction : typing.Optional[str]
+ The natural-language instruction steering how observations are generated
+ at this scope.
- mmr_lambda : typing.Optional[float]
- The diversity weighting used for maximal marginal relevance reranking.
- Required when reranker is mmr.
+ types : typing.Optional[typing.Sequence[ObservationType]]
+ The named observation types, each with a description, that generation
+ should steer toward at this scope.
- reranker : typing.Optional[SearchNodesRequestReranker]
- The reranking strategy applied to retrieved results. Defaults to rrf.
+ idempotency_key : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- SyncPager[Node, NodePage]
+ HttpResponse[ObservationSteering]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/search/nodes",
- method="POST",
- params={
- "page_size": page_size,
- "cursor": cursor,
- },
+ f"graphs/{encode_path_param(graph_uuid)}/observation-steering",
+ method="PUT",
json={
- "query": query,
- "bfs_origin_node_uuids": bfs_origin_node_uuids,
- "center_node_uuid": center_node_uuid,
- "filter_low_quality_results": filter_low_quality_results,
- "filters": convert_and_respect_annotation_metadata(
- object_=filters, annotation=NodeSearchFilters, direction="write"
- ),
- "mmr_lambda": mmr_lambda,
- "reranker": reranker,
+ "inherited": inherited,
+ "instruction": instruction,
+ "types": convert_and_respect_annotation_metadata(
+ object_=types, annotation=typing.Sequence[ObservationType], direction="write"
+ ),
},
headers={
"content-type": "application/json",
- "Idempotency-Key": generate_idempotency_key(),
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
- _parsed_response = typing.cast(
- NodePage,
+ _data = typing.cast(
+ ObservationSteering,
parse_obj_as(
- type_=NodePage, # type: ignore
+ type_=ObservationSteering, # type: ignore
object_=_response.json(),
),
)
- _items = _parsed_response.items
- _parsed_next = _parsed_response.next_cursor
- _has_next = _parsed_next is not None and _parsed_next != ""
- _get_next = lambda: self.search_nodes(
- graph_uuid,
- query=query,
- page_size=page_size,
- cursor=_parsed_next,
- bfs_origin_node_uuids=bfs_origin_node_uuids,
- center_node_uuid=center_node_uuid,
- filter_low_quality_results=filter_low_quality_results,
- filters=filters,
- mmr_lambda=mmr_lambda,
- reranker=reranker,
- request_options=request_options,
- )
- return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
+ return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -2803,8 +2467,75 @@ def search_nodes(
),
),
)
- if _response.status_code == 403:
- raise ForbiddenError(
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ def get_ontology(
+ self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[Ontology]:
+ """
+ Parameters
+ ----------
+ graph_uuid : str
+ The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[Ontology]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"graphs/{encode_path_param(graph_uuid)}/ontology",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Ontology,
+ parse_obj_as(
+ type_=Ontology, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
types_api_error_ApiError,
@@ -2838,123 +2569,81 @@ def search_nodes(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def search_observations(
+ def set_ontology(
self,
graph_uuid: str,
*,
- query: str,
- page_size: typing.Optional[int] = None,
- cursor: typing.Optional[str] = None,
- bfs_origin_node_uuids: typing.Optional[typing.Sequence[str]] = OMIT,
- center_node_uuid: typing.Optional[str] = OMIT,
- filter_low_quality_results: typing.Optional[bool] = OMIT,
- filters: typing.Optional[ObservationSearchFilters] = OMIT,
- mmr_lambda: typing.Optional[float] = OMIT,
- reranker: typing.Optional[SearchObservationsRequestReranker] = OMIT,
+ edge_type_hierarchy: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
+ edge_types: typing.Optional[typing.Sequence[EdgeType]] = OMIT,
+ entity_type_hierarchy: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
+ entity_types: typing.Optional[typing.Sequence[EntityType]] = OMIT,
+ inherited: typing.Optional[bool] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> SyncPager[Observation, ObservationPage]:
+ ) -> HttpResponse[Ontology]:
"""
- Observation search supports no filters. Every filter returns unsupported_filter.
-
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
- query : str
- The search query.
-
- page_size : typing.Optional[int]
- The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
-
- cursor : typing.Optional[str]
- Opaque page cursor
-
- bfs_origin_node_uuids : typing.Optional[typing.Sequence[str]]
- Nodes used as BFS origins for graph-distance-aware retrieval.
+ edge_type_hierarchy : typing.Optional[typing.Dict[str, typing.Any]]
+ The edge type hierarchy. Omitted when the ontology has no edge subtypes.
- center_node_uuid : typing.Optional[str]
- The node to rank results by distance from. Required when reranker is
- node_distance.
+ edge_types : typing.Optional[typing.Sequence[EdgeType]]
+ The edge types defined in the ontology in effect at this scope.
- filter_low_quality_results : typing.Optional[bool]
- The default is false. When true, Zep removes low-quality results at the knee of the
- cross-encoder score curve. The filter never removes a result with a score
- of 0.9 or more. It keeps at least 5 results, or all results when fewer
- than 5 are available. The filter only removes results, so a page still
- returns up to page_size results. Use this field only with reranker
- cross_encoder. It is not supported for episode search. Invalid
- combinations return a 400 error. The cutoff is approximate, not guaranteed.
- When the cross-encoder does not score the results, for example after a
- timeout, Zep returns the results without the filter.
+ entity_type_hierarchy : typing.Optional[typing.Dict[str, typing.Any]]
+ The entity type hierarchy. Omitted when the ontology has no entity subtypes.
- filters : typing.Optional[ObservationSearchFilters]
- Filters constraining which items are returned.
+ entity_types : typing.Optional[typing.Sequence[EntityType]]
+ The entity types defined in the ontology in effect at this scope.
- mmr_lambda : typing.Optional[float]
- The diversity weighting used for maximal marginal relevance reranking.
- Required when reranker is mmr.
+ inherited : typing.Optional[bool]
+ Whether this is the project's default value rather than an override set on
+ this graph.
- reranker : typing.Optional[SearchObservationsRequestReranker]
- The reranking strategy applied to retrieved results. Defaults to rrf.
+ idempotency_key : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- SyncPager[Observation, ObservationPage]
+ HttpResponse[Ontology]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/search/observations",
- method="POST",
- params={
- "page_size": page_size,
- "cursor": cursor,
- },
+ f"graphs/{encode_path_param(graph_uuid)}/ontology",
+ method="PUT",
json={
- "query": query,
- "bfs_origin_node_uuids": bfs_origin_node_uuids,
- "center_node_uuid": center_node_uuid,
- "filter_low_quality_results": filter_low_quality_results,
- "filters": filters,
- "mmr_lambda": mmr_lambda,
- "reranker": reranker,
+ "edge_type_hierarchy": edge_type_hierarchy,
+ "edge_types": convert_and_respect_annotation_metadata(
+ object_=edge_types, annotation=typing.Sequence[EdgeType], direction="write"
+ ),
+ "entity_type_hierarchy": entity_type_hierarchy,
+ "entity_types": convert_and_respect_annotation_metadata(
+ object_=entity_types, annotation=typing.Sequence[EntityType], direction="write"
+ ),
+ "inherited": inherited,
},
headers={
"content-type": "application/json",
- "Idempotency-Key": generate_idempotency_key(),
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
- _parsed_response = typing.cast(
- ObservationPage,
+ _data = typing.cast(
+ Ontology,
parse_obj_as(
- type_=ObservationPage, # type: ignore
+ type_=Ontology, # type: ignore
object_=_response.json(),
),
)
- _items = _parsed_response.items
- _parsed_next = _parsed_response.next_cursor
- _has_next = _parsed_next is not None and _parsed_next != ""
- _get_next = lambda: self.search_observations(
- graph_uuid,
- query=query,
- page_size=page_size,
- cursor=_parsed_next,
- bfs_origin_node_uuids=bfs_origin_node_uuids,
- center_node_uuid=center_node_uuid,
- filter_low_quality_results=filter_low_quality_results,
- filters=filters,
- mmr_lambda=mmr_lambda,
- reranker=reranker,
- request_options=request_options,
- )
- return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
+ return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -2977,8 +2666,8 @@ def search_observations(
),
),
)
- if _response.status_code == 403:
- raise ForbiddenError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
types_api_error_ApiError,
@@ -2988,8 +2677,8 @@ def search_observations(
),
),
)
- if _response.status_code == 404:
- raise NotFoundError(
+ if _response.status_code == 409:
+ raise ConflictError(
headers=dict(_response.headers),
body=typing.cast(
types_api_error_ApiError,
@@ -3012,7 +2701,7 @@ def search_observations(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def search_thread_summaries(
+ def search_edges(
self,
graph_uuid: str,
*,
@@ -3022,13 +2711,13 @@ def search_thread_summaries(
bfs_origin_node_uuids: typing.Optional[typing.Sequence[str]] = OMIT,
center_node_uuid: typing.Optional[str] = OMIT,
filter_low_quality_results: typing.Optional[bool] = OMIT,
- filters: typing.Optional[ThreadSummarySearchFilters] = OMIT,
+ filters: typing.Optional[EdgeSearchFilters] = OMIT,
mmr_lambda: typing.Optional[float] = OMIT,
- reranker: typing.Optional[SearchThreadSummariesRequestReranker] = OMIT,
+ reranker: typing.Optional[SearchEdgesRequestReranker] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> SyncPager[ThreadSummary, ThreadSummaryPage]:
+ ) -> SyncPager[Edge, EdgePage]:
"""
- Thread-summary search supports only the metadata_filters filter, which matches the metadata of the thread episodes. Every other filter returns unsupported_filter.
+ Edge search does not support node_labels, exclude_node_labels, or content_policy_violated. content_policy_violated is supported on episode search only. An edge has two nodes, so a node label filter is not defined for edge search. To filter edges by node label, use graph.edge.list, graph.node.list_neighbors, or graph.get_subgraph. To search the edges of nodes that have a label, do these two steps. First, call graph.search_nodes with node_labels. Then, call graph.search_edges with connected_node_uuids set to the UUIDs of the returned nodes.
Parameters
----------
@@ -3062,14 +2751,14 @@ def search_thread_summaries(
When the cross-encoder does not score the results, for example after a
timeout, Zep returns the results without the filter.
- filters : typing.Optional[ThreadSummarySearchFilters]
+ filters : typing.Optional[EdgeSearchFilters]
Filters constraining which items are returned.
mmr_lambda : typing.Optional[float]
The diversity weighting used for maximal marginal relevance reranking.
Required when reranker is mmr.
- reranker : typing.Optional[SearchThreadSummariesRequestReranker]
+ reranker : typing.Optional[SearchEdgesRequestReranker]
The reranking strategy applied to retrieved results. Defaults to rrf.
request_options : typing.Optional[RequestOptions]
@@ -3077,11 +2766,11 @@ def search_thread_summaries(
Returns
-------
- SyncPager[ThreadSummary, ThreadSummaryPage]
+ SyncPager[Edge, EdgePage]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/search/thread-summaries",
+ f"graphs/{encode_path_param(graph_uuid)}/search/edges",
method="POST",
params={
"page_size": page_size,
@@ -3093,7 +2782,7 @@ def search_thread_summaries(
"center_node_uuid": center_node_uuid,
"filter_low_quality_results": filter_low_quality_results,
"filters": convert_and_respect_annotation_metadata(
- object_=filters, annotation=ThreadSummarySearchFilters, direction="write"
+ object_=filters, annotation=EdgeSearchFilters, direction="write"
),
"mmr_lambda": mmr_lambda,
"reranker": reranker,
@@ -3108,16 +2797,16 @@ def search_thread_summaries(
try:
if 200 <= _response.status_code < 300:
_parsed_response = typing.cast(
- ThreadSummaryPage,
+ EdgePage,
parse_obj_as(
- type_=ThreadSummaryPage, # type: ignore
+ type_=EdgePage, # type: ignore
object_=_response.json(),
),
)
_items = _parsed_response.items
_parsed_next = _parsed_response.next_cursor
_has_next = _parsed_next is not None and _parsed_next != ""
- _get_next = lambda: self.search_thread_summaries(
+ _get_next = lambda: self.search_edges(
graph_uuid,
query=query,
page_size=page_size,
@@ -3188,63 +2877,91 @@ def search_thread_summaries(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def get_subgraph(
+ def search_episodes(
self,
graph_uuid: str,
*,
- seed_node_uuids: typing.Sequence[str],
- depth: typing.Optional[int] = OMIT,
- direction: typing.Optional[SubgraphRequestDirection] = OMIT,
- filters: typing.Optional[SearchFilters] = OMIT,
- max_edges: typing.Optional[int] = OMIT,
- max_nodes: typing.Optional[int] = OMIT,
+ query: str,
+ page_size: typing.Optional[int] = None,
+ cursor: typing.Optional[str] = None,
+ bfs_origin_node_uuids: typing.Optional[typing.Sequence[str]] = OMIT,
+ center_node_uuid: typing.Optional[str] = OMIT,
+ filter_low_quality_results: typing.Optional[bool] = OMIT,
+ filters: typing.Optional[EpisodeSearchFilters] = OMIT,
+ mmr_lambda: typing.Optional[float] = OMIT,
+ reranker: typing.Optional[SearchEpisodesRequestReranker] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[SubgraphResponse]:
+ ) -> SyncPager[Episode, EpisodePage]:
"""
+ Episode search supports only the metadata_filters and content_policy_violated filters. Every other filter returns unsupported_filter.
+
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
- seed_node_uuids : typing.Sequence[str]
- The node UUIDs to expand from, in traversal-priority order.
+ query : str
+ The search query.
- depth : typing.Optional[int]
- The maximum traversal depth from the seed nodes. Defaults to 1.
+ page_size : typing.Optional[int]
+ The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
- direction : typing.Optional[SubgraphRequestDirection]
- The edge orientation to follow during expansion: in, out, or both.
- Defaults to both.
+ cursor : typing.Optional[str]
+ Opaque page cursor
- filters : typing.Optional[SearchFilters]
- Filters constraining the traversed edges and included nodes.
+ bfs_origin_node_uuids : typing.Optional[typing.Sequence[str]]
+ Nodes used as BFS origins for graph-distance-aware retrieval.
- max_edges : typing.Optional[int]
- The maximum number of edges in the response. Defaults to 200.
+ center_node_uuid : typing.Optional[str]
+ The node to rank results by distance from. Required when reranker is
+ node_distance.
- max_nodes : typing.Optional[int]
- The maximum number of nodes in the response. Defaults to 100.
+ filter_low_quality_results : typing.Optional[bool]
+ The default is false. When true, Zep removes low-quality results at the knee of the
+ cross-encoder score curve. The filter never removes a result with a score
+ of 0.9 or more. It keeps at least 5 results, or all results when fewer
+ than 5 are available. The filter only removes results, so a page still
+ returns up to page_size results. Use this field only with reranker
+ cross_encoder. It is not supported for episode search. Invalid
+ combinations return a 400 error. The cutoff is approximate, not guaranteed.
+ When the cross-encoder does not score the results, for example after a
+ timeout, Zep returns the results without the filter.
+
+ filters : typing.Optional[EpisodeSearchFilters]
+ Filters constraining which items are returned.
+
+ mmr_lambda : typing.Optional[float]
+ The diversity weighting used for maximal marginal relevance reranking.
+ Required when reranker is mmr.
+
+ reranker : typing.Optional[SearchEpisodesRequestReranker]
+ The reranking strategy applied to retrieved results. Defaults to rrf.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[SubgraphResponse]
+ SyncPager[Episode, EpisodePage]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/subgraph",
+ f"graphs/{encode_path_param(graph_uuid)}/search/episodes",
method="POST",
+ params={
+ "page_size": page_size,
+ "cursor": cursor,
+ },
json={
- "depth": depth,
- "direction": direction,
+ "query": query,
+ "bfs_origin_node_uuids": bfs_origin_node_uuids,
+ "center_node_uuid": center_node_uuid,
+ "filter_low_quality_results": filter_low_quality_results,
"filters": convert_and_respect_annotation_metadata(
- object_=filters, annotation=SearchFilters, direction="write"
+ object_=filters, annotation=EpisodeSearchFilters, direction="write"
),
- "max_edges": max_edges,
- "max_nodes": max_nodes,
- "seed_node_uuids": seed_node_uuids,
+ "mmr_lambda": mmr_lambda,
+ "reranker": reranker,
},
headers={
"content-type": "application/json",
@@ -3255,14 +2972,30 @@ def get_subgraph(
)
try:
if 200 <= _response.status_code < 300:
- _data = typing.cast(
- SubgraphResponse,
+ _parsed_response = typing.cast(
+ EpisodePage,
parse_obj_as(
- type_=SubgraphResponse, # type: ignore
+ type_=EpisodePage, # type: ignore
object_=_response.json(),
),
)
- return HttpResponse(response=_response, data=_data)
+ _items = _parsed_response.items
+ _parsed_next = _parsed_response.next_cursor
+ _has_next = _parsed_next is not None and _parsed_next != ""
+ _get_next = lambda: self.search_episodes(
+ graph_uuid,
+ query=query,
+ page_size=page_size,
+ cursor=_parsed_next,
+ bfs_origin_node_uuids=bfs_origin_node_uuids,
+ center_node_uuid=center_node_uuid,
+ filter_low_quality_results=filter_low_quality_results,
+ filters=filters,
+ mmr_lambda=mmr_lambda,
+ reranker=reranker,
+ request_options=request_options,
+ )
+ return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -3320,47 +3053,125 @@ def get_subgraph(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def warm(
+ def search_nodes(
self,
graph_uuid: str,
*,
- idempotency_key: typing.Optional[str] = None,
+ query: str,
+ page_size: typing.Optional[int] = None,
+ cursor: typing.Optional[str] = None,
+ bfs_origin_node_uuids: typing.Optional[typing.Sequence[str]] = OMIT,
+ center_node_uuid: typing.Optional[str] = OMIT,
+ filter_low_quality_results: typing.Optional[bool] = OMIT,
+ filters: typing.Optional[NodeSearchFilters] = OMIT,
+ mmr_lambda: typing.Optional[float] = OMIT,
+ reranker: typing.Optional[SearchNodesRequestReranker] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[AsyncResult]:
+ ) -> SyncPager[Node, NodePage]:
"""
+ Node search does not support edge_types, exclude_edge_types, edge_uuids, connected_node_uuids, source_node_uuids, target_node_uuids, date_filters, or content_policy_violated. content_policy_violated is supported on episode search only. The edge filters select edges. To get the nodes that an edge connects, use graph.search_edges or graph.node.list_neighbors. To filter nodes by created_at, use graph.node.list.
+
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
- idempotency_key : typing.Optional[str]
+ query : str
+ The search query.
+
+ page_size : typing.Optional[int]
+ The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
+
+ cursor : typing.Optional[str]
+ Opaque page cursor
+
+ bfs_origin_node_uuids : typing.Optional[typing.Sequence[str]]
+ Nodes used as BFS origins for graph-distance-aware retrieval.
+
+ center_node_uuid : typing.Optional[str]
+ The node to rank results by distance from. Required when reranker is
+ node_distance.
+
+ filter_low_quality_results : typing.Optional[bool]
+ The default is false. When true, Zep removes low-quality results at the knee of the
+ cross-encoder score curve. The filter never removes a result with a score
+ of 0.9 or more. It keeps at least 5 results, or all results when fewer
+ than 5 are available. The filter only removes results, so a page still
+ returns up to page_size results. Use this field only with reranker
+ cross_encoder. It is not supported for episode search. Invalid
+ combinations return a 400 error. The cutoff is approximate, not guaranteed.
+ When the cross-encoder does not score the results, for example after a
+ timeout, Zep returns the results without the filter.
+
+ filters : typing.Optional[NodeSearchFilters]
+ Filters constraining which items are returned.
+
+ mmr_lambda : typing.Optional[float]
+ The diversity weighting used for maximal marginal relevance reranking.
+ Required when reranker is mmr.
+
+ reranker : typing.Optional[SearchNodesRequestReranker]
+ The reranking strategy applied to retrieved results. Defaults to rrf.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- HttpResponse[AsyncResult]
- Accepted
+ SyncPager[Node, NodePage]
+ OK
"""
_response = self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/warm",
+ f"graphs/{encode_path_param(graph_uuid)}/search/nodes",
method="POST",
+ params={
+ "page_size": page_size,
+ "cursor": cursor,
+ },
+ json={
+ "query": query,
+ "bfs_origin_node_uuids": bfs_origin_node_uuids,
+ "center_node_uuid": center_node_uuid,
+ "filter_low_quality_results": filter_low_quality_results,
+ "filters": convert_and_respect_annotation_metadata(
+ object_=filters, annotation=NodeSearchFilters, direction="write"
+ ),
+ "mmr_lambda": mmr_lambda,
+ "reranker": reranker,
+ },
headers={
- "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ "content-type": "application/json",
+ "Idempotency-Key": generate_idempotency_key(),
},
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
- _data = typing.cast(
- AsyncResult,
+ _parsed_response = typing.cast(
+ NodePage,
parse_obj_as(
- type_=AsyncResult, # type: ignore
+ type_=NodePage, # type: ignore
object_=_response.json(),
),
)
- return HttpResponse(response=_response, data=_data)
+ _items = _parsed_response.items
+ _parsed_next = _parsed_response.next_cursor
+ _has_next = _parsed_next is not None and _parsed_next != ""
+ _get_next = lambda: self.search_nodes(
+ graph_uuid,
+ query=query,
+ page_size=page_size,
+ cursor=_parsed_next,
+ bfs_origin_node_uuids=bfs_origin_node_uuids,
+ center_node_uuid=center_node_uuid,
+ filter_low_quality_results=filter_low_quality_results,
+ filters=filters,
+ mmr_lambda=mmr_lambda,
+ reranker=reranker,
+ request_options=request_options,
+ )
+ return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -3405,17 +3216,6 @@ def warm(
),
),
)
- if _response.status_code == 409:
- raise ConflictError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
_response_json = _response.json()
except JSONDecodeError:
raise core_api_error_ApiError(
@@ -3429,76 +3229,123 @@ def warm(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
-
-class AsyncRawGraphClient:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def create(
+ def search_observations(
self,
+ graph_uuid: str,
*,
- content_policy: typing.Optional[GraphContentPolicyRequest] = OMIT,
- description: typing.Optional[str] = OMIT,
- name: typing.Optional[str] = OMIT,
- time_zone: typing.Optional[str] = OMIT,
- idempotency_key: typing.Optional[str] = None,
+ query: str,
+ page_size: typing.Optional[int] = None,
+ cursor: typing.Optional[str] = None,
+ bfs_origin_node_uuids: typing.Optional[typing.Sequence[str]] = OMIT,
+ center_node_uuid: typing.Optional[str] = OMIT,
+ filter_low_quality_results: typing.Optional[bool] = OMIT,
+ filters: typing.Optional[ObservationSearchFilters] = OMIT,
+ mmr_lambda: typing.Optional[float] = OMIT,
+ reranker: typing.Optional[SearchObservationsRequestReranker] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[Graph]:
+ ) -> SyncPager[Observation, ObservationPage]:
"""
+ Observation search supports no filters. Every filter returns unsupported_filter.
+
Parameters
----------
- content_policy : typing.Optional[GraphContentPolicyRequest]
- Content policy additions for the graph. The graph binds the current
- project content policy plus these additions, and the binding does not
- change after creation.
+ graph_uuid : str
+ The UUID of the graph. For a user graph, you can also use the UUID of the user.
- description : typing.Optional[str]
- A description of the graph.
+ query : str
+ The search query.
- name : typing.Optional[str]
- A display name for the graph.
+ page_size : typing.Optional[int]
+ The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
- time_zone : typing.Optional[str]
- The graph's IANA time zone.
+ cursor : typing.Optional[str]
+ Opaque page cursor
- idempotency_key : typing.Optional[str]
+ bfs_origin_node_uuids : typing.Optional[typing.Sequence[str]]
+ Nodes used as BFS origins for graph-distance-aware retrieval.
+
+ center_node_uuid : typing.Optional[str]
+ The node to rank results by distance from. Required when reranker is
+ node_distance.
+
+ filter_low_quality_results : typing.Optional[bool]
+ The default is false. When true, Zep removes low-quality results at the knee of the
+ cross-encoder score curve. The filter never removes a result with a score
+ of 0.9 or more. It keeps at least 5 results, or all results when fewer
+ than 5 are available. The filter only removes results, so a page still
+ returns up to page_size results. Use this field only with reranker
+ cross_encoder. It is not supported for episode search. Invalid
+ combinations return a 400 error. The cutoff is approximate, not guaranteed.
+ When the cross-encoder does not score the results, for example after a
+ timeout, Zep returns the results without the filter.
+
+ filters : typing.Optional[ObservationSearchFilters]
+ Filters constraining which items are returned.
+
+ mmr_lambda : typing.Optional[float]
+ The diversity weighting used for maximal marginal relevance reranking.
+ Required when reranker is mmr.
+
+ reranker : typing.Optional[SearchObservationsRequestReranker]
+ The reranking strategy applied to retrieved results. Defaults to rrf.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[Graph]
- Created
+ SyncPager[Observation, ObservationPage]
+ OK
"""
- _response = await self._client_wrapper.httpx_client.request(
- "graphs",
+ _response = self._client_wrapper.httpx_client.request(
+ f"graphs/{encode_path_param(graph_uuid)}/search/observations",
method="POST",
+ params={
+ "page_size": page_size,
+ "cursor": cursor,
+ },
json={
- "content_policy": convert_and_respect_annotation_metadata(
- object_=content_policy, annotation=GraphContentPolicyRequest, direction="write"
- ),
- "description": description,
- "name": name,
- "time_zone": time_zone,
+ "query": query,
+ "bfs_origin_node_uuids": bfs_origin_node_uuids,
+ "center_node_uuid": center_node_uuid,
+ "filter_low_quality_results": filter_low_quality_results,
+ "filters": filters,
+ "mmr_lambda": mmr_lambda,
+ "reranker": reranker,
},
headers={
"content-type": "application/json",
- "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ "Idempotency-Key": generate_idempotency_key(),
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
- _data = typing.cast(
- Graph,
+ _parsed_response = typing.cast(
+ ObservationPage,
parse_obj_as(
- type_=Graph, # type: ignore
+ type_=ObservationPage, # type: ignore
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
+ _items = _parsed_response.items
+ _parsed_next = _parsed_response.next_cursor
+ _has_next = _parsed_next is not None and _parsed_next != ""
+ _get_next = lambda: self.search_observations(
+ graph_uuid,
+ query=query,
+ page_size=page_size,
+ cursor=_parsed_next,
+ bfs_origin_node_uuids=bfs_origin_node_uuids,
+ center_node_uuid=center_node_uuid,
+ filter_low_quality_results=filter_low_quality_results,
+ filters=filters,
+ mmr_lambda=mmr_lambda,
+ reranker=reranker,
+ request_options=request_options,
+ )
+ return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -3543,17 +3390,6 @@ async def create(
),
),
)
- if _response.status_code == 409:
- raise ConflictError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
_response_json = _response.json()
except JSONDecodeError:
raise core_api_error_ApiError(
@@ -3567,54 +3403,91 @@ async def create(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def list(
+ def search_thread_summaries(
self,
+ graph_uuid: str,
*,
+ query: str,
page_size: typing.Optional[int] = None,
cursor: typing.Optional[str] = None,
- order_by: typing.Optional[GraphListRequestOrderBy] = None,
- order: typing.Optional[GraphListRequestOrder] = None,
- search: typing.Optional[str] = OMIT,
+ bfs_origin_node_uuids: typing.Optional[typing.Sequence[str]] = OMIT,
+ center_node_uuid: typing.Optional[str] = OMIT,
+ filter_low_quality_results: typing.Optional[bool] = OMIT,
+ filters: typing.Optional[ThreadSummarySearchFilters] = OMIT,
+ mmr_lambda: typing.Optional[float] = OMIT,
+ reranker: typing.Optional[SearchThreadSummariesRequestReranker] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncPager[Graph, GraphPage]:
+ ) -> SyncPager[ThreadSummary, ThreadSummaryPage]:
"""
+ Thread-summary search supports only the metadata_filters filter, which matches the metadata of the thread episodes. Every other filter returns unsupported_filter.
+
Parameters
----------
+ graph_uuid : str
+ The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+ query : str
+ The search query.
+
page_size : typing.Optional[int]
- The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages.
+ The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages. Search ranks a limited set of results, so iteration ends after that set. To get the top N results, set `page_size` to N and read the first page.
cursor : typing.Optional[str]
Opaque page cursor
- order_by : typing.Optional[GraphListRequestOrderBy]
- Sort field
+ bfs_origin_node_uuids : typing.Optional[typing.Sequence[str]]
+ Nodes used as BFS origins for graph-distance-aware retrieval.
- order : typing.Optional[GraphListRequestOrder]
- asc or desc
+ center_node_uuid : typing.Optional[str]
+ The node to rank results by distance from. Required when reranker is
+ node_distance.
- search : typing.Optional[str]
- Filters results to graphs whose name, description, or graph ID contains
- this text.
+ filter_low_quality_results : typing.Optional[bool]
+ The default is false. When true, Zep removes low-quality results at the knee of the
+ cross-encoder score curve. The filter never removes a result with a score
+ of 0.9 or more. It keeps at least 5 results, or all results when fewer
+ than 5 are available. The filter only removes results, so a page still
+ returns up to page_size results. Use this field only with reranker
+ cross_encoder. It is not supported for episode search. Invalid
+ combinations return a 400 error. The cutoff is approximate, not guaranteed.
+ When the cross-encoder does not score the results, for example after a
+ timeout, Zep returns the results without the filter.
+
+ filters : typing.Optional[ThreadSummarySearchFilters]
+ Filters constraining which items are returned.
+
+ mmr_lambda : typing.Optional[float]
+ The diversity weighting used for maximal marginal relevance reranking.
+ Required when reranker is mmr.
+
+ reranker : typing.Optional[SearchThreadSummariesRequestReranker]
+ The reranking strategy applied to retrieved results. Defaults to rrf.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncPager[Graph, GraphPage]
+ SyncPager[ThreadSummary, ThreadSummaryPage]
OK
"""
- _response = await self._client_wrapper.httpx_client.request(
- "graphs/list",
+ _response = self._client_wrapper.httpx_client.request(
+ f"graphs/{encode_path_param(graph_uuid)}/search/thread-summaries",
method="POST",
params={
"page_size": page_size,
"cursor": cursor,
- "order_by": order_by,
- "order": order,
},
json={
- "search": search,
+ "query": query,
+ "bfs_origin_node_uuids": bfs_origin_node_uuids,
+ "center_node_uuid": center_node_uuid,
+ "filter_low_quality_results": filter_low_quality_results,
+ "filters": convert_and_respect_annotation_metadata(
+ object_=filters, annotation=ThreadSummarySearchFilters, direction="write"
+ ),
+ "mmr_lambda": mmr_lambda,
+ "reranker": reranker,
},
headers={
"content-type": "application/json",
@@ -3626,27 +3499,29 @@ async def list(
try:
if 200 <= _response.status_code < 300:
_parsed_response = typing.cast(
- GraphPage,
+ ThreadSummaryPage,
parse_obj_as(
- type_=GraphPage, # type: ignore
+ type_=ThreadSummaryPage, # type: ignore
object_=_response.json(),
),
)
_items = _parsed_response.items
_parsed_next = _parsed_response.next_cursor
_has_next = _parsed_next is not None and _parsed_next != ""
-
- async def _get_next():
- return await self.list(
- page_size=page_size,
- cursor=_parsed_next,
- order_by=order_by,
- order=order,
- search=search,
- request_options=request_options,
- )
-
- return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
+ _get_next = lambda: self.search_thread_summaries(
+ graph_uuid,
+ query=query,
+ page_size=page_size,
+ cursor=_parsed_next,
+ bfs_origin_node_uuids=bfs_origin_node_uuids,
+ center_node_uuid=center_node_uuid,
+ filter_low_quality_results=filter_low_quality_results,
+ filters=filters,
+ mmr_lambda=mmr_lambda,
+ reranker=reranker,
+ request_options=request_options,
+ )
+ return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -3704,47 +3579,66 @@ async def _get_next():
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def lookup(
+ def get_subgraph(
self,
+ graph_uuid: str,
*,
- graph_id: typing.Optional[str] = OMIT,
- thread_id: typing.Optional[str] = OMIT,
- user_id: typing.Optional[str] = OMIT,
+ seed_node_uuids: typing.Sequence[str],
+ depth: typing.Optional[int] = OMIT,
+ direction: typing.Optional[SubgraphRequestDirection] = OMIT,
+ filters: typing.Optional[SearchFilters] = OMIT,
+ max_edges: typing.Optional[int] = OMIT,
+ max_nodes: typing.Optional[int] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[Graph]:
+ ) -> HttpResponse[SubgraphResponse]:
"""
Parameters
----------
- graph_id : typing.Optional[str]
- The developer-assigned graph ID to resolve to a UUID. Mutually exclusive
- with user_id and thread_id.
+ graph_uuid : str
+ The UUID of the graph. For a user graph, you can also use the UUID of the user.
- thread_id : typing.Optional[str]
- The developer-assigned thread ID to resolve to a UUID. Mutually exclusive
- with user_id and graph_id.
+ seed_node_uuids : typing.Sequence[str]
+ The node UUIDs to expand from, in traversal-priority order.
- user_id : typing.Optional[str]
- The developer-assigned user ID to resolve to a UUID. Mutually exclusive
- with thread_id and graph_id.
+ depth : typing.Optional[int]
+ The maximum traversal depth from the seed nodes. Defaults to 1.
+
+ direction : typing.Optional[SubgraphRequestDirection]
+ The edge orientation to follow during expansion: in, out, or both.
+ Defaults to both.
+
+ filters : typing.Optional[SearchFilters]
+ Filters constraining the traversed edges and included nodes.
+
+ max_edges : typing.Optional[int]
+ The maximum number of edges in the response. Defaults to 200.
+
+ max_nodes : typing.Optional[int]
+ The maximum number of nodes in the response. Defaults to 100.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[Graph]
+ HttpResponse[SubgraphResponse]
OK
"""
- _response = await self._client_wrapper.httpx_client.request(
- "graphs/lookup",
+ _response = self._client_wrapper.httpx_client.request(
+ f"graphs/{encode_path_param(graph_uuid)}/subgraph",
method="POST",
json={
- "graph_id": graph_id,
- "thread_id": thread_id,
- "user_id": user_id,
- },
- headers={
- "content-type": "application/json",
+ "depth": depth,
+ "direction": direction,
+ "filters": convert_and_respect_annotation_metadata(
+ object_=filters, annotation=SearchFilters, direction="write"
+ ),
+ "max_edges": max_edges,
+ "max_nodes": max_nodes,
+ "seed_node_uuids": seed_node_uuids,
+ },
+ headers={
+ "content-type": "application/json",
"Idempotency-Key": generate_idempotency_key(),
},
request_options=request_options,
@@ -3753,13 +3647,13 @@ async def lookup(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Graph,
+ SubgraphResponse,
parse_obj_as(
- type_=Graph, # type: ignore
+ type_=SubgraphResponse, # type: ignore
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
+ return HttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -3782,6 +3676,17 @@ async def lookup(
),
),
)
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
@@ -3806,118 +3711,608 @@ async def lookup(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- @contextlib.asynccontextmanager
- async def query_stream(
+ def warm(
self,
+ graph_uuid: str,
*,
- graph_uuids: typing.Sequence[str],
- query: str,
- generate_answer: typing.Optional[bool] = OMIT,
- guidance: typing.Optional[str] = OMIT,
- mode: typing.Optional[GraphQueryRequestMode] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[GraphQueryStreamEvent]]]:
+ ) -> HttpResponse[AsyncResult]:
+ """
+ Parameters
+ ----------
+ graph_uuid : str
+ The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[AsyncResult]
+ Accepted
"""
- Experimental. Retrieves the graph records for a natural-language question about a graph with a read-only retrieval loop. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. deep: A model plans its own searches. It can page through complete lists and read more records before it answers. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and in closed release. Zep enables the operation only for select accounts. The request, the response, the events, and the modes of the operation can change. A request from an account without access returns `404 not_found`. To get access, contact support@getzep.com.
+ _response = self._client_wrapper.httpx_client.request(
+ f"graphs/{encode_path_param(graph_uuid)}/warm",
+ method="POST",
+ headers={
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ AsyncResult,
+ parse_obj_as(
+ type_=AsyncResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+
+class AsyncRawGraphClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+ async def create(
+ self,
+ *,
+ content_policy: typing.Optional[GraphContentPolicyRequest] = OMIT,
+ description: typing.Optional[str] = OMIT,
+ name: typing.Optional[str] = OMIT,
+ time_zone: typing.Optional[str] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[Graph]:
+ """
Parameters
----------
- graph_uuids : typing.Sequence[str]
- The graph UUIDs to query. The current release accepts one UUID.
+ content_policy : typing.Optional[GraphContentPolicyRequest]
+ Experimental. Content policy additions for the graph. The graph binds the current
+ project content policy plus these additions, and the binding does not
+ change after creation.
- query : str
- The natural-language question about the graph.
+ description : typing.Optional[str]
+ A description of the graph.
- generate_answer : typing.Optional[bool]
- When true, a model also writes an answer from the retrieved records.
- The default is false: the response has the records and no answer.
+ name : typing.Optional[str]
+ A display name for the graph.
- guidance : typing.Optional[str]
- Optional caller guidance for the answer. The agent treats it as untrusted text.
+ time_zone : typing.Optional[str]
+ The graph's IANA time zone.
- mode : typing.Optional[GraphQueryRequestMode]
- The retrieval mode. The default is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. A BYOM project or BYOC deployment also needs a SystemOne decision model for fast. deep: A model plans its own searches. It can page through complete lists and read more records before it answers.
+ idempotency_key : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
- Yields
- ------
- typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[GraphQueryStreamEvent]]]
-
+ Returns
+ -------
+ AsyncHttpResponse[Graph]
+ Created
"""
- async with self._client_wrapper.httpx_client.stream(
- "graphs/query",
+ _response = await self._client_wrapper.httpx_client.request(
+ "graphs",
method="POST",
json={
- "generate_answer": generate_answer,
- "graph_uuids": graph_uuids,
- "guidance": guidance,
- "mode": mode,
- "query": query,
- "stream": True,
+ "content_policy": convert_and_respect_annotation_metadata(
+ object_=content_policy, annotation=GraphContentPolicyRequest, direction="write"
+ ),
+ "description": description,
+ "name": name,
+ "time_zone": time_zone,
},
headers={
"content-type": "application/json",
- "Idempotency-Key": generate_idempotency_key(),
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
},
request_options=request_options,
omit=OMIT,
- ) as _response:
-
- async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[GraphQueryStreamEvent]]:
- try:
- if 200 <= _response.status_code < 300:
-
- async def _iter():
- _event_source = EventSource(_response)
- async for _sse in _event_source.aiter_sse():
- if _sse.data == None:
- return
- if len(_sse.data) == 0:
- continue
- try:
- yield typing.cast(
- GraphQueryStreamEvent,
- parse_sse_obj(
- sse=_sse,
- type_=GraphQueryStreamEvent, # type: ignore
- ),
- )
- except JSONDecodeError as e:
- warning(f"Skipping SSE event with invalid JSON: {e}, sse: {_sse!r}")
- except (TypeError, ValueError, KeyError, AttributeError) as e:
- warning(
- f"Skipping SSE event due to model construction error: {type(e).__name__}: {e}, sse: {_sse!r}"
- )
- except Exception as e:
- error(
- f"Unexpected error processing SSE event: {type(e).__name__}: {e}, sse: {_sse!r}"
- )
- return
-
- return AsyncHttpResponse(response=_response, data=_iter())
- await _response.aread()
- if _response.status_code == 400:
- raise BadRequestError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- if _response.status_code == 401:
- raise UnauthorizedError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Graph,
+ parse_obj_as(
+ type_=Graph, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ async def list(
+ self,
+ *,
+ page_size: typing.Optional[int] = None,
+ cursor: typing.Optional[str] = None,
+ order_by: typing.Optional[GraphListRequestOrderBy] = None,
+ order: typing.Optional[GraphListRequestOrder] = None,
+ search: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncPager[Graph, GraphPage]:
+ """
+ Parameters
+ ----------
+ page_size : typing.Optional[int]
+ The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages.
+
+ cursor : typing.Optional[str]
+ Opaque page cursor
+
+ order_by : typing.Optional[GraphListRequestOrderBy]
+ Sort field
+
+ order : typing.Optional[GraphListRequestOrder]
+ asc or desc
+
+ search : typing.Optional[str]
+ Filters results to graphs whose name, description, or graph ID contains
+ this text.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncPager[Graph, GraphPage]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "graphs/list",
+ method="POST",
+ params={
+ "page_size": page_size,
+ "cursor": cursor,
+ "order_by": order_by,
+ "order": order,
+ },
+ json={
+ "search": search,
+ },
+ headers={
+ "content-type": "application/json",
+ "Idempotency-Key": generate_idempotency_key(),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _parsed_response = typing.cast(
+ GraphPage,
+ parse_obj_as(
+ type_=GraphPage, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _items = _parsed_response.items
+ _parsed_next = _parsed_response.next_cursor
+ _has_next = _parsed_next is not None and _parsed_next != ""
+
+ async def _get_next():
+ return await self.list(
+ page_size=page_size,
+ cursor=_parsed_next,
+ order_by=order_by,
+ order=order,
+ search=search,
+ request_options=request_options,
+ )
+
+ return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ async def lookup(
+ self,
+ *,
+ graph_id: typing.Optional[str] = OMIT,
+ thread_id: typing.Optional[str] = OMIT,
+ user_id: typing.Optional[str] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[Graph]:
+ """
+ Parameters
+ ----------
+ graph_id : typing.Optional[str]
+ The developer-assigned graph ID to resolve to a UUID. Mutually exclusive
+ with user_id and thread_id.
+
+ thread_id : typing.Optional[str]
+ The developer-assigned thread ID to resolve to a UUID. Mutually exclusive
+ with user_id and graph_id.
+
+ user_id : typing.Optional[str]
+ The developer-assigned user ID to resolve to a UUID. Mutually exclusive
+ with thread_id and graph_id.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[Graph]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "graphs/lookup",
+ method="POST",
+ json={
+ "graph_id": graph_id,
+ "thread_id": thread_id,
+ "user_id": user_id,
+ },
+ headers={
+ "content-type": "application/json",
+ "Idempotency-Key": generate_idempotency_key(),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Graph,
+ parse_obj_as(
+ type_=Graph, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ @contextlib.asynccontextmanager
+ async def query_stream(
+ self,
+ *,
+ graph_uuids: typing.Sequence[str],
+ query: str,
+ generate_answer: typing.Optional[bool] = OMIT,
+ guidance: typing.Optional[str] = OMIT,
+ mode: typing.Optional[GraphQueryRequestMode] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[GraphQueryStreamEvent]]]:
+ """
+ Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval. Zep explores the graph with searches and graph traversals, and it uses the records from each retrieval round to plan the next round. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items and an `answer_status` of `answered`, `partial`, or `refused`. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: Optimized for latency. Retrieves the context for multi-hop queries. The query runs at most 3 search rounds. deep: Runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and available to every Zep account. The request, the response, the events, and the modes of the operation can change.
+
+ Parameters
+ ----------
+ graph_uuids : typing.Sequence[str]
+ The graph UUIDs to query. The current release accepts one UUID.
+
+ query : str
+ The natural-language query for the graph.
+
+ generate_answer : typing.Optional[bool]
+ When true, a model also writes an answer from the retrieved records.
+ The default is false: the response has the records and no answer.
+
+ guidance : typing.Optional[str]
+ Optional caller guidance for the answer. The agent treats it as untrusted text.
+
+ mode : typing.Optional[GraphQueryRequestMode]
+ The retrieval mode. The default is fast.
+ Fast mode is optimized for latency. It retrieves the context for multi-hop queries.
+ The query runs at most 3 search rounds. A BYOM project needs a decision model for fast mode.
+ A BYOC deployment needs a decision model (SystemOne or Gemini Decisions) for fast mode.
+ Deep mode runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Yields
+ ------
+ typing.AsyncIterator[AsyncHttpResponse[typing.AsyncIterator[GraphQueryStreamEvent]]]
+
+ """
+ async with self._client_wrapper.httpx_client.stream(
+ "graphs/query",
+ method="POST",
+ json={
+ "generate_answer": generate_answer,
+ "graph_uuids": graph_uuids,
+ "guidance": guidance,
+ "mode": mode,
+ "query": query,
+ "stream": True,
+ },
+ headers={
+ "content-type": "application/json",
+ "Idempotency-Key": generate_idempotency_key(),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ ) as _response:
+
+ async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[GraphQueryStreamEvent]]:
+ try:
+ if 200 <= _response.status_code < 300:
+
+ async def _iter():
+ _event_source = EventSource(_response)
+ async for _sse in _event_source.aiter_sse():
+ if _sse.data == None:
+ return
+ if len(_sse.data) == 0:
+ continue
+ try:
+ yield typing.cast(
+ GraphQueryStreamEvent,
+ parse_sse_obj(
+ sse=_sse,
+ type_=GraphQueryStreamEvent, # type: ignore
+ ),
+ )
+ except JSONDecodeError as e:
+ warning(f"Skipping SSE event with invalid JSON: {e}, sse: {_sse!r}")
+ except (TypeError, ValueError, KeyError, AttributeError) as e:
+ warning(
+ f"Skipping SSE event due to model construction error: {type(e).__name__}: {e}, sse: {_sse!r}"
+ )
+ except Exception as e:
+ error(
+ f"Unexpected error processing SSE event: {type(e).__name__}: {e}, sse: {_sse!r}"
+ )
+ return
+
+ return AsyncHttpResponse(response=_response, data=_iter())
+ await _response.aread()
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
),
)
if _response.status_code == 403:
@@ -4002,61 +4397,424 @@ async def _iter():
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- yield await _stream()
+ yield await _stream()
+
+ async def query(
+ self,
+ *,
+ graph_uuids: typing.Sequence[str],
+ query: str,
+ generate_answer: typing.Optional[bool] = OMIT,
+ guidance: typing.Optional[str] = OMIT,
+ mode: typing.Optional[GraphQueryRequestMode] = OMIT,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[GraphQueryResponse]:
+ """
+ Experimental. Smart Query retrieves multi-hop context from a graph in one call. Some agent tasks need multi-hop retrieval: the agent does not know in advance what to search for, so it must retrieve a record, learn from it, and then plan the next retrieval. Zep explores the graph with searches and graph traversals, and it uses the records from each retrieval round to plan the next round. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items and an `answer_status` of `answered`, `partial`, or `refused`. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: Optimized for latency. Retrieves the context for multi-hop queries. The query runs at most 3 search rounds. deep: Runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and available to every Zep account. The request, the response, the events, and the modes of the operation can change.
+
+ Parameters
+ ----------
+ graph_uuids : typing.Sequence[str]
+ The graph UUIDs to query. The current release accepts one UUID.
+
+ query : str
+ The natural-language query for the graph.
+
+ generate_answer : typing.Optional[bool]
+ When true, a model also writes an answer from the retrieved records.
+ The default is false: the response has the records and no answer.
+
+ guidance : typing.Optional[str]
+ Optional caller guidance for the answer. The agent treats it as untrusted text.
+
+ mode : typing.Optional[GraphQueryRequestMode]
+ The retrieval mode. The default is fast.
+ Fast mode is optimized for latency. It retrieves the context for multi-hop queries.
+ The query runs at most 3 search rounds. A BYOM project needs a decision model for fast mode.
+ A BYOC deployment needs a decision model (SystemOne or Gemini Decisions) for fast mode.
+ Deep mode runs more retrieval steps, so it can retrieve complete lists, such as the records for a count. It takes longer than fast mode.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[GraphQueryResponse]
+
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "graphs/query",
+ method="POST",
+ json={
+ "generate_answer": generate_answer,
+ "graph_uuids": graph_uuids,
+ "guidance": guidance,
+ "mode": mode,
+ "query": query,
+ "stream": False,
+ },
+ headers={
+ "content-type": "application/json",
+ "Idempotency-Key": generate_idempotency_key(),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ GraphQueryResponse,
+ parse_obj_as(
+ type_=GraphQueryResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 413:
+ raise ContentTooLargeError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 429:
+ raise TooManyRequestsError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 503:
+ raise ServiceUnavailableError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ async def get(
+ self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[Graph]:
+ """
+ Parameters
+ ----------
+ graph_uuid : str
+ The UUID of the graph. For a user graph, you can also use the UUID of the user.
- async def query(
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[Graph]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"graphs/{encode_path_param(graph_uuid)}",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Graph,
+ parse_obj_as(
+ type_=Graph, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ async def delete(
self,
+ graph_uuid: str,
*,
- graph_uuids: typing.Sequence[str],
- query: str,
- generate_answer: typing.Optional[bool] = OMIT,
- guidance: typing.Optional[str] = OMIT,
- mode: typing.Optional[GraphQueryRequestMode] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[GraphQueryResponse]:
+ ) -> AsyncHttpResponse[GraphDeleteResult]:
+ """
+ Parameters
+ ----------
+ graph_uuid : str
+ The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[GraphDeleteResult]
+ Accepted
"""
- Experimental. Retrieves the graph records for a natural-language question about a graph with a read-only retrieval loop. By default, the response has the retrieved records and no answer. Set `generate_answer` to `true` to also get an answer that a model writes from the records, with the cited graph items. Set `stream` to `true` to get the retrieval calls as server-sent events. The default mode is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. deep: A model plans its own searches. It can page through complete lists and read more records before it answers. BYOM and BYOC projects can use fast mode when they have a configured decision model. Other projects can use fast mode without a decision model. BYOM and BYOC projects without a decision model must use deep mode. The operation is experimental and in closed release. Zep enables the operation only for select accounts. The request, the response, the events, and the modes of the operation can change. A request from an account without access returns `404 not_found`. To get access, contact support@getzep.com.
+ _response = await self._client_wrapper.httpx_client.request(
+ f"graphs/{encode_path_param(graph_uuid)}",
+ method="DELETE",
+ headers={
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ GraphDeleteResult,
+ parse_obj_as(
+ type_=GraphDeleteResult, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+ async def update(
+ self,
+ graph_uuid: str,
+ *,
+ description: typing.Optional[str] = OMIT,
+ name: typing.Optional[str] = OMIT,
+ time_zone: typing.Optional[str] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[Graph]:
+ """
Parameters
----------
- graph_uuids : typing.Sequence[str]
- The graph UUIDs to query. The current release accepts one UUID.
+ graph_uuid : str
+ The UUID of the graph. For a user graph, you can also use the UUID of the user.
- query : str
- The natural-language question about the graph.
+ description : typing.Optional[str]
+ A description of the graph.
- generate_answer : typing.Optional[bool]
- When true, a model also writes an answer from the retrieved records.
- The default is false: the response has the records and no answer.
+ name : typing.Optional[str]
+ The graph's display name.
- guidance : typing.Optional[str]
- Optional caller guidance for the answer. The agent treats it as untrusted text.
+ time_zone : typing.Optional[str]
+ The graph's IANA time zone.
- mode : typing.Optional[GraphQueryRequestMode]
- The retrieval mode. The default is fast. fast: A decision model selects the types of search for each round and stops when it has enough context. The query runs at most 3 search rounds. A BYOM project or BYOC deployment also needs a SystemOne decision model for fast. deep: A model plans its own searches. It can page through complete lists and read more records before it answers.
+ idempotency_key : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[GraphQueryResponse]
-
+ AsyncHttpResponse[Graph]
+ OK
"""
_response = await self._client_wrapper.httpx_client.request(
- "graphs/query",
- method="POST",
+ f"graphs/{encode_path_param(graph_uuid)}",
+ method="PATCH",
json={
- "generate_answer": generate_answer,
- "graph_uuids": graph_uuids,
- "guidance": guidance,
- "mode": mode,
- "query": query,
- "stream": False,
+ "description": description,
+ "name": name,
+ "time_zone": time_zone,
},
headers={
"content-type": "application/json",
- "Idempotency-Key": generate_idempotency_key(),
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
},
request_options=request_options,
omit=OMIT,
@@ -4064,9 +4822,9 @@ async def query(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- GraphQueryResponse,
+ Graph,
parse_obj_as(
- type_=GraphQueryResponse, # type: ignore
+ type_=Graph, # type: ignore
object_=_response.json(),
),
)
@@ -4115,41 +4873,8 @@ async def query(
),
),
)
- if _response.status_code == 413:
- raise ContentTooLargeError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- if _response.status_code == 429:
- raise TooManyRequestsError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- if _response.status_code == 500:
- raise InternalServerError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- if _response.status_code == 503:
- raise ServiceUnavailableError(
+ if _response.status_code == 409:
+ raise ConflictError(
headers=dict(_response.headers),
body=typing.cast(
types_api_error_ApiError,
@@ -4172,34 +4897,49 @@ async def query(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def get(
- self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[Graph]:
+ async def clone(
+ self,
+ graph_uuid: str,
+ *,
+ request: CloneGraphRequest,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[CloneGraphResult]:
"""
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
+ request : CloneGraphRequest
+
+ idempotency_key : typing.Optional[str]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[Graph]
- OK
+ AsyncHttpResponse[CloneGraphResult]
+ Accepted
"""
_response = await self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}",
- method="GET",
+ f"graphs/{encode_path_param(graph_uuid)}/clone",
+ method="POST",
+ json=request,
+ headers={
+ "content-type": "application/json",
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ },
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Graph,
+ CloneGraphResult,
parse_obj_as(
- type_=Graph, # type: ignore
+ type_=CloneGraphResult, # type: ignore
object_=_response.json(),
),
)
@@ -4248,6 +4988,17 @@ async def get(
),
),
)
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise core_api_error_ApiError(
@@ -4261,43 +5012,36 @@ async def get(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def delete(
- self,
- graph_uuid: str,
- *,
- idempotency_key: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[GraphDeleteResult]:
+ async def get_content_policy(
+ self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[GraphContentPolicy]:
"""
+ Experimental: the request, the response, and the behavior of this operation can change. Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.
+
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
- idempotency_key : typing.Optional[str]
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[GraphDeleteResult]
- Accepted
+ AsyncHttpResponse[GraphContentPolicy]
+ OK
"""
_response = await self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}",
- method="DELETE",
- headers={
- "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
- },
+ f"graphs/{encode_path_param(graph_uuid)}/content-policy",
+ method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- GraphDeleteResult,
+ GraphContentPolicy,
parse_obj_as(
- type_=GraphDeleteResult, # type: ignore
+ type_=GraphContentPolicy, # type: ignore
object_=_response.json(),
),
)
@@ -4346,17 +5090,6 @@ async def delete(
),
),
)
- if _response.status_code == 409:
- raise ConflictError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
_response_json = _response.json()
except JSONDecodeError:
raise core_api_error_ApiError(
@@ -4370,66 +5103,82 @@ async def delete(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def update(
+ async def list_content_policy_events(
self,
graph_uuid: str,
*,
- description: typing.Optional[str] = OMIT,
- name: typing.Optional[str] = OMIT,
- time_zone: typing.Optional[str] = OMIT,
- idempotency_key: typing.Optional[str] = None,
+ page_size: typing.Optional[int] = None,
+ cursor: typing.Optional[str] = None,
+ filters: typing.Optional[ContentPolicyEventListFilters] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[Graph]:
+ ) -> AsyncPager[ContentPolicyEvent, ContentPolicyEventPage]:
"""
+ Experimental: the request, the response, and the behavior of this operation can change. Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.
+
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
- description : typing.Optional[str]
- A description of the graph.
-
- name : typing.Optional[str]
- The graph's display name.
+ page_size : typing.Optional[int]
+ The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages.
- time_zone : typing.Optional[str]
- The graph's IANA time zone.
+ cursor : typing.Optional[str]
+ Opaque page cursor
- idempotency_key : typing.Optional[str]
+ filters : typing.Optional[ContentPolicyEventListFilters]
+ Exact-match filters that limit the events in the list.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[Graph]
+ AsyncPager[ContentPolicyEvent, ContentPolicyEventPage]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}",
- method="PATCH",
+ f"graphs/{encode_path_param(graph_uuid)}/content-policy/events/list",
+ method="POST",
+ params={
+ "page_size": page_size,
+ "cursor": cursor,
+ },
json={
- "description": description,
- "name": name,
- "time_zone": time_zone,
+ "filters": convert_and_respect_annotation_metadata(
+ object_=filters, annotation=ContentPolicyEventListFilters, direction="write"
+ ),
},
headers={
"content-type": "application/json",
- "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ "Idempotency-Key": generate_idempotency_key(),
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
- _data = typing.cast(
- Graph,
+ _parsed_response = typing.cast(
+ ContentPolicyEventPage,
parse_obj_as(
- type_=Graph, # type: ignore
+ type_=ContentPolicyEventPage, # type: ignore
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
+ _items = _parsed_response.items
+ _parsed_next = _parsed_response.next_cursor
+ _has_next = _parsed_next is not None and _parsed_next != ""
+
+ async def _get_next():
+ return await self.list_content_policy_events(
+ graph_uuid,
+ page_size=page_size,
+ cursor=_parsed_next,
+ filters=filters,
+ request_options=request_options,
+ )
+
+ return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -4474,17 +5223,6 @@ async def update(
),
),
)
- if _response.status_code == 409:
- raise ConflictError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
_response_json = _response.json()
except JSONDecodeError:
raise core_api_error_ApiError(
@@ -4498,39 +5236,67 @@ async def update(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def clone(
+ async def get_context(
self,
graph_uuid: str,
*,
- request: CloneGraphRequest,
- idempotency_key: typing.Optional[str] = None,
+ query: str,
+ filters: typing.Optional[SearchFilters] = OMIT,
+ include_results: typing.Optional[bool] = OMIT,
+ max_characters: typing.Optional[int] = OMIT,
+ recency_bias: typing.Optional[GraphContextRequestRecencyBias] = OMIT,
+ template_uuid: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[CloneGraphResult]:
+ ) -> AsyncHttpResponse[GraphContextResponse]:
"""
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
- request : CloneGraphRequest
+ query : str
+ The search query used to assemble the context block.
- idempotency_key : typing.Optional[str]
+ filters : typing.Optional[SearchFilters]
+ Filters constraining which graph data can be selected for the context
+ block.
+
+ include_results : typing.Optional[bool]
+ When true, includes the raw graph results selected for the context block.
+
+ max_characters : typing.Optional[int]
+ The maximum number of characters in the assembled context block.
+
+ recency_bias : typing.Optional[GraphContextRequestRecencyBias]
+ Adjusts result selection to favor more recent graph data.
+
+ template_uuid : typing.Optional[str]
+ The UUID of a context template used to render the context block.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[CloneGraphResult]
- Accepted
+ AsyncHttpResponse[GraphContextResponse]
+ OK
"""
_response = await self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/clone",
+ f"graphs/{encode_path_param(graph_uuid)}/context",
method="POST",
- json=request,
+ json={
+ "filters": convert_and_respect_annotation_metadata(
+ object_=filters, annotation=SearchFilters, direction="write"
+ ),
+ "include_results": include_results,
+ "max_characters": max_characters,
+ "query": query,
+ "recency_bias": recency_bias,
+ "template_uuid": template_uuid,
+ },
headers={
"content-type": "application/json",
- "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ "Idempotency-Key": generate_idempotency_key(),
},
request_options=request_options,
omit=OMIT,
@@ -4538,9 +5304,9 @@ async def clone(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- CloneGraphResult,
+ GraphContextResponse,
parse_obj_as(
- type_=CloneGraphResult, # type: ignore
+ type_=GraphContextResponse, # type: ignore
object_=_response.json(),
),
)
@@ -4613,36 +5379,36 @@ async def clone(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def get_content_policy(
+ async def get_inclusion_rules(
self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[GraphContentPolicy]:
+ ) -> AsyncHttpResponse[InclusionRules]:
"""
- Returns the content policy the graph bound at creation. The policy of a graph does not change after creation. A graph without a content policy returns revision 0 with no categories and no rules.
+ Returns the graph rules, for example {"inclusion_rules":[],"inherited":true}.
Parameters
----------
graph_uuid : str
- The UUID of the graph. For a user graph, you can also use the UUID of the user.
+ Graph UUID
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[GraphContentPolicy]
+ AsyncHttpResponse[InclusionRules]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/content-policy",
+ f"graphs/{encode_path_param(graph_uuid)}/inclusion-rules",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- GraphContentPolicy,
+ InclusionRules,
parse_obj_as(
- type_=GraphContentPolicy, # type: ignore
+ type_=InclusionRules, # type: ignore
object_=_response.json(),
),
)
@@ -4669,17 +5435,6 @@ async def get_content_policy(
),
),
)
- if _response.status_code == 403:
- raise ForbiddenError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
@@ -4704,82 +5459,65 @@ async def get_content_policy(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def list_content_policy_events(
+ async def set_inclusion_rules(
self,
graph_uuid: str,
*,
- page_size: typing.Optional[int] = None,
- cursor: typing.Optional[str] = None,
- filters: typing.Optional[ContentPolicyEventListFilters] = OMIT,
+ inclusion_rules: typing.Optional[typing.Sequence[InclusionRule]] = OMIT,
+ inherited: typing.Optional[bool] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncPager[ContentPolicyEvent, ContentPolicyEventPage]:
+ ) -> AsyncHttpResponse[InclusionRules]:
"""
- Lists the content policy decisions recorded for a graph, newest first. Each event carries identifiers only. A graph without a content policy returns an empty list.
+ Replaces the graph rules. Request: {"inclusion_rules":[]}. Response: {"inclusion_rules":[],"inherited":true}.
Parameters
----------
graph_uuid : str
- The UUID of the graph. For a user graph, you can also use the UUID of the user.
+ Graph UUID
- page_size : typing.Optional[int]
- The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages.
+ inclusion_rules : typing.Optional[typing.Sequence[InclusionRule]]
+ InclusionRules replaces the complete rule set at this scope.
- cursor : typing.Optional[str]
- Opaque page cursor
+ inherited : typing.Optional[bool]
+ Inherited identifies a graph that uses project defaults.
- filters : typing.Optional[ContentPolicyEventListFilters]
- Exact-match filters that limit the events in the list.
+ idempotency_key : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncPager[ContentPolicyEvent, ContentPolicyEventPage]
+ AsyncHttpResponse[InclusionRules]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/content-policy/events/list",
- method="POST",
- params={
- "page_size": page_size,
- "cursor": cursor,
- },
+ f"graphs/{encode_path_param(graph_uuid)}/inclusion-rules",
+ method="PUT",
json={
- "filters": convert_and_respect_annotation_metadata(
- object_=filters, annotation=ContentPolicyEventListFilters, direction="write"
+ "inclusion_rules": convert_and_respect_annotation_metadata(
+ object_=inclusion_rules, annotation=typing.Sequence[InclusionRule], direction="write"
),
+ "inherited": inherited,
},
headers={
"content-type": "application/json",
- "Idempotency-Key": generate_idempotency_key(),
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
},
request_options=request_options,
omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
- _parsed_response = typing.cast(
- ContentPolicyEventPage,
+ _data = typing.cast(
+ InclusionRules,
parse_obj_as(
- type_=ContentPolicyEventPage, # type: ignore
+ type_=InclusionRules, # type: ignore
object_=_response.json(),
),
)
- _items = _parsed_response.items
- _parsed_next = _parsed_response.next_cursor
- _has_next = _parsed_next is not None and _parsed_next != ""
-
- async def _get_next():
- return await self.list_content_policy_events(
- graph_uuid,
- page_size=page_size,
- cursor=_parsed_next,
- filters=filters,
- request_options=request_options,
- )
-
- return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
+ return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -4802,8 +5540,75 @@ async def _get_next():
),
),
)
- if _response.status_code == 403:
- raise ForbiddenError(
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ async def get_instructions(
+ self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[Instructions]:
+ """
+ Parameters
+ ----------
+ graph_uuid : str
+ The UUID of the graph. For a user graph, you can also use the UUID of the user.
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[Instructions]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"graphs/{encode_path_param(graph_uuid)}/instructions",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Instructions,
+ parse_obj_as(
+ type_=Instructions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
headers=dict(_response.headers),
body=typing.cast(
types_api_error_ApiError,
@@ -4837,67 +5642,51 @@ async def _get_next():
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def get_context(
+ async def set_instructions(
self,
graph_uuid: str,
*,
- query: str,
- filters: typing.Optional[SearchFilters] = OMIT,
- include_results: typing.Optional[bool] = OMIT,
- max_characters: typing.Optional[int] = OMIT,
- recency_bias: typing.Optional[GraphContextRequestRecencyBias] = OMIT,
- template_uuid: typing.Optional[str] = OMIT,
+ inherited: typing.Optional[bool] = OMIT,
+ instructions: typing.Optional[typing.Sequence[CustomInstruction]] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[GraphContextResponse]:
+ ) -> AsyncHttpResponse[Instructions]:
"""
Parameters
----------
graph_uuid : str
The UUID of the graph. For a user graph, you can also use the UUID of the user.
- query : str
- The search query used to assemble the context block.
-
- filters : typing.Optional[SearchFilters]
- Filters constraining which graph data can be selected for the context
- block.
-
- include_results : typing.Optional[bool]
- When true, includes the raw graph results selected for the context block.
-
- max_characters : typing.Optional[int]
- The maximum number of characters in the assembled context block.
+ inherited : typing.Optional[bool]
+ Whether this is the project's default value rather than an override set on
+ this graph.
- recency_bias : typing.Optional[GraphContextRequestRecencyBias]
- Adjusts result selection to favor more recent graph data.
+ instructions : typing.Optional[typing.Sequence[CustomInstruction]]
+ The custom extraction instructions in effect at this scope, each with a
+ name and text.
- template_uuid : typing.Optional[str]
- The UUID of a context template used to render the context block.
+ idempotency_key : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[GraphContextResponse]
+ AsyncHttpResponse[Instructions]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/context",
- method="POST",
+ f"graphs/{encode_path_param(graph_uuid)}/instructions",
+ method="PUT",
json={
- "filters": convert_and_respect_annotation_metadata(
- object_=filters, annotation=SearchFilters, direction="write"
+ "inherited": inherited,
+ "instructions": convert_and_respect_annotation_metadata(
+ object_=instructions, annotation=typing.Sequence[CustomInstruction], direction="write"
),
- "include_results": include_results,
- "max_characters": max_characters,
- "query": query,
- "recency_bias": recency_bias,
- "template_uuid": template_uuid,
},
headers={
"content-type": "application/json",
- "Idempotency-Key": generate_idempotency_key(),
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
},
request_options=request_options,
omit=OMIT,
@@ -4905,9 +5694,9 @@ async def get_context(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- GraphContextResponse,
+ Instructions,
parse_obj_as(
- type_=GraphContextResponse, # type: ignore
+ type_=Instructions, # type: ignore
object_=_response.json(),
),
)
@@ -4934,17 +5723,6 @@ async def get_context(
),
),
)
- if _response.status_code == 403:
- raise ForbiddenError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
@@ -4956,17 +5734,6 @@ async def get_context(
),
),
)
- if _response.status_code == 409:
- raise ConflictError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
_response_json = _response.json()
except JSONDecodeError:
raise core_api_error_ApiError(
@@ -4980,34 +5747,37 @@ async def get_context(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def get_instructions(
+ async def get_knowledge(
self, graph_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[Instructions]:
+ ) -> AsyncHttpResponse[KnowledgeResponse]:
"""
+ Returns the domain knowledge in effect at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+
Parameters
----------
graph_uuid : str
- The UUID of the graph. For a user graph, you can also use the UUID of the user.
+ The UUID of the graph or its user.
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[Instructions]
+ AsyncHttpResponse[KnowledgeResponse]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/instructions",
+ f"graphs/{encode_path_param(graph_uuid)}/knowledge",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Instructions,
+ KnowledgeResponse,
parse_obj_as(
- type_=Instructions, # type: ignore
+ type_=KnowledgeResponse, # type: ignore
object_=_response.json(),
),
)
@@ -5058,28 +5828,26 @@ async def get_instructions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def set_instructions(
+ async def set_knowledge(
self,
graph_uuid: str,
*,
- inherited: typing.Optional[bool] = OMIT,
- instructions: typing.Optional[typing.Sequence[CustomInstruction]] = OMIT,
+ knowledge: typing.Optional[typing.Sequence[KnowledgeEntry]] = OMIT,
idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[Instructions]:
+ ) -> AsyncHttpResponse[KnowledgeResponse]:
"""
+ Replaces the complete set of domain knowledge entries at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+ Request example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}]}
+
Parameters
----------
graph_uuid : str
- The UUID of the graph. For a user graph, you can also use the UUID of the user.
-
- inherited : typing.Optional[bool]
- Whether this is the project's default value rather than an override set on
- this graph.
+ The UUID of the graph or its user.
- instructions : typing.Optional[typing.Sequence[CustomInstruction]]
- The custom extraction instructions in effect at this scope, each with a
- name and text.
+ knowledge : typing.Optional[typing.Sequence[KnowledgeEntry]]
+ The complete set of domain knowledge entries. An empty list clears the scope.
idempotency_key : typing.Optional[str]
@@ -5088,16 +5856,15 @@ async def set_instructions(
Returns
-------
- AsyncHttpResponse[Instructions]
+ AsyncHttpResponse[KnowledgeResponse]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- f"graphs/{encode_path_param(graph_uuid)}/instructions",
+ f"graphs/{encode_path_param(graph_uuid)}/knowledge",
method="PUT",
json={
- "inherited": inherited,
- "instructions": convert_and_respect_annotation_metadata(
- object_=instructions, annotation=typing.Sequence[CustomInstruction], direction="write"
+ "knowledge": convert_and_respect_annotation_metadata(
+ object_=knowledge, annotation=typing.Sequence[KnowledgeEntry], direction="write"
),
},
headers={
@@ -5110,9 +5877,9 @@ async def set_instructions(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Instructions,
+ KnowledgeResponse,
parse_obj_as(
- type_=Instructions, # type: ignore
+ type_=KnowledgeResponse, # type: ignore
object_=_response.json(),
),
)
@@ -5656,6 +6423,17 @@ async def set_ontology(
),
),
)
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise core_api_error_ApiError(
diff --git a/src/zep_cloud/project/client.py b/src/zep_cloud/project/client.py
index 478ea2c5..60acefb5 100644
--- a/src/zep_cloud/project/client.py
+++ b/src/zep_cloud/project/client.py
@@ -12,7 +12,11 @@
from ..types.custom_instruction import CustomInstruction
from ..types.edge_type import EdgeType
from ..types.entity_type import EntityType
+from ..types.inclusion_rule import InclusionRule
+from ..types.inclusion_rules import InclusionRules
from ..types.instructions import Instructions
+from ..types.knowledge_entry import KnowledgeEntry
+from ..types.knowledge_response import KnowledgeResponse
from ..types.observation_steering import ObservationSteering
from ..types.observation_type import ObservationType
from ..types.ontology import Ontology
@@ -120,7 +124,7 @@ def update(
def get_content_policy(self, *, request_options: typing.Optional[RequestOptions] = None) -> ContentPolicy:
"""
- Returns the current content policy revision of the project. A new graph binds this revision at creation.
+ Experimental: the request, the response, and the behavior of this operation can change. Returns the current content policy revision of the project. A new graph binds this revision at creation.
Parameters
----------
@@ -153,7 +157,7 @@ def set_content_policy(
request_options: typing.Optional[RequestOptions] = None,
) -> ContentPolicy:
"""
- Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. An empty policy (no categories and no rules) removes the content policy for new graphs.
+ Experimental: this operation and the new rule fields can change. The typed rule fields are in private preview and are available only to enabled accounts. Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. For example, {"categories":[{"key":"health"}],"rules":[{"category_key":"health","action":"exclude","entity_types":["Person"],"condition":"The statement names a person's health condition.","prohibited_examples":["Jordan has a chronic back condition."],"patterns":["diagnosed with"]}]}.
Parameters
----------
@@ -196,7 +200,7 @@ def list_content_policy_revisions(
request_options: typing.Optional[RequestOptions] = None,
) -> SyncPager[ContentPolicy, ContentPolicyRevisionPage]:
"""
- Lists every revision of the project content policy, newest first, including revision 0.
+ Experimental: the request, the response, and the behavior of this operation can change. Lists every revision of the project content policy, newest first, including revision 0.
Parameters
----------
@@ -236,6 +240,8 @@ def get_content_policy_revision(
self, revision_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
) -> ContentPolicy:
"""
+ Experimental: the request, the response, and the behavior of this operation can change.
+
Parameters
----------
revision_uuid : str
@@ -263,6 +269,78 @@ def get_content_policy_revision(
_response = self._raw_client.get_content_policy_revision(revision_uuid, request_options=request_options)
return _response.data
+ def get_inclusion_rules(self, *, request_options: typing.Optional[RequestOptions] = None) -> InclusionRules:
+ """
+ Returns the project rules, for example {"inclusion_rules":[],"inherited":false}.
+
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ InclusionRules
+ OK
+
+ Examples
+ --------
+ from zep_cloud import Zep
+
+ client = Zep(
+ api_key="YOUR_API_KEY",
+ )
+ client.project.get_inclusion_rules()
+ """
+ _response = self._raw_client.get_inclusion_rules(request_options=request_options)
+ return _response.data
+
+ def set_inclusion_rules(
+ self,
+ *,
+ inclusion_rules: typing.Optional[typing.Sequence[InclusionRule]] = OMIT,
+ inherited: typing.Optional[bool] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> InclusionRules:
+ """
+ Replaces the project rules. Request: {"inclusion_rules":[]}. Response: {"inclusion_rules":[],"inherited":false}.
+
+ Parameters
+ ----------
+ inclusion_rules : typing.Optional[typing.Sequence[InclusionRule]]
+ InclusionRules replaces the complete rule set at this scope.
+
+ inherited : typing.Optional[bool]
+ Inherited identifies a graph that uses project defaults.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ InclusionRules
+ OK
+
+ Examples
+ --------
+ from zep_cloud import Zep
+
+ client = Zep(
+ api_key="YOUR_API_KEY",
+ )
+ client.project.set_inclusion_rules()
+ """
+ _response = self._raw_client.set_inclusion_rules(
+ inclusion_rules=inclusion_rules,
+ inherited=inherited,
+ idempotency_key=idempotency_key,
+ request_options=request_options,
+ )
+ return _response.data
+
def get_instructions(self, *, request_options: typing.Optional[RequestOptions] = None) -> Instructions:
"""
Parameters
@@ -333,6 +411,74 @@ def set_instructions(
)
return _response.data
+ def get_knowledge(self, *, request_options: typing.Optional[RequestOptions] = None) -> KnowledgeResponse:
+ """
+ Returns the domain knowledge in effect at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ KnowledgeResponse
+ OK
+
+ Examples
+ --------
+ from zep_cloud import Zep
+
+ client = Zep(
+ api_key="YOUR_API_KEY",
+ )
+ client.project.get_knowledge()
+ """
+ _response = self._raw_client.get_knowledge(request_options=request_options)
+ return _response.data
+
+ def set_knowledge(
+ self,
+ *,
+ knowledge: typing.Optional[typing.Sequence[KnowledgeEntry]] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> KnowledgeResponse:
+ """
+ Replaces the complete set of domain knowledge entries at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+ Request example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}]}
+
+ Parameters
+ ----------
+ knowledge : typing.Optional[typing.Sequence[KnowledgeEntry]]
+ The complete set of domain knowledge entries. An empty list clears the scope.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ KnowledgeResponse
+ OK
+
+ Examples
+ --------
+ from zep_cloud import Zep
+
+ client = Zep(
+ api_key="YOUR_API_KEY",
+ )
+ client.project.set_knowledge()
+ """
+ _response = self._raw_client.set_knowledge(
+ knowledge=knowledge, idempotency_key=idempotency_key, request_options=request_options
+ )
+ return _response.data
+
def get_observation_steering(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> ObservationSteering:
@@ -681,7 +827,7 @@ async def main() -> None:
async def get_content_policy(self, *, request_options: typing.Optional[RequestOptions] = None) -> ContentPolicy:
"""
- Returns the current content policy revision of the project. A new graph binds this revision at creation.
+ Experimental: the request, the response, and the behavior of this operation can change. Returns the current content policy revision of the project. A new graph binds this revision at creation.
Parameters
----------
@@ -722,7 +868,7 @@ async def set_content_policy(
request_options: typing.Optional[RequestOptions] = None,
) -> ContentPolicy:
"""
- Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. An empty policy (no categories and no rules) removes the content policy for new graphs.
+ Experimental: this operation and the new rule fields can change. The typed rule fields are in private preview and are available only to enabled accounts. Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. For example, {"categories":[{"key":"health"}],"rules":[{"category_key":"health","action":"exclude","entity_types":["Person"],"condition":"The statement names a person's health condition.","prohibited_examples":["Jordan has a chronic back condition."],"patterns":["diagnosed with"]}]}.
Parameters
----------
@@ -773,7 +919,7 @@ async def list_content_policy_revisions(
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncPager[ContentPolicy, ContentPolicyRevisionPage]:
"""
- Lists every revision of the project content policy, newest first, including revision 0.
+ Experimental: the request, the response, and the behavior of this operation can change. Lists every revision of the project content policy, newest first, including revision 0.
Parameters
----------
@@ -822,6 +968,8 @@ async def get_content_policy_revision(
self, revision_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
) -> ContentPolicy:
"""
+ Experimental: the request, the response, and the behavior of this operation can change.
+
Parameters
----------
revision_uuid : str
@@ -857,6 +1005,94 @@ async def main() -> None:
_response = await self._raw_client.get_content_policy_revision(revision_uuid, request_options=request_options)
return _response.data
+ async def get_inclusion_rules(self, *, request_options: typing.Optional[RequestOptions] = None) -> InclusionRules:
+ """
+ Returns the project rules, for example {"inclusion_rules":[],"inherited":false}.
+
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ InclusionRules
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from zep_cloud import AsyncZep
+
+ client = AsyncZep(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.project.get_inclusion_rules()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_inclusion_rules(request_options=request_options)
+ return _response.data
+
+ async def set_inclusion_rules(
+ self,
+ *,
+ inclusion_rules: typing.Optional[typing.Sequence[InclusionRule]] = OMIT,
+ inherited: typing.Optional[bool] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> InclusionRules:
+ """
+ Replaces the project rules. Request: {"inclusion_rules":[]}. Response: {"inclusion_rules":[],"inherited":false}.
+
+ Parameters
+ ----------
+ inclusion_rules : typing.Optional[typing.Sequence[InclusionRule]]
+ InclusionRules replaces the complete rule set at this scope.
+
+ inherited : typing.Optional[bool]
+ Inherited identifies a graph that uses project defaults.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ InclusionRules
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from zep_cloud import AsyncZep
+
+ client = AsyncZep(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.project.set_inclusion_rules()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.set_inclusion_rules(
+ inclusion_rules=inclusion_rules,
+ inherited=inherited,
+ idempotency_key=idempotency_key,
+ request_options=request_options,
+ )
+ return _response.data
+
async def get_instructions(self, *, request_options: typing.Optional[RequestOptions] = None) -> Instructions:
"""
Parameters
@@ -943,6 +1179,90 @@ async def main() -> None:
)
return _response.data
+ async def get_knowledge(self, *, request_options: typing.Optional[RequestOptions] = None) -> KnowledgeResponse:
+ """
+ Returns the domain knowledge in effect at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ KnowledgeResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from zep_cloud import AsyncZep
+
+ client = AsyncZep(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.project.get_knowledge()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_knowledge(request_options=request_options)
+ return _response.data
+
+ async def set_knowledge(
+ self,
+ *,
+ knowledge: typing.Optional[typing.Sequence[KnowledgeEntry]] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> KnowledgeResponse:
+ """
+ Replaces the complete set of domain knowledge entries at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+ Request example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}]}
+
+ Parameters
+ ----------
+ knowledge : typing.Optional[typing.Sequence[KnowledgeEntry]]
+ The complete set of domain knowledge entries. An empty list clears the scope.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ KnowledgeResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from zep_cloud import AsyncZep
+
+ client = AsyncZep(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.project.set_knowledge()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.set_knowledge(
+ knowledge=knowledge, idempotency_key=idempotency_key, request_options=request_options
+ )
+ return _response.data
+
async def get_observation_steering(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> ObservationSteering:
diff --git a/src/zep_cloud/project/raw_client.py b/src/zep_cloud/project/raw_client.py
index 6f17b043..46f4e800 100644
--- a/src/zep_cloud/project/raw_client.py
+++ b/src/zep_cloud/project/raw_client.py
@@ -26,7 +26,11 @@
from ..types.custom_instruction import CustomInstruction
from ..types.edge_type import EdgeType
from ..types.entity_type import EntityType
+from ..types.inclusion_rule import InclusionRule
+from ..types.inclusion_rules import InclusionRules
from ..types.instructions import Instructions
+from ..types.knowledge_entry import KnowledgeEntry
+from ..types.knowledge_response import KnowledgeResponse
from ..types.observation_steering import ObservationSteering
from ..types.observation_type import ObservationType
from ..types.ontology import Ontology
@@ -249,7 +253,7 @@ def get_content_policy(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[ContentPolicy]:
"""
- Returns the current content policy revision of the project. A new graph binds this revision at creation.
+ Experimental: the request, the response, and the behavior of this operation can change. Returns the current content policy revision of the project. A new graph binds this revision at creation.
Parameters
----------
@@ -320,7 +324,7 @@ def set_content_policy(
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ContentPolicy]:
"""
- Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. An empty policy (no categories and no rules) removes the content policy for new graphs.
+ Experimental: this operation and the new rule fields can change. The typed rule fields are in private preview and are available only to enabled accounts. Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. For example, {"categories":[{"key":"health"}],"rules":[{"category_key":"health","action":"exclude","entity_types":["Person"],"condition":"The statement names a person's health condition.","prohibited_examples":["Jordan has a chronic back condition."],"patterns":["diagnosed with"]}]}.
Parameters
----------
@@ -423,7 +427,7 @@ def list_content_policy_revisions(
request_options: typing.Optional[RequestOptions] = None,
) -> SyncPager[ContentPolicy, ContentPolicyRevisionPage]:
"""
- Lists every revision of the project content policy, newest first, including revision 0.
+ Experimental: the request, the response, and the behavior of this operation can change. Lists every revision of the project content policy, newest first, including revision 0.
Parameters
----------
@@ -518,6 +522,8 @@ def get_content_policy_revision(
self, revision_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
) -> HttpResponse[ContentPolicy]:
"""
+ Experimental: the request, the response, and the behavior of this operation can change.
+
Parameters
----------
revision_uuid : str
@@ -603,10 +609,12 @@ def get_content_policy_revision(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def get_instructions(
+ def get_inclusion_rules(
self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[Instructions]:
+ ) -> HttpResponse[InclusionRules]:
"""
+ Returns the project rules, for example {"inclusion_rules":[],"inherited":false}.
+
Parameters
----------
request_options : typing.Optional[RequestOptions]
@@ -614,20 +622,20 @@ def get_instructions(
Returns
-------
- HttpResponse[Instructions]
+ HttpResponse[InclusionRules]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- "project/instructions",
+ "project/inclusion-rules",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Instructions,
+ InclusionRules,
parse_obj_as(
- type_=Instructions, # type: ignore
+ type_=InclusionRules, # type: ignore
object_=_response.json(),
),
)
@@ -678,24 +686,24 @@ def get_instructions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def set_instructions(
+ def set_inclusion_rules(
self,
*,
+ inclusion_rules: typing.Optional[typing.Sequence[InclusionRule]] = OMIT,
inherited: typing.Optional[bool] = OMIT,
- instructions: typing.Optional[typing.Sequence[CustomInstruction]] = OMIT,
idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[Instructions]:
+ ) -> HttpResponse[InclusionRules]:
"""
+ Replaces the project rules. Request: {"inclusion_rules":[]}. Response: {"inclusion_rules":[],"inherited":false}.
+
Parameters
----------
- inherited : typing.Optional[bool]
- Whether this is the project's default value rather than an override set on
- this graph.
+ inclusion_rules : typing.Optional[typing.Sequence[InclusionRule]]
+ InclusionRules replaces the complete rule set at this scope.
- instructions : typing.Optional[typing.Sequence[CustomInstruction]]
- The custom extraction instructions in effect at this scope, each with a
- name and text.
+ inherited : typing.Optional[bool]
+ Inherited identifies a graph that uses project defaults.
idempotency_key : typing.Optional[str]
@@ -704,17 +712,17 @@ def set_instructions(
Returns
-------
- HttpResponse[Instructions]
+ HttpResponse[InclusionRules]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- "project/instructions",
+ "project/inclusion-rules",
method="PUT",
json={
- "inherited": inherited,
- "instructions": convert_and_respect_annotation_metadata(
- object_=instructions, annotation=typing.Sequence[CustomInstruction], direction="write"
+ "inclusion_rules": convert_and_respect_annotation_metadata(
+ object_=inclusion_rules, annotation=typing.Sequence[InclusionRule], direction="write"
),
+ "inherited": inherited,
},
headers={
"content-type": "application/json",
@@ -726,9 +734,9 @@ def set_instructions(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Instructions,
+ InclusionRules,
parse_obj_as(
- type_=Instructions, # type: ignore
+ type_=InclusionRules, # type: ignore
object_=_response.json(),
),
)
@@ -779,9 +787,9 @@ def set_instructions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def get_observation_steering(
+ def get_instructions(
self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[ObservationSteering]:
+ ) -> HttpResponse[Instructions]:
"""
Parameters
----------
@@ -790,20 +798,20 @@ def get_observation_steering(
Returns
-------
- HttpResponse[ObservationSteering]
+ HttpResponse[Instructions]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- "project/observation-steering",
+ "project/instructions",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- ObservationSteering,
+ Instructions,
parse_obj_as(
- type_=ObservationSteering, # type: ignore
+ type_=Instructions, # type: ignore
object_=_response.json(),
),
)
@@ -854,15 +862,14 @@ def get_observation_steering(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def set_observation_steering(
+ def set_instructions(
self,
*,
inherited: typing.Optional[bool] = OMIT,
- instruction: typing.Optional[str] = OMIT,
- types: typing.Optional[typing.Sequence[ObservationType]] = OMIT,
+ instructions: typing.Optional[typing.Sequence[CustomInstruction]] = OMIT,
idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[ObservationSteering]:
+ ) -> HttpResponse[Instructions]:
"""
Parameters
----------
@@ -870,13 +877,9 @@ def set_observation_steering(
Whether this is the project's default value rather than an override set on
this graph.
- instruction : typing.Optional[str]
- The natural-language instruction steering how observations are generated
- at this scope.
-
- types : typing.Optional[typing.Sequence[ObservationType]]
- The named observation types, each with a description, that generation
- should steer toward at this scope.
+ instructions : typing.Optional[typing.Sequence[CustomInstruction]]
+ The custom extraction instructions in effect at this scope, each with a
+ name and text.
idempotency_key : typing.Optional[str]
@@ -885,17 +888,16 @@ def set_observation_steering(
Returns
-------
- HttpResponse[ObservationSteering]
+ HttpResponse[Instructions]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- "project/observation-steering",
+ "project/instructions",
method="PUT",
json={
"inherited": inherited,
- "instruction": instruction,
- "types": convert_and_respect_annotation_metadata(
- object_=types, annotation=typing.Sequence[ObservationType], direction="write"
+ "instructions": convert_and_respect_annotation_metadata(
+ object_=instructions, annotation=typing.Sequence[CustomInstruction], direction="write"
),
},
headers={
@@ -908,9 +910,9 @@ def set_observation_steering(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- ObservationSteering,
+ Instructions,
parse_obj_as(
- type_=ObservationSteering, # type: ignore
+ type_=Instructions, # type: ignore
object_=_response.json(),
),
)
@@ -961,8 +963,13 @@ def set_observation_steering(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def get_ontology(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Ontology]:
+ def get_knowledge(
+ self, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[KnowledgeResponse]:
"""
+ Returns the domain knowledge in effect at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+
Parameters
----------
request_options : typing.Optional[RequestOptions]
@@ -970,20 +977,20 @@ def get_ontology(self, *, request_options: typing.Optional[RequestOptions] = Non
Returns
-------
- HttpResponse[Ontology]
+ HttpResponse[KnowledgeResponse]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- "project/ontology",
+ "project/knowledge",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Ontology,
+ KnowledgeResponse,
parse_obj_as(
- type_=Ontology, # type: ignore
+ type_=KnowledgeResponse, # type: ignore
object_=_response.json(),
),
)
@@ -1034,37 +1041,22 @@ def get_ontology(self, *, request_options: typing.Optional[RequestOptions] = Non
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def set_ontology(
+ def set_knowledge(
self,
*,
- edge_type_hierarchy: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- edge_types: typing.Optional[typing.Sequence[EdgeType]] = OMIT,
- entity_type_hierarchy: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
- entity_types: typing.Optional[typing.Sequence[EntityType]] = OMIT,
- inherited: typing.Optional[bool] = OMIT,
+ knowledge: typing.Optional[typing.Sequence[KnowledgeEntry]] = OMIT,
idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[Ontology]:
+ ) -> HttpResponse[KnowledgeResponse]:
"""
- Replaces the entity types and the edge types that the project uses.
+ Replaces the complete set of domain knowledge entries at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+ Request example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}]}
Parameters
----------
- edge_type_hierarchy : typing.Optional[typing.Dict[str, typing.Any]]
- The edge type hierarchy. Omitted when the ontology has no edge subtypes.
-
- edge_types : typing.Optional[typing.Sequence[EdgeType]]
- The edge types defined in the ontology in effect at this scope.
-
- entity_type_hierarchy : typing.Optional[typing.Dict[str, typing.Any]]
- The entity type hierarchy. Omitted when the ontology has no entity subtypes.
-
- entity_types : typing.Optional[typing.Sequence[EntityType]]
- The entity types defined in the ontology in effect at this scope.
-
- inherited : typing.Optional[bool]
- Whether this is the project's default value rather than an override set on
- this graph.
+ knowledge : typing.Optional[typing.Sequence[KnowledgeEntry]]
+ The complete set of domain knowledge entries. An empty list clears the scope.
idempotency_key : typing.Optional[str]
@@ -1073,22 +1065,16 @@ def set_ontology(
Returns
-------
- HttpResponse[Ontology]
+ HttpResponse[KnowledgeResponse]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- "project/ontology",
+ "project/knowledge",
method="PUT",
json={
- "edge_type_hierarchy": edge_type_hierarchy,
- "edge_types": convert_and_respect_annotation_metadata(
- object_=edge_types, annotation=typing.Sequence[EdgeType], direction="write"
+ "knowledge": convert_and_respect_annotation_metadata(
+ object_=knowledge, annotation=typing.Sequence[KnowledgeEntry], direction="write"
),
- "entity_type_hierarchy": entity_type_hierarchy,
- "entity_types": convert_and_respect_annotation_metadata(
- object_=entity_types, annotation=typing.Sequence[EntityType], direction="write"
- ),
- "inherited": inherited,
},
headers={
"content-type": "application/json",
@@ -1100,9 +1086,9 @@ def set_ontology(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Ontology,
+ KnowledgeResponse,
parse_obj_as(
- type_=Ontology, # type: ignore
+ type_=KnowledgeResponse, # type: ignore
object_=_response.json(),
),
)
@@ -1153,9 +1139,9 @@ def set_ontology(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def get_user_summary_instructions(
+ def get_observation_steering(
self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[UserSummaryInstructions]:
+ ) -> HttpResponse[ObservationSteering]:
"""
Parameters
----------
@@ -1164,20 +1150,20 @@ def get_user_summary_instructions(
Returns
-------
- HttpResponse[UserSummaryInstructions]
+ HttpResponse[ObservationSteering]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- "project/user-summary-instructions",
+ "project/observation-steering",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- UserSummaryInstructions,
+ ObservationSteering,
parse_obj_as(
- type_=UserSummaryInstructions, # type: ignore
+ type_=ObservationSteering, # type: ignore
object_=_response.json(),
),
)
@@ -1228,14 +1214,15 @@ def get_user_summary_instructions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- def set_user_summary_instructions(
+ def set_observation_steering(
self,
*,
inherited: typing.Optional[bool] = OMIT,
- instructions: typing.Optional[typing.Sequence[UserInstruction]] = OMIT,
+ instruction: typing.Optional[str] = OMIT,
+ types: typing.Optional[typing.Sequence[ObservationType]] = OMIT,
idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> HttpResponse[UserSummaryInstructions]:
+ ) -> HttpResponse[ObservationSteering]:
"""
Parameters
----------
@@ -1243,9 +1230,13 @@ def set_user_summary_instructions(
Whether this is the project's default value rather than an override set on
this graph.
- instructions : typing.Optional[typing.Sequence[UserInstruction]]
- The custom instructions used when generating a user's summary at this
- scope, each with a name and text.
+ instruction : typing.Optional[str]
+ The natural-language instruction steering how observations are generated
+ at this scope.
+
+ types : typing.Optional[typing.Sequence[ObservationType]]
+ The named observation types, each with a description, that generation
+ should steer toward at this scope.
idempotency_key : typing.Optional[str]
@@ -1254,16 +1245,17 @@ def set_user_summary_instructions(
Returns
-------
- HttpResponse[UserSummaryInstructions]
+ HttpResponse[ObservationSteering]
OK
"""
_response = self._client_wrapper.httpx_client.request(
- "project/user-summary-instructions",
+ "project/observation-steering",
method="PUT",
json={
"inherited": inherited,
- "instructions": convert_and_respect_annotation_metadata(
- object_=instructions, annotation=typing.Sequence[UserInstruction], direction="write"
+ "instruction": instruction,
+ "types": convert_and_respect_annotation_metadata(
+ object_=types, annotation=typing.Sequence[ObservationType], direction="write"
),
},
headers={
@@ -1276,9 +1268,9 @@ def set_user_summary_instructions(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- UserSummaryInstructions,
+ ObservationSteering,
parse_obj_as(
- type_=UserSummaryInstructions, # type: ignore
+ type_=ObservationSteering, # type: ignore
object_=_response.json(),
),
)
@@ -1329,12 +1321,7 @@ def set_user_summary_instructions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
-
-class AsyncRawProjectClient:
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
- self._client_wrapper = client_wrapper
-
- async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[Project]:
+ def get_ontology(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Ontology]:
"""
Parameters
----------
@@ -1343,24 +1330,809 @@ async def get(self, *, request_options: typing.Optional[RequestOptions] = None)
Returns
-------
- AsyncHttpResponse[Project]
+ HttpResponse[Ontology]
OK
"""
- _response = await self._client_wrapper.httpx_client.request(
- "project",
+ _response = self._client_wrapper.httpx_client.request(
+ "project/ontology",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Project,
+ Ontology,
parse_obj_as(
- type_=Project, # type: ignore
+ type_=Ontology, # type: ignore
object_=_response.json(),
),
)
- return AsyncHttpResponse(response=_response, data=_data)
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ def set_ontology(
+ self,
+ *,
+ edge_type_hierarchy: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
+ edge_types: typing.Optional[typing.Sequence[EdgeType]] = OMIT,
+ entity_type_hierarchy: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
+ entity_types: typing.Optional[typing.Sequence[EntityType]] = OMIT,
+ inherited: typing.Optional[bool] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[Ontology]:
+ """
+ Replaces the entity types and the edge types that the project uses.
+
+ Parameters
+ ----------
+ edge_type_hierarchy : typing.Optional[typing.Dict[str, typing.Any]]
+ The edge type hierarchy. Omitted when the ontology has no edge subtypes.
+
+ edge_types : typing.Optional[typing.Sequence[EdgeType]]
+ The edge types defined in the ontology in effect at this scope.
+
+ entity_type_hierarchy : typing.Optional[typing.Dict[str, typing.Any]]
+ The entity type hierarchy. Omitted when the ontology has no entity subtypes.
+
+ entity_types : typing.Optional[typing.Sequence[EntityType]]
+ The entity types defined in the ontology in effect at this scope.
+
+ inherited : typing.Optional[bool]
+ Whether this is the project's default value rather than an override set on
+ this graph.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[Ontology]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "project/ontology",
+ method="PUT",
+ json={
+ "edge_type_hierarchy": edge_type_hierarchy,
+ "edge_types": convert_and_respect_annotation_metadata(
+ object_=edge_types, annotation=typing.Sequence[EdgeType], direction="write"
+ ),
+ "entity_type_hierarchy": entity_type_hierarchy,
+ "entity_types": convert_and_respect_annotation_metadata(
+ object_=entity_types, annotation=typing.Sequence[EntityType], direction="write"
+ ),
+ "inherited": inherited,
+ },
+ headers={
+ "content-type": "application/json",
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Ontology,
+ parse_obj_as(
+ type_=Ontology, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ def get_user_summary_instructions(
+ self, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[UserSummaryInstructions]:
+ """
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[UserSummaryInstructions]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "project/user-summary-instructions",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ UserSummaryInstructions,
+ parse_obj_as(
+ type_=UserSummaryInstructions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ def set_user_summary_instructions(
+ self,
+ *,
+ inherited: typing.Optional[bool] = OMIT,
+ instructions: typing.Optional[typing.Sequence[UserInstruction]] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> HttpResponse[UserSummaryInstructions]:
+ """
+ Parameters
+ ----------
+ inherited : typing.Optional[bool]
+ Whether this is the project's default value rather than an override set on
+ this graph.
+
+ instructions : typing.Optional[typing.Sequence[UserInstruction]]
+ The custom instructions used when generating a user's summary at this
+ scope, each with a name and text.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[UserSummaryInstructions]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "project/user-summary-instructions",
+ method="PUT",
+ json={
+ "inherited": inherited,
+ "instructions": convert_and_respect_annotation_metadata(
+ object_=instructions, annotation=typing.Sequence[UserInstruction], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ UserSummaryInstructions,
+ parse_obj_as(
+ type_=UserSummaryInstructions, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+
+class AsyncRawProjectClient:
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
+ self._client_wrapper = client_wrapper
+
+ async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> AsyncHttpResponse[Project]:
+ """
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[Project]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "project",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Project,
+ parse_obj_as(
+ type_=Project, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ async def update(
+ self,
+ *,
+ default_time_zone: typing.Optional[str] = OMIT,
+ hyperedges_enabled: typing.Optional[bool] = OMIT,
+ include_policy_violating_episodes: typing.Optional[bool] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[Project]:
+ """
+ Set `hyperedges_enabled` to `true` to enable extraction. A member needs the `project.edit` permission. Project API keys receive `403 permission_denied`.
+
+ Parameters
+ ----------
+ default_time_zone : typing.Optional[str]
+ The project's IANA fallback time zone. Set to null to clear the existing
+ value.
+
+ hyperedges_enabled : typing.Optional[bool]
+ Set to true to enable hyperedge extraction. This setting cannot be disabled.
+ A member needs project.edit. Project API keys receive 403 permission_denied.
+
+ include_policy_violating_episodes : typing.Optional[bool]
+ When true, episode reads on graphs with a content policy include the
+ episodes that violated the policy.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[Project]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "project",
+ method="PATCH",
+ json={
+ "default_time_zone": default_time_zone,
+ "hyperedges_enabled": hyperedges_enabled,
+ "include_policy_violating_episodes": include_policy_violating_episodes,
+ },
+ headers={
+ "content-type": "application/json",
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ Project,
+ parse_obj_as(
+ type_=Project, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ async def get_content_policy(
+ self, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[ContentPolicy]:
+ """
+ Experimental: the request, the response, and the behavior of this operation can change. Returns the current content policy revision of the project. A new graph binds this revision at creation.
+
+ Parameters
+ ----------
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[ContentPolicy]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "project/content-policy",
+ method="GET",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ ContentPolicy,
+ parse_obj_as(
+ type_=ContentPolicy, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ async def set_content_policy(
+ self,
+ *,
+ categories: typing.Optional[typing.Sequence[ContentPolicyCategoryRequest]] = OMIT,
+ rules: typing.Optional[typing.Sequence[ContentPolicyRuleRequest]] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[ContentPolicy]:
+ """
+ Experimental: this operation and the new rule fields can change. The typed rule fields are in private preview and are available only to enabled accounts. Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. For example, {"categories":[{"key":"health"}],"rules":[{"category_key":"health","action":"exclude","entity_types":["Person"],"condition":"The statement names a person's health condition.","prohibited_examples":["Jordan has a chronic back condition."],"patterns":["diagnosed with"]}]}.
+
+ Parameters
+ ----------
+ categories : typing.Optional[typing.Sequence[ContentPolicyCategoryRequest]]
+ The categories of the policy. Maximum 16. An empty list with no rules
+ means no content policy.
+
+ rules : typing.Optional[typing.Sequence[ContentPolicyRuleRequest]]
+ The rules of the policy. Maximum 32.
+
+ idempotency_key : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[ContentPolicy]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "project/content-policy",
+ method="PUT",
+ json={
+ "categories": convert_and_respect_annotation_metadata(
+ object_=categories, annotation=typing.Sequence[ContentPolicyCategoryRequest], direction="write"
+ ),
+ "rules": convert_and_respect_annotation_metadata(
+ object_=rules, annotation=typing.Sequence[ContentPolicyRuleRequest], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ ContentPolicy,
+ parse_obj_as(
+ type_=ContentPolicy, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ async def list_content_policy_revisions(
+ self,
+ *,
+ page_size: typing.Optional[int] = None,
+ cursor: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncPager[ContentPolicy, ContentPolicyRevisionPage]:
+ """
+ Experimental: the request, the response, and the behavior of this operation can change. Lists every revision of the project content policy, newest first, including revision 0.
+
+ Parameters
+ ----------
+ page_size : typing.Optional[int]
+ The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages.
+
+ cursor : typing.Optional[str]
+ Opaque page cursor
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncPager[ContentPolicy, ContentPolicyRevisionPage]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "project/content-policy/revisions",
+ method="GET",
+ params={
+ "page_size": page_size,
+ "cursor": cursor,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _parsed_response = typing.cast(
+ ContentPolicyRevisionPage,
+ parse_obj_as(
+ type_=ContentPolicyRevisionPage, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ _items = _parsed_response.items
+ _parsed_next = _parsed_response.next_cursor
+ _has_next = _parsed_next is not None and _parsed_next != ""
+
+ async def _get_next():
+ return await self.list_content_policy_revisions(
+ page_size=page_size,
+ cursor=_parsed_next,
+ request_options=request_options,
+ )
+
+ return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -1383,8 +2155,8 @@ async def get(self, *, request_options: typing.Optional[RequestOptions] = None)
),
),
)
- if _response.status_code == 404:
- raise NotFoundError(
+ if _response.status_code == 403:
+ raise ForbiddenError(
headers=dict(_response.headers),
body=typing.cast(
types_api_error_ApiError,
@@ -1407,63 +2179,36 @@ async def get(self, *, request_options: typing.Optional[RequestOptions] = None)
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def update(
- self,
- *,
- default_time_zone: typing.Optional[str] = OMIT,
- hyperedges_enabled: typing.Optional[bool] = OMIT,
- include_policy_violating_episodes: typing.Optional[bool] = OMIT,
- idempotency_key: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[Project]:
+ async def get_content_policy_revision(
+ self, revision_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[ContentPolicy]:
"""
- Set `hyperedges_enabled` to `true` to enable extraction. A member needs the `project.edit` permission. Project API keys receive `403 permission_denied`.
+ Experimental: the request, the response, and the behavior of this operation can change.
Parameters
----------
- default_time_zone : typing.Optional[str]
- The project's IANA fallback time zone. Set to null to clear the existing
- value.
-
- hyperedges_enabled : typing.Optional[bool]
- Set to true to enable hyperedge extraction. This setting cannot be disabled.
- A member needs project.edit. Project API keys receive 403 permission_denied.
-
- include_policy_violating_episodes : typing.Optional[bool]
- When true, episode reads on graphs with a content policy include the
- episodes that violated the policy.
-
- idempotency_key : typing.Optional[str]
+ revision_uuid : str
+ Revision UUID
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[Project]
+ AsyncHttpResponse[ContentPolicy]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- "project",
- method="PATCH",
- json={
- "default_time_zone": default_time_zone,
- "hyperedges_enabled": hyperedges_enabled,
- "include_policy_violating_episodes": include_policy_violating_episodes,
- },
- headers={
- "content-type": "application/json",
- "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
- },
+ f"project/content-policy/revisions/{encode_path_param(revision_uuid)}",
+ method="GET",
request_options=request_options,
- omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Project,
+ ContentPolicy,
parse_obj_as(
- type_=Project, # type: ignore
+ type_=ContentPolicy, # type: ignore
object_=_response.json(),
),
)
@@ -1512,17 +2257,6 @@ async def update(
),
),
)
- if _response.status_code == 409:
- raise ConflictError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
_response_json = _response.json()
except JSONDecodeError:
raise core_api_error_ApiError(
@@ -1536,11 +2270,11 @@ async def update(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def get_content_policy(
+ async def get_inclusion_rules(
self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[ContentPolicy]:
+ ) -> AsyncHttpResponse[InclusionRules]:
"""
- Returns the current content policy revision of the project. A new graph binds this revision at creation.
+ Returns the project rules, for example {"inclusion_rules":[],"inherited":false}.
Parameters
----------
@@ -1549,24 +2283,35 @@ async def get_content_policy(
Returns
-------
- AsyncHttpResponse[ContentPolicy]
+ AsyncHttpResponse[InclusionRules]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- "project/content-policy",
+ "project/inclusion-rules",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- ContentPolicy,
+ InclusionRules,
parse_obj_as(
- type_=ContentPolicy, # type: ignore
+ type_=InclusionRules, # type: ignore
object_=_response.json(),
),
)
return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 401:
raise UnauthorizedError(
headers=dict(_response.headers),
@@ -1578,8 +2323,8 @@ async def get_content_policy(
),
),
)
- if _response.status_code == 403:
- raise ForbiddenError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
types_api_error_ApiError,
@@ -1602,25 +2347,24 @@ async def get_content_policy(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def set_content_policy(
+ async def set_inclusion_rules(
self,
*,
- categories: typing.Optional[typing.Sequence[ContentPolicyCategoryRequest]] = OMIT,
- rules: typing.Optional[typing.Sequence[ContentPolicyRuleRequest]] = OMIT,
+ inclusion_rules: typing.Optional[typing.Sequence[InclusionRule]] = OMIT,
+ inherited: typing.Optional[bool] = OMIT,
idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[ContentPolicy]:
+ ) -> AsyncHttpResponse[InclusionRules]:
"""
- Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. An empty policy (no categories and no rules) removes the content policy for new graphs.
+ Replaces the project rules. Request: {"inclusion_rules":[]}. Response: {"inclusion_rules":[],"inherited":false}.
Parameters
----------
- categories : typing.Optional[typing.Sequence[ContentPolicyCategoryRequest]]
- The categories of the policy. Maximum 16. An empty list with no rules
- means no content policy.
+ inclusion_rules : typing.Optional[typing.Sequence[InclusionRule]]
+ InclusionRules replaces the complete rule set at this scope.
- rules : typing.Optional[typing.Sequence[ContentPolicyRuleRequest]]
- The rules of the policy. Maximum 32.
+ inherited : typing.Optional[bool]
+ Inherited identifies a graph that uses project defaults.
idempotency_key : typing.Optional[str]
@@ -1629,19 +2373,17 @@ async def set_content_policy(
Returns
-------
- AsyncHttpResponse[ContentPolicy]
+ AsyncHttpResponse[InclusionRules]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- "project/content-policy",
+ "project/inclusion-rules",
method="PUT",
json={
- "categories": convert_and_respect_annotation_metadata(
- object_=categories, annotation=typing.Sequence[ContentPolicyCategoryRequest], direction="write"
- ),
- "rules": convert_and_respect_annotation_metadata(
- object_=rules, annotation=typing.Sequence[ContentPolicyRuleRequest], direction="write"
+ "inclusion_rules": convert_and_respect_annotation_metadata(
+ object_=inclusion_rules, annotation=typing.Sequence[InclusionRule], direction="write"
),
+ "inherited": inherited,
},
headers={
"content-type": "application/json",
@@ -1653,9 +2395,9 @@ async def set_content_policy(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- ContentPolicy,
+ InclusionRules,
parse_obj_as(
- type_=ContentPolicy, # type: ignore
+ type_=InclusionRules, # type: ignore
object_=_response.json(),
),
)
@@ -1682,8 +2424,8 @@ async def set_content_policy(
),
),
)
- if _response.status_code == 403:
- raise ForbiddenError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
types_api_error_ApiError,
@@ -1706,62 +2448,35 @@ async def set_content_policy(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def list_content_policy_revisions(
- self,
- *,
- page_size: typing.Optional[int] = None,
- cursor: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncPager[ContentPolicy, ContentPolicyRevisionPage]:
+ async def get_instructions(
+ self, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[Instructions]:
"""
- Lists every revision of the project content policy, newest first, including revision 0.
-
Parameters
----------
- page_size : typing.Optional[int]
- The maximum number of items in one page. The SDK method returns a pager. In Python, `.items` holds only the first page. In TypeScript, `.data` holds only the first page. To read every page, iterate the pager: use `for` or `list(...)` in Python, or `for await` in TypeScript. In Go, the method returns one page, and `Iterator()` reads all pages.
-
- cursor : typing.Optional[str]
- Opaque page cursor
-
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncPager[ContentPolicy, ContentPolicyRevisionPage]
+ AsyncHttpResponse[Instructions]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- "project/content-policy/revisions",
+ "project/instructions",
method="GET",
- params={
- "page_size": page_size,
- "cursor": cursor,
- },
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
- _parsed_response = typing.cast(
- ContentPolicyRevisionPage,
+ _data = typing.cast(
+ Instructions,
parse_obj_as(
- type_=ContentPolicyRevisionPage, # type: ignore
+ type_=Instructions, # type: ignore
object_=_response.json(),
),
)
- _items = _parsed_response.items
- _parsed_next = _parsed_response.next_cursor
- _has_next = _parsed_next is not None and _parsed_next != ""
-
- async def _get_next():
- return await self.list_content_policy_revisions(
- page_size=page_size,
- cursor=_parsed_next,
- request_options=request_options,
- )
-
- return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
+ return AsyncHttpResponse(response=_response, data=_data)
if _response.status_code == 400:
raise BadRequestError(
headers=dict(_response.headers),
@@ -1784,8 +2499,8 @@ async def _get_next():
),
),
)
- if _response.status_code == 403:
- raise ForbiddenError(
+ if _response.status_code == 404:
+ raise NotFoundError(
headers=dict(_response.headers),
body=typing.cast(
types_api_error_ApiError,
@@ -1808,34 +2523,57 @@ async def _get_next():
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def get_content_policy_revision(
- self, revision_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[ContentPolicy]:
+ async def set_instructions(
+ self,
+ *,
+ inherited: typing.Optional[bool] = OMIT,
+ instructions: typing.Optional[typing.Sequence[CustomInstruction]] = OMIT,
+ idempotency_key: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> AsyncHttpResponse[Instructions]:
"""
Parameters
----------
- revision_uuid : str
- Revision UUID
+ inherited : typing.Optional[bool]
+ Whether this is the project's default value rather than an override set on
+ this graph.
+
+ instructions : typing.Optional[typing.Sequence[CustomInstruction]]
+ The custom extraction instructions in effect at this scope, each with a
+ name and text.
+
+ idempotency_key : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- AsyncHttpResponse[ContentPolicy]
+ AsyncHttpResponse[Instructions]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- f"project/content-policy/revisions/{encode_path_param(revision_uuid)}",
- method="GET",
+ "project/instructions",
+ method="PUT",
+ json={
+ "inherited": inherited,
+ "instructions": convert_and_respect_annotation_metadata(
+ object_=instructions, annotation=typing.Sequence[CustomInstruction], direction="write"
+ ),
+ },
+ headers={
+ "content-type": "application/json",
+ "Idempotency-Key": str(idempotency_key) if idempotency_key is not None else generate_idempotency_key(),
+ },
request_options=request_options,
+ omit=OMIT,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- ContentPolicy,
+ Instructions,
parse_obj_as(
- type_=ContentPolicy, # type: ignore
+ type_=Instructions, # type: ignore
object_=_response.json(),
),
)
@@ -1862,17 +2600,6 @@ async def get_content_policy_revision(
),
),
)
- if _response.status_code == 403:
- raise ForbiddenError(
- headers=dict(_response.headers),
- body=typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
@@ -1897,10 +2624,13 @@ async def get_content_policy_revision(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def get_instructions(
+ async def get_knowledge(
self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[Instructions]:
+ ) -> AsyncHttpResponse[KnowledgeResponse]:
"""
+ Returns the domain knowledge in effect at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+
Parameters
----------
request_options : typing.Optional[RequestOptions]
@@ -1908,20 +2638,20 @@ async def get_instructions(
Returns
-------
- AsyncHttpResponse[Instructions]
+ AsyncHttpResponse[KnowledgeResponse]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- "project/instructions",
+ "project/knowledge",
method="GET",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Instructions,
+ KnowledgeResponse,
parse_obj_as(
- type_=Instructions, # type: ignore
+ type_=KnowledgeResponse, # type: ignore
object_=_response.json(),
),
)
@@ -1972,24 +2702,22 @@ async def get_instructions(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
- async def set_instructions(
+ async def set_knowledge(
self,
*,
- inherited: typing.Optional[bool] = OMIT,
- instructions: typing.Optional[typing.Sequence[CustomInstruction]] = OMIT,
+ knowledge: typing.Optional[typing.Sequence[KnowledgeEntry]] = OMIT,
idempotency_key: typing.Optional[str] = None,
request_options: typing.Optional[RequestOptions] = None,
- ) -> AsyncHttpResponse[Instructions]:
+ ) -> AsyncHttpResponse[KnowledgeResponse]:
"""
+ Replaces the complete set of domain knowledge entries at this scope. The knowledge_api account flag must be enabled.
+ Response example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}],"inherited":false}
+ Request example: {"knowledge":[{"name":"CRM","text":"CRM means the customer service."}]}
+
Parameters
----------
- inherited : typing.Optional[bool]
- Whether this is the project's default value rather than an override set on
- this graph.
-
- instructions : typing.Optional[typing.Sequence[CustomInstruction]]
- The custom extraction instructions in effect at this scope, each with a
- name and text.
+ knowledge : typing.Optional[typing.Sequence[KnowledgeEntry]]
+ The complete set of domain knowledge entries. An empty list clears the scope.
idempotency_key : typing.Optional[str]
@@ -1998,16 +2726,15 @@ async def set_instructions(
Returns
-------
- AsyncHttpResponse[Instructions]
+ AsyncHttpResponse[KnowledgeResponse]
OK
"""
_response = await self._client_wrapper.httpx_client.request(
- "project/instructions",
+ "project/knowledge",
method="PUT",
json={
- "inherited": inherited,
- "instructions": convert_and_respect_annotation_metadata(
- object_=instructions, annotation=typing.Sequence[CustomInstruction], direction="write"
+ "knowledge": convert_and_respect_annotation_metadata(
+ object_=knowledge, annotation=typing.Sequence[KnowledgeEntry], direction="write"
),
},
headers={
@@ -2020,9 +2747,9 @@ async def set_instructions(
try:
if 200 <= _response.status_code < 300:
_data = typing.cast(
- Instructions,
+ KnowledgeResponse,
parse_obj_as(
- type_=Instructions, # type: ignore
+ type_=KnowledgeResponse, # type: ignore
object_=_response.json(),
),
)
@@ -2436,6 +3163,17 @@ async def set_ontology(
),
),
)
+ if _response.status_code == 409:
+ raise ConflictError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
_response_json = _response.json()
except JSONDecodeError:
raise core_api_error_ApiError(
diff --git a/src/zep_cloud/thread/raw_client.py b/src/zep_cloud/thread/raw_client.py
index 5f52da9e..ce4fe860 100644
--- a/src/zep_cloud/thread/raw_client.py
+++ b/src/zep_cloud/thread/raw_client.py
@@ -966,6 +966,17 @@ def add_messages(
),
),
)
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
@@ -2029,6 +2040,17 @@ async def add_messages(
),
),
)
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 404:
raise NotFoundError(
headers=dict(_response.headers),
diff --git a/src/zep_cloud/trace_connection/client.py b/src/zep_cloud/trace_connection/client.py
index 37031f68..de577bf5 100644
--- a/src/zep_cloud/trace_connection/client.py
+++ b/src/zep_cloud/trace_connection/client.py
@@ -229,7 +229,7 @@ def update(
request_options: typing.Optional[RequestOptions] = None,
) -> TraceConnection:
"""
- Verify changed settings before Zep stores them. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: `{"requests_per_minute":60,"retention_days":30}`.
+ Verify changed settings before Zep stores them. A request that changes `api_url` must also include `credential`. Otherwise Zep returns `400 invalid_request`. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: `{"requests_per_minute":60,"retention_days":30}`.
Parameters
----------
@@ -238,6 +238,7 @@ def update(
api_url : typing.Optional[str]
APIURL is the new custom provider endpoint, when supplied.
+ A request that changes api_url must also include credential.
credential : typing.Optional[str]
Credential is the new write-only provider credential, when supplied.
@@ -587,7 +588,7 @@ async def update(
request_options: typing.Optional[RequestOptions] = None,
) -> TraceConnection:
"""
- Verify changed settings before Zep stores them. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: `{"requests_per_minute":60,"retention_days":30}`.
+ Verify changed settings before Zep stores them. A request that changes `api_url` must also include `credential`. Otherwise Zep returns `400 invalid_request`. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: `{"requests_per_minute":60,"retention_days":30}`.
Parameters
----------
@@ -596,6 +597,7 @@ async def update(
api_url : typing.Optional[str]
APIURL is the new custom provider endpoint, when supplied.
+ A request that changes api_url must also include credential.
credential : typing.Optional[str]
Credential is the new write-only provider credential, when supplied.
diff --git a/src/zep_cloud/trace_connection/raw_client.py b/src/zep_cloud/trace_connection/raw_client.py
index 474b1d53..b85585dd 100644
--- a/src/zep_cloud/trace_connection/raw_client.py
+++ b/src/zep_cloud/trace_connection/raw_client.py
@@ -435,7 +435,7 @@ def update(
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[TraceConnection]:
"""
- Verify changed settings before Zep stores them. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: `{"requests_per_minute":60,"retention_days":30}`.
+ Verify changed settings before Zep stores them. A request that changes `api_url` must also include `credential`. Otherwise Zep returns `400 invalid_request`. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: `{"requests_per_minute":60,"retention_days":30}`.
Parameters
----------
@@ -444,6 +444,7 @@ def update(
api_url : typing.Optional[str]
APIURL is the new custom provider endpoint, when supplied.
+ A request that changes api_url must also include credential.
credential : typing.Optional[str]
Credential is the new write-only provider credential, when supplied.
@@ -1095,7 +1096,7 @@ async def update(
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[TraceConnection]:
"""
- Verify changed settings before Zep stores them. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: `{"requests_per_minute":60,"retention_days":30}`.
+ Verify changed settings before Zep stores them. A request that changes `api_url` must also include `credential`. Otherwise Zep returns `400 invalid_request`. Both providers accept 1 to 60 requests per minute and an optional retention window. Example request: `{"requests_per_minute":60,"retention_days":30}`.
Parameters
----------
@@ -1104,6 +1105,7 @@ async def update(
api_url : typing.Optional[str]
APIURL is the new custom provider endpoint, when supplied.
+ A request that changes api_url must also include credential.
credential : typing.Optional[str]
Credential is the new write-only provider credential, when supplied.
diff --git a/src/zep_cloud/types/__init__.py b/src/zep_cloud/types/__init__.py
index 562500e6..96a030e4 100644
--- a/src/zep_cloud/types/__init__.py
+++ b/src/zep_cloud/types/__init__.py
@@ -133,6 +133,8 @@
from .async_result import AsyncResult
from .batch import Batch
from .batch_item import BatchItem
+ from .batch_item_error import BatchItemError
+ from .batch_item_error_code import BatchItemErrorCode
from .batch_item_input import BatchItemInput
from .batch_item_input_data_type import BatchItemInputDataType
from .batch_item_input_role import BatchItemInputRole
@@ -155,9 +157,12 @@
from .content_policy_event_list_filters import ContentPolicyEventListFilters
from .content_policy_event_list_filters_drop_reason import ContentPolicyEventListFiltersDropReason
from .content_policy_event_page import ContentPolicyEventPage
+ from .content_policy_matched_by import ContentPolicyMatchedBy
from .content_policy_revision_page import ContentPolicyRevisionPage
from .content_policy_rule import ContentPolicyRule
+ from .content_policy_rule_action import ContentPolicyRuleAction
from .content_policy_rule_request import ContentPolicyRuleRequest
+ from .content_policy_rule_request_action import ContentPolicyRuleRequestAction
from .context_edge import ContextEdge
from .context_episode import ContextEpisode
from .context_node import ContextNode
@@ -200,6 +205,7 @@
from .episode_list_filters import EpisodeListFilters
from .episode_page import EpisodePage
from .episode_search_filters import EpisodeSearchFilters
+ from .episode_wait_status import EpisodeWaitStatus
from .error_body import ErrorBody
from .graph import Graph
from .graph_content_policy import GraphContentPolicy
@@ -222,6 +228,7 @@
from .graph_query_plan_step import GraphQueryPlanStep
from .graph_query_reasoning_event import GraphQueryReasoningEvent
from .graph_query_response import GraphQueryResponse
+ from .graph_query_response_answer_status import GraphQueryResponseAnswerStatus
from .graph_query_result_event import GraphQueryResultEvent
from .graph_query_results import GraphQueryResults
from .graph_query_started_event import GraphQueryStartedEvent
@@ -246,7 +253,13 @@
from .hyperedge_list_filters import HyperedgeListFilters
from .hyperedge_page import HyperedgePage
from .imported_trace_reference import ImportedTraceReference
+ from .inclusion_rule import InclusionRule
+ from .inclusion_rule_effect import InclusionRuleEffect
+ from .inclusion_rule_target import InclusionRuleTarget
+ from .inclusion_rules import InclusionRules
from .ingestion_trace import IngestionTrace
+ from .ingestion_trace_candidate_outcome import IngestionTraceCandidateOutcome
+ from .ingestion_trace_candidate_outcome_outcome import IngestionTraceCandidateOutcomeOutcome
from .ingestion_trace_edge import IngestionTraceEdge
from .ingestion_trace_edge_invalidation import IngestionTraceEdgeInvalidation
from .ingestion_trace_edge_reference import IngestionTraceEdgeReference
@@ -262,6 +275,8 @@
from .ingestion_trace_status import IngestionTraceStatus
from .ingestion_trace_step import IngestionTraceStep
from .instructions import Instructions
+ from .knowledge_entry import KnowledgeEntry
+ from .knowledge_response import KnowledgeResponse
from .lookup_batch_response import LookupBatchResponse
from .lookup_item import LookupItem
from .lookup_item_resource_type import LookupItemResourceType
@@ -312,6 +327,7 @@
from .role_type import RoleType
from .search_filters import SearchFilters
from .search_list_request import SearchListRequest
+ from .set_knowledge_request import SetKnowledgeRequest
from .skill_definition import SkillDefinition
from .skill_definition_section import SkillDefinitionSection
from .skill_failure import SkillFailure
@@ -509,6 +525,8 @@
"AsyncResult": ".async_result",
"Batch": ".batch",
"BatchItem": ".batch_item",
+ "BatchItemError": ".batch_item_error",
+ "BatchItemErrorCode": ".batch_item_error_code",
"BatchItemInput": ".batch_item_input",
"BatchItemInputDataType": ".batch_item_input_data_type",
"BatchItemInputRole": ".batch_item_input_role",
@@ -531,9 +549,12 @@
"ContentPolicyEventListFilters": ".content_policy_event_list_filters",
"ContentPolicyEventListFiltersDropReason": ".content_policy_event_list_filters_drop_reason",
"ContentPolicyEventPage": ".content_policy_event_page",
+ "ContentPolicyMatchedBy": ".content_policy_matched_by",
"ContentPolicyRevisionPage": ".content_policy_revision_page",
"ContentPolicyRule": ".content_policy_rule",
+ "ContentPolicyRuleAction": ".content_policy_rule_action",
"ContentPolicyRuleRequest": ".content_policy_rule_request",
+ "ContentPolicyRuleRequestAction": ".content_policy_rule_request_action",
"ContextEdge": ".context_edge",
"ContextEpisode": ".context_episode",
"ContextNode": ".context_node",
@@ -576,6 +597,7 @@
"EpisodeListFilters": ".episode_list_filters",
"EpisodePage": ".episode_page",
"EpisodeSearchFilters": ".episode_search_filters",
+ "EpisodeWaitStatus": ".episode_wait_status",
"ErrorBody": ".error_body",
"Graph": ".graph",
"GraphContentPolicy": ".graph_content_policy",
@@ -598,6 +620,7 @@
"GraphQueryPlanStep": ".graph_query_plan_step",
"GraphQueryReasoningEvent": ".graph_query_reasoning_event",
"GraphQueryResponse": ".graph_query_response",
+ "GraphQueryResponseAnswerStatus": ".graph_query_response_answer_status",
"GraphQueryResultEvent": ".graph_query_result_event",
"GraphQueryResults": ".graph_query_results",
"GraphQueryStartedEvent": ".graph_query_started_event",
@@ -620,7 +643,13 @@
"HyperedgeListFilters": ".hyperedge_list_filters",
"HyperedgePage": ".hyperedge_page",
"ImportedTraceReference": ".imported_trace_reference",
+ "InclusionRule": ".inclusion_rule",
+ "InclusionRuleEffect": ".inclusion_rule_effect",
+ "InclusionRuleTarget": ".inclusion_rule_target",
+ "InclusionRules": ".inclusion_rules",
"IngestionTrace": ".ingestion_trace",
+ "IngestionTraceCandidateOutcome": ".ingestion_trace_candidate_outcome",
+ "IngestionTraceCandidateOutcomeOutcome": ".ingestion_trace_candidate_outcome_outcome",
"IngestionTraceEdge": ".ingestion_trace_edge",
"IngestionTraceEdgeInvalidation": ".ingestion_trace_edge_invalidation",
"IngestionTraceEdgeReference": ".ingestion_trace_edge_reference",
@@ -636,6 +665,8 @@
"IngestionTraceStatus": ".ingestion_trace_status",
"IngestionTraceStep": ".ingestion_trace_step",
"Instructions": ".instructions",
+ "KnowledgeEntry": ".knowledge_entry",
+ "KnowledgeResponse": ".knowledge_response",
"LookupBatchResponse": ".lookup_batch_response",
"LookupItem": ".lookup_item",
"LookupItemResourceType": ".lookup_item_resource_type",
@@ -686,6 +717,7 @@
"RoleType": ".role_type",
"SearchFilters": ".search_filters",
"SearchListRequest": ".search_list_request",
+ "SetKnowledgeRequest": ".set_knowledge_request",
"SkillDefinition": ".skill_definition",
"SkillDefinitionSection": ".skill_definition_section",
"SkillFailure": ".skill_failure",
@@ -907,6 +939,8 @@ def __dir__():
"AsyncResult",
"Batch",
"BatchItem",
+ "BatchItemError",
+ "BatchItemErrorCode",
"BatchItemInput",
"BatchItemInputDataType",
"BatchItemInputRole",
@@ -929,9 +963,12 @@ def __dir__():
"ContentPolicyEventListFilters",
"ContentPolicyEventListFiltersDropReason",
"ContentPolicyEventPage",
+ "ContentPolicyMatchedBy",
"ContentPolicyRevisionPage",
"ContentPolicyRule",
+ "ContentPolicyRuleAction",
"ContentPolicyRuleRequest",
+ "ContentPolicyRuleRequestAction",
"ContextEdge",
"ContextEpisode",
"ContextNode",
@@ -974,6 +1011,7 @@ def __dir__():
"EpisodeListFilters",
"EpisodePage",
"EpisodeSearchFilters",
+ "EpisodeWaitStatus",
"ErrorBody",
"Graph",
"GraphContentPolicy",
@@ -996,6 +1034,7 @@ def __dir__():
"GraphQueryPlanStep",
"GraphQueryReasoningEvent",
"GraphQueryResponse",
+ "GraphQueryResponseAnswerStatus",
"GraphQueryResultEvent",
"GraphQueryResults",
"GraphQueryStartedEvent",
@@ -1018,7 +1057,13 @@ def __dir__():
"HyperedgeListFilters",
"HyperedgePage",
"ImportedTraceReference",
+ "InclusionRule",
+ "InclusionRuleEffect",
+ "InclusionRuleTarget",
+ "InclusionRules",
"IngestionTrace",
+ "IngestionTraceCandidateOutcome",
+ "IngestionTraceCandidateOutcomeOutcome",
"IngestionTraceEdge",
"IngestionTraceEdgeInvalidation",
"IngestionTraceEdgeReference",
@@ -1034,6 +1079,8 @@ def __dir__():
"IngestionTraceStatus",
"IngestionTraceStep",
"Instructions",
+ "KnowledgeEntry",
+ "KnowledgeResponse",
"LookupBatchResponse",
"LookupItem",
"LookupItemResourceType",
@@ -1084,6 +1131,7 @@ def __dir__():
"RoleType",
"SearchFilters",
"SearchListRequest",
+ "SetKnowledgeRequest",
"SkillDefinition",
"SkillDefinitionSection",
"SkillFailure",
diff --git a/src/zep_cloud/types/add_hyperedge_edge_result.py b/src/zep_cloud/types/add_hyperedge_edge_result.py
index d4047dc6..99ee469c 100644
--- a/src/zep_cloud/types/add_hyperedge_edge_result.py
+++ b/src/zep_cloud/types/add_hyperedge_edge_result.py
@@ -11,8 +11,9 @@
class AddHyperedgeEdgeResult(UniversalBaseModel):
edge: typing.Optional[AddedEdge] = pydantic.Field(default=None)
"""
- An accept-time acknowledgement of the member edge, carrying the
- identifier Zep assigned and the hyperedge's shared fields.
+ An accept-time acknowledgement of the member edge. It contains the
+ identifier that Zep assigned and the name and nodes that you supplied.
+ It does not contain the shared fact or timestamps of the hyperedge.
"""
task: typing.Optional[Task] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/added_edge.py b/src/zep_cloud/types/added_edge.py
index 7840807a..6ff78d76 100644
--- a/src/zep_cloud/types/added_edge.py
+++ b/src/zep_cloud/types/added_edge.py
@@ -23,6 +23,7 @@ class AddedEdge(UniversalBaseModel):
fact: typing.Optional[str] = pydantic.Field(default=None)
"""
The natural-language fact you submitted for this edge.
+ graph.hyperedge.create_edge does not return this field.
"""
fact_name: typing.Optional[str] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/batch_item.py b/src/zep_cloud/types/batch_item.py
index 41e17827..5658ee3f 100644
--- a/src/zep_cloud/types/batch_item.py
+++ b/src/zep_cloud/types/batch_item.py
@@ -6,6 +6,7 @@
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
+from .batch_item_error import BatchItemError
from .batch_item_kind import BatchItemKind
from .batch_item_status import BatchItemStatus
from .episode_content_policy import EpisodeContentPolicy
@@ -14,7 +15,7 @@
class BatchItem(UniversalBaseModel):
content_policy: typing.Optional[EpisodeContentPolicy] = pydantic.Field(default=None)
"""
- The content policy state of the item's episode, present only on a graph
+ Experimental. The content policy state of the item's episode, present only on a graph
with a bound content policy rule and only once the item is processed.
"""
@@ -28,6 +29,11 @@ class BatchItem(UniversalBaseModel):
The identifier of the episode created for this item, equal to source_uuid.
"""
+ error: typing.Optional[BatchItemError] = pydantic.Field(default=None)
+ """
+ The reason the item failed and the action to take. Present only when status is failed.
+ """
+
graph_uuid: typing.Optional[str] = pydantic.Field(default=None)
"""
The graph the item's episode is or will be ingested into.
diff --git a/src/zep_cloud/types/batch_item_error.py b/src/zep_cloud/types/batch_item_error.py
new file mode 100644
index 00000000..f3b85886
--- /dev/null
+++ b/src/zep_cloud/types/batch_item_error.py
@@ -0,0 +1,28 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .batch_item_error_code import BatchItemErrorCode
+
+
+class BatchItemError(UniversalBaseModel):
+ code: typing.Optional[BatchItemErrorCode] = pydantic.Field(default=None)
+ """
+ The reason the item failed.
+ """
+
+ message: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The explanation of the failure and the action to take.
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/zep_cloud/types/batch_item_error_code.py b/src/zep_cloud/types/batch_item_error_code.py
new file mode 100644
index 00000000..25adb6c7
--- /dev/null
+++ b/src/zep_cloud/types/batch_item_error_code.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+BatchItemErrorCode = typing.Union[
+ typing.Literal["rate_limited", "item_too_large", "processing_failed", "expired"], typing.Any
+]
diff --git a/src/zep_cloud/types/content_policy_event.py b/src/zep_cloud/types/content_policy_event.py
index 3381518d..4258dcfe 100644
--- a/src/zep_cloud/types/content_policy_event.py
+++ b/src/zep_cloud/types/content_policy_event.py
@@ -6,6 +6,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .content_policy_event_artifact_kind import ContentPolicyEventArtifactKind
from .content_policy_event_drop_reason import ContentPolicyEventDropReason
+from .content_policy_matched_by import ContentPolicyMatchedBy
class ContentPolicyEvent(UniversalBaseModel):
@@ -27,8 +28,7 @@ class ContentPolicyEvent(UniversalBaseModel):
drop_reason: typing.Optional[ContentPolicyEventDropReason] = pydantic.Field(default=None)
"""
- Why the artifact was dropped: match, indeterminate, oversize, or
- dependent.
+ Why the artifact was dropped: match, indeterminate, oversize, dependent, or not_included.
"""
episode_uuid: typing.Optional[str] = pydantic.Field(default=None)
@@ -41,6 +41,11 @@ class ContentPolicyEvent(UniversalBaseModel):
The opaque identifier of the event.
"""
+ matched_by: typing.Optional[typing.List[ContentPolicyMatchedBy]] = pydantic.Field(default=None)
+ """
+ The match mechanisms. The list is empty for a not_included event.
+ """
+
revision: typing.Optional[int] = pydantic.Field(default=None)
"""
The project revision number of the policy the graph bound.
diff --git a/src/zep_cloud/types/content_policy_event_drop_reason.py b/src/zep_cloud/types/content_policy_event_drop_reason.py
index b23b0ba2..62d8678b 100644
--- a/src/zep_cloud/types/content_policy_event_drop_reason.py
+++ b/src/zep_cloud/types/content_policy_event_drop_reason.py
@@ -3,5 +3,5 @@
import typing
ContentPolicyEventDropReason = typing.Union[
- typing.Literal["match", "indeterminate", "oversize", "dependent"], typing.Any
+ typing.Literal["match", "indeterminate", "oversize", "dependent", "not_included"], typing.Any
]
diff --git a/src/zep_cloud/types/content_policy_matched_by.py b/src/zep_cloud/types/content_policy_matched_by.py
new file mode 100644
index 00000000..c9a13a1b
--- /dev/null
+++ b/src/zep_cloud/types/content_policy_matched_by.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+ContentPolicyMatchedBy = typing.Union[typing.Literal["type", "pattern", "condition"], typing.Any]
diff --git a/src/zep_cloud/types/content_policy_rule.py b/src/zep_cloud/types/content_policy_rule.py
index e7c2a3f1..9736f533 100644
--- a/src/zep_cloud/types/content_policy_rule.py
+++ b/src/zep_cloud/types/content_policy_rule.py
@@ -4,23 +4,49 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .content_policy_rule_action import ContentPolicyRuleAction
class ContentPolicyRule(UniversalBaseModel):
+ action: typing.Optional[ContentPolicyRuleAction] = pydantic.Field(default=None)
+ """
+ The rule action. The supported values are exclude and include.
+ """
+
category_key: typing.Optional[str] = pydantic.Field(default=None)
"""
The key of the category this rule belongs to.
"""
+ condition: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The condition that this rule evaluates.
+ """
+
description: typing.Optional[str] = pydantic.Field(default=None)
"""
- The content this rule prohibits.
+ Deprecated: use condition. This alias remains available for one release.
+ """
+
+ edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Edge types that this rule covers.
+ """
+
+ entity_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Entity types that this rule covers.
"""
id: typing.Optional[str] = pydantic.Field(default=None)
"""
The server-assigned identifier of the rule. Stable across revisions while
- the category key and description are unchanged.
+ the effective rule definition is unchanged.
+ """
+
+ patterns: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Regular expression patterns that this rule matches.
"""
permitted_examples: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/content_policy_rule_action.py b/src/zep_cloud/types/content_policy_rule_action.py
new file mode 100644
index 00000000..7ff52d31
--- /dev/null
+++ b/src/zep_cloud/types/content_policy_rule_action.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+ContentPolicyRuleAction = typing.Union[typing.Literal["exclude", "include"], typing.Any]
diff --git a/src/zep_cloud/types/content_policy_rule_request.py b/src/zep_cloud/types/content_policy_rule_request.py
index 89f64471..ad4761e3 100644
--- a/src/zep_cloud/types/content_policy_rule_request.py
+++ b/src/zep_cloud/types/content_policy_rule_request.py
@@ -4,19 +4,47 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .content_policy_rule_request_action import ContentPolicyRuleRequestAction
class ContentPolicyRuleRequest(UniversalBaseModel):
+ action: typing.Optional[ContentPolicyRuleRequestAction] = pydantic.Field(default=None)
+ """
+ The rule action. The supported values are exclude and include.
+ The include action is experimental and gated.
+ """
+
category_key: typing.Optional[str] = pydantic.Field(default=None)
"""
The key of the category this rule belongs to. The category must be in
the same policy.
"""
+ condition: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The experimental condition that this rule evaluates. This field is available
+ to all accounts. Maximum 1000 characters.
+ """
+
description: typing.Optional[str] = pydantic.Field(default=None)
"""
- The content this rule prohibits, in plain language. Maximum 1000
- characters.
+ Deprecated: use condition. This alias remains available for one release.
+ When both fields are set, they must have the same value.
+ """
+
+ edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Edge types that this rule covers. The field is experimental and gated.
+ """
+
+ entity_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Entity types that this rule covers. The field is experimental and gated.
+ """
+
+ patterns: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Regular expression patterns that this rule matches. The field is experimental and gated.
"""
permitted_examples: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/content_policy_rule_request_action.py b/src/zep_cloud/types/content_policy_rule_request_action.py
new file mode 100644
index 00000000..9921b166
--- /dev/null
+++ b/src/zep_cloud/types/content_policy_rule_request_action.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+ContentPolicyRuleRequestAction = typing.Union[typing.Literal["exclude", "include"], typing.Any]
diff --git a/src/zep_cloud/types/context_episode.py b/src/zep_cloud/types/context_episode.py
index 24d1a8d5..b30d5d93 100644
--- a/src/zep_cloud/types/context_episode.py
+++ b/src/zep_cloud/types/context_episode.py
@@ -7,6 +7,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .episode_content_policy import EpisodeContentPolicy
+from .episode_wait_status import EpisodeWaitStatus
from .graph_data_type import GraphDataType
from .role_type import RoleType
@@ -19,7 +20,7 @@ class ContextEpisode(UniversalBaseModel):
content_policy: typing.Optional[EpisodeContentPolicy] = pydantic.Field(default=None)
"""
- The content policy state of the episode, present only on a graph with a
+ Experimental. The content policy state of the episode, present only on a graph with a
bound content policy rule.
"""
@@ -34,6 +35,14 @@ class ContextEpisode(UniversalBaseModel):
present only for episodes added to a document.
"""
+ expired_at: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The time when Zep stopped the processing of the episode because the
+ episode waited for more than 7 days. An expired episode is not in the
+ graph. Add the episode again to process it. The field is omitted for an
+ episode that did not expire.
+ """
+
graph_uuid: typing.Optional[str] = pydantic.Field(default=None)
"""
The unique identifier of the graph this episode belongs to.
@@ -118,6 +127,13 @@ class ContextEpisode(UniversalBaseModel):
The unique identifier of the episode.
"""
+ wait_status: typing.Optional[EpisodeWaitStatus] = pydantic.Field(default=None)
+ """
+ Why an episode that is not processed waits. The field is present when
+ the episode has waited for more than 24 hours, and when the episode
+ expired. It is omitted for a processed episode.
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/zep_cloud/types/custom_instruction.py b/src/zep_cloud/types/custom_instruction.py
index d3801425..ba443215 100644
--- a/src/zep_cloud/types/custom_instruction.py
+++ b/src/zep_cloud/types/custom_instruction.py
@@ -14,7 +14,7 @@ class CustomInstruction(UniversalBaseModel):
text: str = pydantic.Field()
"""
- the actual instruction text
+ the domain knowledge text
"""
if IS_PYDANTIC_V2:
diff --git a/src/zep_cloud/types/edge_list_filters.py b/src/zep_cloud/types/edge_list_filters.py
index 6196485c..287048bc 100644
--- a/src/zep_cloud/types/edge_list_filters.py
+++ b/src/zep_cloud/types/edge_list_filters.py
@@ -18,7 +18,7 @@ class EdgeListFilters(UniversalBaseModel):
content_policy_violated: typing.Optional[bool] = pydantic.Field(default=None)
"""
- Match episodes by their content-policy result. Supported only on episode search when the project setting include_policy_violating_episodes is true.
+ Experimental. Match episodes by their content-policy result. Supported only on episode search when the project setting include_policy_violating_episodes is true.
"""
date_filters: typing.Optional[DateFilters] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/episode.py b/src/zep_cloud/types/episode.py
index 9845963e..fba0a7e0 100644
--- a/src/zep_cloud/types/episode.py
+++ b/src/zep_cloud/types/episode.py
@@ -7,6 +7,7 @@
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .episode_content_policy import EpisodeContentPolicy
+from .episode_wait_status import EpisodeWaitStatus
from .graph_data_type import GraphDataType
from .role_type import RoleType
@@ -19,7 +20,7 @@ class Episode(UniversalBaseModel):
content_policy: typing.Optional[EpisodeContentPolicy] = pydantic.Field(default=None)
"""
- The content policy state of the episode, present only on a graph with a
+ Experimental. The content policy state of the episode, present only on a graph with a
bound content policy rule.
"""
@@ -34,6 +35,14 @@ class Episode(UniversalBaseModel):
present only for episodes added to a document.
"""
+ expired_at: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The time when Zep stopped the processing of the episode because the
+ episode waited for more than 7 days. An expired episode is not in the
+ graph. Add the episode again to process it. The field is omitted for an
+ episode that did not expire.
+ """
+
graph_uuid: typing.Optional[str] = pydantic.Field(default=None)
"""
The unique identifier of the graph this episode belongs to.
@@ -112,6 +121,13 @@ class Episode(UniversalBaseModel):
The unique identifier of the episode.
"""
+ wait_status: typing.Optional[EpisodeWaitStatus] = pydantic.Field(default=None)
+ """
+ Why an episode that is not processed waits. The field is present when
+ the episode has waited for more than 24 hours, and when the episode
+ expired. It is omitted for a processed episode.
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/zep_cloud/types/episode_content_policy.py b/src/zep_cloud/types/episode_content_policy.py
index 32471791..ce2946d8 100644
--- a/src/zep_cloud/types/episode_content_policy.py
+++ b/src/zep_cloud/types/episode_content_policy.py
@@ -33,6 +33,8 @@ class EpisodeContentPolicy(UniversalBaseModel):
The evaluation status. pending means the evaluation has not finished,
complete means every candidate was evaluated and the graph batch was
written, and failed means ingestion retries were exhausted.
+ not_evaluated means Zep processed the episode without an evaluation, for
+ example because the account had no content policy entitlement.
"""
violated: typing.Optional[bool] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/episode_content_policy_status.py b/src/zep_cloud/types/episode_content_policy_status.py
index 19aa06f9..50a7098f 100644
--- a/src/zep_cloud/types/episode_content_policy_status.py
+++ b/src/zep_cloud/types/episode_content_policy_status.py
@@ -2,4 +2,4 @@
import typing
-EpisodeContentPolicyStatus = typing.Union[typing.Literal["pending", "complete", "failed"], typing.Any]
+EpisodeContentPolicyStatus = typing.Union[typing.Literal["pending", "complete", "failed", "not_evaluated"], typing.Any]
diff --git a/src/zep_cloud/types/episode_list_filters.py b/src/zep_cloud/types/episode_list_filters.py
index d70fffee..1424364e 100644
--- a/src/zep_cloud/types/episode_list_filters.py
+++ b/src/zep_cloud/types/episode_list_filters.py
@@ -11,7 +11,7 @@
class EpisodeListFilters(UniversalBaseModel):
content_policy_violated: typing.Optional[bool] = pydantic.Field(default=None)
"""
- When true, include only episodes that a content policy flagged. When
+ Experimental. When true, include only episodes that a content policy flagged. When
false, include only episodes that no content policy flagged. The
project setting include_policy_violating_episodes must be on.
"""
diff --git a/src/zep_cloud/types/episode_search_filters.py b/src/zep_cloud/types/episode_search_filters.py
index f75be981..6f4c1afd 100644
--- a/src/zep_cloud/types/episode_search_filters.py
+++ b/src/zep_cloud/types/episode_search_filters.py
@@ -11,7 +11,7 @@
class EpisodeSearchFilters(UniversalBaseModel):
content_policy_violated: typing.Optional[bool] = pydantic.Field(default=None)
"""
- Match episodes by their content-policy result. Supported only on episode search when the project setting include_policy_violating_episodes is true.
+ Experimental. Match episodes by their content-policy result. Supported only on episode search when the project setting include_policy_violating_episodes is true.
"""
metadata_filters: typing.Optional["MetadataFilterGroup"] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/episode_wait_status.py b/src/zep_cloud/types/episode_wait_status.py
new file mode 100644
index 00000000..83c4d8bd
--- /dev/null
+++ b/src/zep_cloud/types/episode_wait_status.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+EpisodeWaitStatus = typing.Union[
+ typing.Literal["account_rate_limit_reached", "waiting_for_earlier_episodes", "processing_delayed"], typing.Any
+]
diff --git a/src/zep_cloud/types/graph_content_policy_request.py b/src/zep_cloud/types/graph_content_policy_request.py
index 6bde3587..b44d590c 100644
--- a/src/zep_cloud/types/graph_content_policy_request.py
+++ b/src/zep_cloud/types/graph_content_policy_request.py
@@ -24,7 +24,7 @@ class GraphContentPolicyRequest(UniversalBaseModel):
rules: typing.Optional[typing.List[ContentPolicyRuleRequest]] = pydantic.Field(default=None)
"""
Rules to add for this graph. A rule that the project policy already has,
- with the same category key and description, is ignored.
+ with the same effective rule identity is ignored.
"""
if IS_PYDANTIC_V2:
diff --git a/src/zep_cloud/types/graph_query_response.py b/src/zep_cloud/types/graph_query_response.py
index 0d03ae00..bbbd7935 100644
--- a/src/zep_cloud/types/graph_query_response.py
+++ b/src/zep_cloud/types/graph_query_response.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .graph_query_citations import GraphQueryCitations
+from .graph_query_response_answer_status import GraphQueryResponseAnswerStatus
from .graph_query_results import GraphQueryResults
@@ -15,6 +16,11 @@ class GraphQueryResponse(UniversalBaseModel):
request sets generate_answer to true.
"""
+ answer_status: typing.Optional[GraphQueryResponseAnswerStatus] = pydantic.Field(default=None)
+ """
+ The outcome of the answer: answered, partial (the answer covers only part of the question), or refused (the records do not answer the question). Present only when the request sets generate_answer to true.
+ """
+
citations: typing.Optional[GraphQueryCitations] = pydantic.Field(default=None)
"""
The UUIDs of the graph items cited by the answer. The lists are empty
diff --git a/src/zep_cloud/types/graph_query_response_answer_status.py b/src/zep_cloud/types/graph_query_response_answer_status.py
new file mode 100644
index 00000000..50628be9
--- /dev/null
+++ b/src/zep_cloud/types/graph_query_response_answer_status.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+GraphQueryResponseAnswerStatus = typing.Union[typing.Literal["answered", "partial", "refused"], typing.Any]
diff --git a/src/zep_cloud/types/inclusion_rule.py b/src/zep_cloud/types/inclusion_rule.py
new file mode 100644
index 00000000..9719659a
--- /dev/null
+++ b/src/zep_cloud/types/inclusion_rule.py
@@ -0,0 +1,44 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .inclusion_rule_effect import InclusionRuleEffect
+from .inclusion_rule_target import InclusionRuleTarget
+
+
+class InclusionRule(UniversalBaseModel):
+ condition: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Condition is a natural-language test; an empty value matches every applicable candidate.
+ """
+
+ effect: typing.Optional[InclusionRuleEffect] = pydantic.Field(default=None)
+ """
+ Effect includes or excludes matching candidates.
+ """
+
+ name: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Name uniquely identifies the rule within its scope.
+ """
+
+ target: typing.Optional[InclusionRuleTarget] = pydantic.Field(default=None)
+ """
+ Target selects entity candidates or fact candidates.
+ """
+
+ types: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Types limits the rule to these ontology types and their subtypes.
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/zep_cloud/types/inclusion_rule_effect.py b/src/zep_cloud/types/inclusion_rule_effect.py
new file mode 100644
index 00000000..fdba4f56
--- /dev/null
+++ b/src/zep_cloud/types/inclusion_rule_effect.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+InclusionRuleEffect = typing.Union[typing.Literal["include", "exclude"], typing.Any]
diff --git a/src/zep_cloud/types/inclusion_rule_target.py b/src/zep_cloud/types/inclusion_rule_target.py
new file mode 100644
index 00000000..8b6689f2
--- /dev/null
+++ b/src/zep_cloud/types/inclusion_rule_target.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+InclusionRuleTarget = typing.Union[typing.Literal["entity", "fact"], typing.Any]
diff --git a/src/zep_cloud/types/inclusion_rules.py b/src/zep_cloud/types/inclusion_rules.py
new file mode 100644
index 00000000..e9402167
--- /dev/null
+++ b/src/zep_cloud/types/inclusion_rules.py
@@ -0,0 +1,28 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .inclusion_rule import InclusionRule
+
+
+class InclusionRules(UniversalBaseModel):
+ inclusion_rules: typing.Optional[typing.List[InclusionRule]] = pydantic.Field(default=None)
+ """
+ InclusionRules replaces the complete rule set at this scope.
+ """
+
+ inherited: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Inherited identifies a graph that uses project defaults.
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/zep_cloud/types/ingestion_trace_candidate_outcome.py b/src/zep_cloud/types/ingestion_trace_candidate_outcome.py
new file mode 100644
index 00000000..600704ae
--- /dev/null
+++ b/src/zep_cloud/types/ingestion_trace_candidate_outcome.py
@@ -0,0 +1,33 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .ingestion_trace_candidate_outcome_outcome import IngestionTraceCandidateOutcomeOutcome
+
+
+class IngestionTraceCandidateOutcome(UniversalBaseModel):
+ candidate_uuid: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The UUID of the candidate node or edge.
+ """
+
+ extracted_uuid: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The UUID of the extracted node or edge.
+ """
+
+ outcome: typing.Optional[IngestionTraceCandidateOutcomeOutcome] = pydantic.Field(default=None)
+ """
+ The outcome of the comparison.
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/zep_cloud/types/ingestion_trace_candidate_outcome_outcome.py b/src/zep_cloud/types/ingestion_trace_candidate_outcome_outcome.py
new file mode 100644
index 00000000..5c1d67f8
--- /dev/null
+++ b/src/zep_cloud/types/ingestion_trace_candidate_outcome_outcome.py
@@ -0,0 +1,8 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+IngestionTraceCandidateOutcomeOutcome = typing.Union[
+ typing.Literal["duplicate", "not_duplicate", "contradicts", "not_contradicted", "same_entity", "different_entity"],
+ typing.Any,
+]
diff --git a/src/zep_cloud/types/ingestion_trace_output.py b/src/zep_cloud/types/ingestion_trace_output.py
index 4cedc27c..873da301 100644
--- a/src/zep_cloud/types/ingestion_trace_output.py
+++ b/src/zep_cloud/types/ingestion_trace_output.py
@@ -4,6 +4,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .ingestion_trace_candidate_outcome import IngestionTraceCandidateOutcome
from .ingestion_trace_edge import IngestionTraceEdge
from .ingestion_trace_edge_invalidation import IngestionTraceEdgeInvalidation
from .ingestion_trace_node import IngestionTraceNode
@@ -12,6 +13,12 @@
class IngestionTraceOutput(UniversalBaseModel):
+ candidate_outcomes: typing.Optional[typing.List[IngestionTraceCandidateOutcome]] = pydantic.Field(default=None)
+ """
+ The outcomes that the step recorded for each extracted and candidate pair.
+ Present for resolve_nodes and resolve_edges and empty for the other steps.
+ """
+
edge_invalidations: typing.Optional[typing.List[IngestionTraceEdgeInvalidation]] = pydantic.Field(default=None)
"""
The existing edges that the resolved edges invalidated. Present for resolve_edges and empty for
diff --git a/src/zep_cloud/types/ingestion_trace_status.py b/src/zep_cloud/types/ingestion_trace_status.py
index 8409b248..0f1d51d3 100644
--- a/src/zep_cloud/types/ingestion_trace_status.py
+++ b/src/zep_cloud/types/ingestion_trace_status.py
@@ -2,4 +2,4 @@
import typing
-IngestionTraceStatus = typing.Union[typing.Literal["recorded", "failed"], typing.Any]
+IngestionTraceStatus = typing.Union[typing.Literal["pending", "recorded", "failed"], typing.Any]
diff --git a/src/zep_cloud/types/knowledge_entry.py b/src/zep_cloud/types/knowledge_entry.py
new file mode 100644
index 00000000..eb7d3b33
--- /dev/null
+++ b/src/zep_cloud/types/knowledge_entry.py
@@ -0,0 +1,27 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+
+
+class KnowledgeEntry(UniversalBaseModel):
+ name: str = pydantic.Field()
+ """
+ The name identifies the entry within its scope.
+ """
+
+ text: str = pydantic.Field()
+ """
+ The text describes a term, an alias, or another domain fact.
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/zep_cloud/types/knowledge_response.py b/src/zep_cloud/types/knowledge_response.py
new file mode 100644
index 00000000..8e17e8e9
--- /dev/null
+++ b/src/zep_cloud/types/knowledge_response.py
@@ -0,0 +1,28 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .knowledge_entry import KnowledgeEntry
+
+
+class KnowledgeResponse(UniversalBaseModel):
+ inherited: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Inherited is true when the graph uses the project entries.
+ """
+
+ knowledge: typing.Optional[typing.List[KnowledgeEntry]] = pydantic.Field(default=None)
+ """
+ The domain knowledge entries in effect at this scope.
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/zep_cloud/types/node_list_filters.py b/src/zep_cloud/types/node_list_filters.py
index 4008be25..42bba19d 100644
--- a/src/zep_cloud/types/node_list_filters.py
+++ b/src/zep_cloud/types/node_list_filters.py
@@ -18,7 +18,7 @@ class NodeListFilters(UniversalBaseModel):
content_policy_violated: typing.Optional[bool] = pydantic.Field(default=None)
"""
- Match episodes by their content-policy result. Supported only on episode search when the project setting include_policy_violating_episodes is true.
+ Experimental. Match episodes by their content-policy result. Supported only on episode search when the project setting include_policy_violating_episodes is true.
"""
date_filters: typing.Optional[DateFilters] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/search_filters.py b/src/zep_cloud/types/search_filters.py
index dc785dc0..5130b110 100644
--- a/src/zep_cloud/types/search_filters.py
+++ b/src/zep_cloud/types/search_filters.py
@@ -18,7 +18,7 @@ class SearchFilters(UniversalBaseModel):
content_policy_violated: typing.Optional[bool] = pydantic.Field(default=None)
"""
- Match episodes by their content-policy result. Supported only on episode search when the project setting include_policy_violating_episodes is true.
+ Experimental. Match episodes by their content-policy result. Supported only on episode search when the project setting include_policy_violating_episodes is true.
"""
date_filters: typing.Optional[DateFilters] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/set_knowledge_request.py b/src/zep_cloud/types/set_knowledge_request.py
new file mode 100644
index 00000000..a04082c1
--- /dev/null
+++ b/src/zep_cloud/types/set_knowledge_request.py
@@ -0,0 +1,23 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .knowledge_entry import KnowledgeEntry
+
+
+class SetKnowledgeRequest(UniversalBaseModel):
+ knowledge: typing.Optional[typing.List[KnowledgeEntry]] = pydantic.Field(default=None)
+ """
+ The complete set of domain knowledge entries. An empty list clears the scope.
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/zep_cloud/types/task_result.py b/src/zep_cloud/types/task_result.py
index fece02d2..67a17901 100644
--- a/src/zep_cloud/types/task_result.py
+++ b/src/zep_cloud/types/task_result.py
@@ -12,7 +12,7 @@
class TaskResult(UniversalBaseModel):
content_policy: typing.Optional[TaskResultContentPolicy] = pydantic.Field(default=None)
"""
- The content policy outcome of the task.
+ Experimental. The content policy outcome of the task.
"""
edge_uuid: typing.Optional[str] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/task_result_episode.py b/src/zep_cloud/types/task_result_episode.py
index b9feb197..937f7896 100644
--- a/src/zep_cloud/types/task_result_episode.py
+++ b/src/zep_cloud/types/task_result_episode.py
@@ -10,7 +10,7 @@
class TaskResultEpisode(UniversalBaseModel):
content_policy: typing.Optional[TaskResultContentPolicy] = pydantic.Field(default=None)
"""
- The content policy state of the episode.
+ Experimental. The content policy state of the episode.
"""
episode_uuid: typing.Optional[str] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/user/client.py b/src/zep_cloud/user/client.py
index bf4efd53..b61a53cb 100644
--- a/src/zep_cloud/user/client.py
+++ b/src/zep_cloud/user/client.py
@@ -53,7 +53,7 @@ def create(
Parameters
----------
content_policy : typing.Optional[GraphContentPolicyRequest]
- Content policy additions for the user's graph. The graph binds the
+ Experimental. Content policy additions for the user's graph. The graph binds the
current project content policy plus these additions, and the binding
does not change after creation.
@@ -540,7 +540,7 @@ async def create(
Parameters
----------
content_policy : typing.Optional[GraphContentPolicyRequest]
- Content policy additions for the user's graph. The graph binds the
+ Experimental. Content policy additions for the user's graph. The graph binds the
current project content policy plus these additions, and the binding
does not change after creation.
diff --git a/src/zep_cloud/user/raw_client.py b/src/zep_cloud/user/raw_client.py
index 6051f5fa..2df9f042 100644
--- a/src/zep_cloud/user/raw_client.py
+++ b/src/zep_cloud/user/raw_client.py
@@ -56,7 +56,7 @@ def create(
Parameters
----------
content_policy : typing.Optional[GraphContentPolicyRequest]
- Content policy additions for the user's graph. The graph binds the
+ Experimental. Content policy additions for the user's graph. The graph binds the
current project content policy plus these additions, and the binding
does not change after creation.
@@ -1114,7 +1114,7 @@ async def create(
Parameters
----------
content_policy : typing.Optional[GraphContentPolicyRequest]
- Content policy additions for the user's graph. The graph binds the
+ Experimental. Content policy additions for the user's graph. The graph binds the
current project content policy plus these additions, and the binding
does not change after creation.
From 241e9d4e69cd35c9fabbe9d573255cfdf1146964 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Tue, 24 Nov 2026 15:41:36 +0000
Subject: [PATCH 2/3] [fern-replay] Applied customizations
Patches applied (1):
- patch-082f322d: Let an ontology field opt out, and fix the README (#348)
---
.fern/replay.lock | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/.fern/replay.lock b/.fern/replay.lock
index 5f78b411..d6f32c76 100644
--- a/.fern/replay.lock
+++ b/.fern/replay.lock
@@ -72,14 +72,20 @@ generations:
cli_version: unknown
generator_versions:
fernapi/fern-python-sdk: 5.39.2
-current_generation: 2818395f8ff39ec886a500dcb9438515d204779a
+ - commit_sha: 345ba81f55692d61e8f586d5fb7d4307ddc863cf
+ tree_hash: 3e08fac2abaec1b17d8560453efad7b13e24b96a
+ timestamp: 2026-11-24T15:41:31.665Z
+ cli_version: unknown
+ generator_versions:
+ fernapi/fern-python-sdk: 5.39.2
+current_generation: 345ba81f55692d61e8f586d5fb7d4307ddc863cf
patches:
- id: patch-082f322d
content_hash: sha256:80c233468a0236864659e748ffa647c6c6a89435d3fca6dec28965e48b901c46
original_commit: 082f322d1bd077cff00e3630500ac6187251a000
original_message: Let an ontology field opt out, and fix the README (#348)
original_author: Pavlo Paliychuk
- base_generation: 2818395f8ff39ec886a500dcb9438515d204779a
+ base_generation: 345ba81f55692d61e8f586d5fb7d4307ddc863cf
files:
- README.md
patch_content: |
From c693cc3758980f90f0aeaf6fc15120ca6817e35d Mon Sep 17 00:00:00 2001
From: "zep-sdk-release-bot[bot]"
Date: Tue, 24 Nov 2026 15:41:45 +0000
Subject: [PATCH 3/3] chore: bump SDK version to 4.2.0
---
pyproject.toml | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyproject.toml b/pyproject.toml
index aa035819..e933328c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,7 @@
[project]
name = "zep-cloud"
dynamic = ["version"]
+version = "4.2.0"
[tool.poetry]
name = "zep-cloud"