diff --git a/.fern/metadata.json b/.fern/metadata.json index e0efb600..58ef1f0b 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -12,10 +12,10 @@ }, "pyproject_python_version": "^3.10" }, - "originGitCommit": "de231feaf8d16d1d40ce178210ec14d056437ad2", + "originGitCommit": "9ad0803521b69af693f92404ec41770231c3cb8e", "originGitCommitIsDirty": true, "invokedBy": "ci", - "requestedVersion": "4.0.0rc1", + "requestedVersion": "4.0.0rc2", "ciProvider": "github", - "sdkVersion": "4.0.0rc1" + "sdkVersion": "4.0.0rc2" } \ No newline at end of file diff --git a/.fern/replay.lock b/.fern/replay.lock index 493b3714..3f754355 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -48,14 +48,20 @@ generations: cli_version: unknown generator_versions: fernapi/fern-python-sdk: 5.39.2 -current_generation: 697f67b435cf139bb8886becd95f777cbcee853c + - commit_sha: 28ebe33b9302f169ff5a9569ee8f0d606c8fd251 + tree_hash: c3db1da60ce9480fced18cf0266fffc4cf5c8257 + timestamp: 2026-10-13T21:49:37.679Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 5.39.2 +current_generation: 28ebe33b9302f169ff5a9569ee8f0d606c8fd251 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: 697f67b435cf139bb8886becd95f777cbcee853c + base_generation: 28ebe33b9302f169ff5a9569ee8f0d606c8fd251 files: - README.md patch_content: | diff --git a/pyproject.toml b/pyproject.toml index dc42f865..aeec4dab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "zep-cloud" dynamic = ["version"] -version = "4.0.0rc1" +version = "4.0.0rc2" [tool.poetry] name = "zep-cloud" -version = "4.0.0rc1" +version = "4.0.0rc2" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index ac980f73..977e5a93 100644 --- a/reference.md +++ b/reference.md @@ -98,7 +98,7 @@ client.agent.list()
-**limit:** `typing.Optional[int]` — Page size (maximum 100) +**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.
@@ -674,7 +674,7 @@ client.batch.list()
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -954,7 +954,7 @@ client.batch.list_items(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -1208,7 +1208,7 @@ client.context.list_templates()
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -1616,7 +1616,7 @@ client.graph.list()
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -1767,7 +1767,7 @@ client.graph.get(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -1826,7 +1826,7 @@ client.graph.delete(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -1885,7 +1885,7 @@ client.graph.update(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -1971,7 +1971,7 @@ client.graph.clone(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2052,7 +2052,7 @@ client.graph.get_content_policy(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2125,7 +2125,7 @@ client.graph.list_content_policy_events(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2133,7 +2133,7 @@ client.graph.list_content_policy_events(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -2149,7 +2149,7 @@ client.graph.list_content_policy_events(
-**filters:** `typing.Optional[typing.Dict[str, typing.Any]]` — Exact-match filters. Supported keys: episode_uuid and drop_reason. +**filters:** `typing.Optional[ContentPolicyEventListFilters]` — Exact-match filters that limit the events in the list.
@@ -2209,7 +2209,7 @@ client.graph.get_context(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2319,7 +2319,7 @@ client.graph.get_instructions(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2378,7 +2378,7 @@ client.graph.set_instructions(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2445,7 +2445,7 @@ client.graph.get_observation_steering(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2504,7 +2504,7 @@ client.graph.set_observation_steering(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2571,7 +2571,7 @@ client.graph.get_ontology(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2630,7 +2630,7 @@ client.graph.set_ontology(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2712,7 +2712,7 @@ client.graph.search_edges(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2728,7 +2728,7 @@ client.graph.search_edges(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -2763,6 +2763,24 @@ 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.
@@ -2842,7 +2860,7 @@ client.graph.search_episodes(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2850,7 +2868,7 @@ client.graph.search_episodes(
-**request:** `SearchRequest` +**query:** `str` — The search query.
@@ -2858,7 +2876,7 @@ client.graph.search_episodes(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -2874,6 +2892,70 @@ client.graph.search_episodes(
+**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[SearchFilters]` — 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.
@@ -2940,7 +3022,7 @@ client.graph.search_nodes(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -2956,7 +3038,7 @@ client.graph.search_nodes(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -2991,6 +3073,24 @@ 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.
@@ -3070,7 +3170,7 @@ client.graph.search_observations(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -3078,7 +3178,7 @@ client.graph.search_observations(
-**request:** `SearchRequest` +**query:** `str` — The search query.
@@ -3086,7 +3186,7 @@ client.graph.search_observations(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -3102,6 +3202,70 @@ client.graph.search_observations(
+**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[SearchFilters]` — 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.
@@ -3154,7 +3318,7 @@ client.graph.search_thread_summaries(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -3162,7 +3326,7 @@ client.graph.search_thread_summaries(
-**request:** `SearchRequest` +**query:** `str` — The search query.
@@ -3170,7 +3334,7 @@ client.graph.search_thread_summaries(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -3186,6 +3350,70 @@ client.graph.search_thread_summaries(
+**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[SearchFilters]` — 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.
@@ -3240,7 +3468,7 @@ client.graph.get_subgraph(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -3350,7 +3578,7 @@ client.graph.warm(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -3786,7 +4014,7 @@ client.project.list_content_policy_revisions()
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -4349,7 +4577,7 @@ client.task.list()
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -4474,7 +4702,7 @@ client.thread.list()
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -4874,7 +5102,7 @@ client.thread.list_episodes(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -4949,7 +5177,7 @@ client.thread.list_messages(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -5207,7 +5435,7 @@ client.trace_connection.list()
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -5819,7 +6047,7 @@ client.user_group.list()
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -6159,7 +6387,7 @@ client.user_group.list_member_candidates(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -6340,7 +6568,7 @@ client.user_group.list_members(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -6595,7 +6823,7 @@ client.user_group.list_for_user(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -6721,6 +6949,20 @@ does not change after creation.
+**user_id:** `typing.Optional[str]` + +An optional external identity identifier, such as an identity-provider +subject claim. Zep uses it to match an identity-provider sign-in to this +user. It is not an address; use uuid to address the user in v4. It is +unique within the project, can contain at most 500 characters, and +cannot be changed after creation. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -6770,7 +7012,7 @@ client.user.list()
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -7413,7 +7655,7 @@ client.agent.learning.list_runs(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -7803,7 +8045,7 @@ client.agent.skill.list(
-**limit:** `typing.Optional[int]` — Page size (maximum 20) +**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.
@@ -7919,7 +8161,7 @@ client.agent.skill.search(
-**limit:** `typing.Optional[int]` — Page size (maximum 20) +**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.
@@ -8467,7 +8709,7 @@ client.agent.task_family.list(
-**limit:** `typing.Optional[int]` — Page size (maximum 100) +**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.
@@ -8634,7 +8876,7 @@ client.agent.trace_import.list(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -8662,7 +8904,7 @@ client.agent.trace_import.list(
-
client.agent.trace_import.create(...) -> TraceImport +
client.agent.trace_import.create(...) -> TraceImportCreateResult
@@ -8674,7 +8916,7 @@ client.agent.trace_import.list(
-Create a scheduled import or queue a one-time import. Example request: `{"connection_uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1","provider_project_id":"project-123","name":"Support traces","selection":{"trace_ids":["trace-123"]},"mapping":{"task_family":{"source":"fixed","value":"support"}}}`. +Create a scheduled import or queue a one-time import. A scheduled import returns HTTP 201 with `import`. A one-time import returns HTTP 202 with `import`, `run`, and `task`. Example request: `{"connection_uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1","provider_project_id":"project-123","name":"Support traces","selection":{"trace_ids":["trace-123"]},"mapping":{"task_family":{"source":"fixed","value":"support"}}}`.
@@ -8755,7 +8997,7 @@ client.agent.trace_import.create(
-**on_source_change:** `typing.Optional[str]` — OnSourceChange defines how changed source traces are handled. +**on_source_change:** `typing.Optional[TraceImportOnSourceChange]` — OnSourceChange defines how changed source traces are handled.
@@ -8779,7 +9021,7 @@ client.agent.trace_import.create(
-**schedule:** `typing.Optional[TraceImportSchedule]` — Schedule enables recurring imports when supplied. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. +**schedule:** `typing.Optional[TraceImportSchedule]` — Schedule enables recurring imports when supplied. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}.
@@ -9081,7 +9323,7 @@ client.agent.trace_import.update(
-**on_source_change:** `typing.Optional[str]` — OnSourceChange is the new change policy, when supplied. +**on_source_change:** `typing.Optional[UpdateTraceImportRequestOnSourceChange]` — OnSourceChange is the new change policy, when supplied.
@@ -9097,7 +9339,7 @@ client.agent.trace_import.update(
-**schedule:** `typing.Optional[TraceImportSchedule]` — Schedule is the new schedule, when supplied. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. +**schedule:** `typing.Optional[TraceImportSchedule]` — Schedule is the new schedule, when supplied. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}.
@@ -9448,7 +9690,7 @@ client.agent.trace.list(
-**limit:** `typing.Optional[int]` — Page size (maximum 100) +**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.
@@ -10185,7 +10427,7 @@ client.agent.trace.list_events(
-**limit:** `typing.Optional[int]` — Page size (maximum 100) +**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.
@@ -10633,7 +10875,7 @@ client.agent.trace.list_summary_versions(
-**limit:** `typing.Optional[int]` — Page size (maximum 100) +**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.
@@ -10709,7 +10951,7 @@ client.agent.verifier.list(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -11167,7 +11409,7 @@ client.agent.skill.candidate.list(
-**limit:** `typing.Optional[int]` — Page size (maximum 100) +**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.
@@ -11793,7 +12035,7 @@ client.agent.skill.evidence.list(
-**limit:** `typing.Optional[int]` — Page size (maximum 100) +**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.
@@ -11886,7 +12128,7 @@ client.agent.skill.relation.list(
-**limit:** `typing.Optional[int]` — Page size (maximum 100) +**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.
@@ -12057,7 +12299,7 @@ client.agent.skill.version.list(
-**limit:** `typing.Optional[int]` — Page size (maximum 100) +**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.
@@ -12697,7 +12939,7 @@ client.agent.trace_import.run.list(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -12978,7 +13220,7 @@ client.agent.trace_import.run.item.list(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -13011,6 +13253,23 @@ client.agent.trace_import.run.item.list(
+#### 📝 Description + +
+
+ +
+
+ +Lists the document summaries of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. +You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. +You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. +If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. +
+
+
+
+ #### 🔌 Usage
@@ -13046,7 +13305,7 @@ client.graph.document_summary.list(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13054,7 +13313,7 @@ client.graph.document_summary.list(
-**request:** `ArtifactListRequest` +**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.
@@ -13062,7 +13321,7 @@ client.graph.document_summary.list(
-**limit:** `typing.Optional[int]` — Page size +**cursor:** `typing.Optional[str]` — Opaque page cursor
@@ -13070,7 +13329,26 @@ client.graph.document_summary.list(
-**cursor:** `typing.Optional[str]` — Opaque page cursor +**order_by:** `typing.Optional[DocumentSummaryListRequestOrderBy]` — Sort key: uuid (default) or created_at + +
+
+ +
+
+ +**order:** `typing.Optional[DocumentSummaryListRequestOrder]` — Sort direction: asc or desc (default desc) + +
+
+ +
+
+ +**filters:** `typing.Optional[DocumentSummaryListFilters]` + +Filters that limit the items in the list. The operation description +names the filter fields that the operation does not support.
@@ -13131,7 +13409,7 @@ client.graph.episode.list_for_document(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13147,7 +13425,7 @@ client.graph.episode.list_for_document(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -13215,7 +13493,7 @@ client.graph.episode.add(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13355,7 +13633,7 @@ client.graph.episode.list(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13363,7 +13641,7 @@ client.graph.episode.list(
-**request:** `ArtifactListRequest` +**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.
@@ -13371,7 +13649,7 @@ client.graph.episode.list(
-**limit:** `typing.Optional[int]` — Page size +**cursor:** `typing.Optional[str]` — Opaque page cursor
@@ -13379,7 +13657,7 @@ client.graph.episode.list(
-**cursor:** `typing.Optional[str]` — Opaque page cursor +**order_by:** `typing.Optional[EpisodeListRequestOrderBy]` — Sort field
@@ -13387,7 +13665,7 @@ client.graph.episode.list(
-**order_by:** `typing.Optional[EpisodeListRequestOrderBy]` — Sort field +**order:** `typing.Optional[EpisodeListRequestOrder]` — Sort direction: asc or desc
@@ -13395,7 +13673,7 @@ client.graph.episode.list(
-**order:** `typing.Optional[EpisodeListRequestOrder]` — Sort direction: asc or desc +**filters:** `typing.Optional[EpisodeListFilters]` — Filters that limit the episodes in the list.
@@ -13455,7 +13733,7 @@ client.graph.episode.get(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13523,7 +13801,7 @@ client.graph.episode.delete(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13591,7 +13869,7 @@ client.graph.episode.update(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13681,7 +13959,7 @@ client.graph.episode.get_debug_logs(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13763,7 +14041,7 @@ client.graph.episode.list_ingestion_traces(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13779,7 +14057,7 @@ client.graph.episode.list_ingestion_traces(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -13870,7 +14148,7 @@ client.graph.edge.add(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13914,6 +14192,23 @@ edge. The default is false.
+#### 📝 Description + +
+
+ +
+
+ +Lists the edges of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. +You can sort by `uuid`, `created_at`, or `valid_at`. The default sort is `uuid` in descending order. An edge with no `valid_at` sorts as if its `valid_at` is 1970-01-01T00:00:00Z. Thus it comes before an edge with a later `valid_at` in ascending order, and after an edge with an earlier `valid_at`. +You can use all `filters` fields except `content_policy_violated`. +If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. +
+
+
+
+ #### 🔌 Usage
@@ -13949,7 +14244,7 @@ client.graph.edge.list(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -13957,7 +14252,7 @@ client.graph.edge.list(
-**request:** `ArtifactListRequest` +**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.
@@ -13965,7 +14260,7 @@ client.graph.edge.list(
-**limit:** `typing.Optional[int]` — Page size +**cursor:** `typing.Optional[str]` — Opaque page cursor
@@ -13973,7 +14268,26 @@ client.graph.edge.list(
-**cursor:** `typing.Optional[str]` — Opaque page cursor +**order_by:** `typing.Optional[EdgeListRequestOrderBy]` — Sort key: uuid (default), created_at, or valid_at + +
+
+ +
+
+ +**order:** `typing.Optional[EdgeListRequestOrder]` — Sort direction: asc or desc (default desc) + +
+
+ +
+
+ +**filters:** `typing.Optional[EdgeListFilters]` + +Filters that limit the items in the list. The operation description +names the filter fields that the operation does not support.
@@ -14033,7 +14347,7 @@ client.graph.edge.get(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -14101,7 +14415,7 @@ client.graph.edge.delete(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -14186,7 +14500,7 @@ client.graph.edge.update(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -14303,7 +14617,7 @@ client.graph.hyperedge.add(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -14438,7 +14752,7 @@ client.graph.hyperedge.list(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -14446,7 +14760,7 @@ client.graph.hyperedge.list(
-**request:** `ArtifactListRequest` +**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.
@@ -14454,7 +14768,7 @@ client.graph.hyperedge.list(
-**limit:** `typing.Optional[int]` — Page size +**cursor:** `typing.Optional[str]` — Opaque page cursor
@@ -14462,7 +14776,7 @@ client.graph.hyperedge.list(
-**cursor:** `typing.Optional[str]` — Opaque page cursor +**order_by:** `typing.Optional[HyperedgeListRequestOrderBy]` — Sort key: uuid or created_at
@@ -14470,7 +14784,7 @@ client.graph.hyperedge.list(
-**order_by:** `typing.Optional[HyperedgeListRequestOrderBy]` — Sort key: uuid or created_at +**order:** `typing.Optional[HyperedgeListRequestOrder]` — Sort direction: asc or desc
@@ -14478,7 +14792,7 @@ client.graph.hyperedge.list(
-**order:** `typing.Optional[HyperedgeListRequestOrder]` — Sort direction: asc or desc +**filters:** `typing.Optional[HyperedgeListFilters]` — Filters that limit the hyperedges in the list.
@@ -14554,7 +14868,7 @@ client.graph.hyperedge.get(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -14637,7 +14951,7 @@ client.graph.hyperedge.delete(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -14724,7 +15038,7 @@ client.graph.hyperedge.update(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -14819,7 +15133,7 @@ client.graph.hyperedge.create_edge(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -14927,7 +15241,7 @@ client.graph.hyperedge.delete_edge(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -15008,7 +15322,7 @@ client.graph.node.add(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -15040,6 +15354,23 @@ client.graph.node.add(
+#### 📝 Description + +
+
+ +
+
+ +Lists the nodes of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. +You can sort by `uuid`, `created_at`, or `degree`. The default sort is `uuid` in descending order. +You cannot use these `filters` fields: `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. +If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. +
+
+
+
+ #### 🔌 Usage
@@ -15075,7 +15406,7 @@ client.graph.node.list(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -15083,7 +15414,7 @@ client.graph.node.list(
-**request:** `ArtifactListRequest` +**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.
@@ -15091,7 +15422,7 @@ client.graph.node.list(
-**limit:** `typing.Optional[int]` — Page size +**cursor:** `typing.Optional[str]` — Opaque page cursor
@@ -15099,7 +15430,7 @@ client.graph.node.list(
-**cursor:** `typing.Optional[str]` — Opaque page cursor +**order_by:** `typing.Optional[NodeListRequestOrderBy]` — Sort key: uuid (default), created_at, or degree
@@ -15107,7 +15438,7 @@ client.graph.node.list(
-**order_by:** `typing.Optional[NodeListRequestOrderBy]` — Sort key: uuid (default) or degree +**order:** `typing.Optional[NodeListRequestOrder]` — Sort direction: asc or desc (default desc)
@@ -15115,7 +15446,10 @@ client.graph.node.list(
-**order:** `typing.Optional[NodeListRequestOrder]` — Sort direction: asc or desc (default desc) +**filters:** `typing.Optional[NodeListFilters]` + +Filters that limit the items in the list. The operation description +names the filter fields that the operation does not support.
@@ -15175,7 +15509,7 @@ client.graph.node.get(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -15243,7 +15577,7 @@ client.graph.node.delete(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -15311,7 +15645,7 @@ client.graph.node.update(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -15406,7 +15740,7 @@ client.graph.node.list_neighbors(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -15422,7 +15756,7 @@ client.graph.node.list_neighbors(
-**limit:** `typing.Optional[int]` — Page size +**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.
@@ -15487,6 +15821,23 @@ client.graph.node.list_neighbors(
+#### 📝 Description + +
+
+ +
+
+ +Lists the observations of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. +You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. +You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. +If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. +
+
+
+
+ #### 🔌 Usage
@@ -15522,7 +15873,7 @@ client.graph.observation.list(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -15530,7 +15881,7 @@ client.graph.observation.list(
-**request:** `ArtifactListRequest` +**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.
@@ -15538,7 +15889,7 @@ client.graph.observation.list(
-**limit:** `typing.Optional[int]` — Page size +**cursor:** `typing.Optional[str]` — Opaque page cursor
@@ -15546,7 +15897,26 @@ client.graph.observation.list(
-**cursor:** `typing.Optional[str]` — Opaque page cursor +**order_by:** `typing.Optional[ObservationListRequestOrderBy]` — Sort key: uuid (default) or created_at + +
+
+ +
+
+ +**order:** `typing.Optional[ObservationListRequestOrder]` — Sort direction: asc or desc (default desc) + +
+
+ +
+
+ +**filters:** `typing.Optional[ObservationListFilters]` + +Filters that limit the items in the list. The operation description +names the filter fields that the operation does not support.
@@ -15606,7 +15976,7 @@ client.graph.observation.get(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -15639,6 +16009,23 @@ client.graph.observation.get(
+#### 📝 Description + +
+
+ +
+
+ +Lists the thread summaries of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. +You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. +You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. +If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. +
+
+
+
+ #### 🔌 Usage
@@ -15674,7 +16061,7 @@ client.graph.thread_summary.list(
-**graph_uuid:** `str` — Graph UUID +**graph_uuid:** `str` — The UUID of the graph. For a user graph, you can also use the UUID of the user.
@@ -15682,7 +16069,7 @@ client.graph.thread_summary.list(
-**request:** `ArtifactListRequest` +**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.
@@ -15690,7 +16077,7 @@ client.graph.thread_summary.list(
-**limit:** `typing.Optional[int]` — Page size +**cursor:** `typing.Optional[str]` — Opaque page cursor
@@ -15698,7 +16085,26 @@ client.graph.thread_summary.list(
-**cursor:** `typing.Optional[str]` — Opaque page cursor +**order_by:** `typing.Optional[ThreadSummaryListRequestOrderBy]` — Sort key: uuid (default) or created_at + +
+
+ +
+
+ +**order:** `typing.Optional[ThreadSummaryListRequestOrder]` — Sort direction: asc or desc (default desc) + +
+
+ +
+
+ +**filters:** `typing.Optional[ThreadSummaryListFilters]` + +Filters that limit the items in the list. The operation description +names the filter fields that the operation does not support.
@@ -15876,7 +16282,7 @@ client.thread.message.update(
-List provider projects with the `limit` and `cursor` query parameters. +List provider projects with the `page_size` and `cursor` query parameters.
@@ -15925,7 +16331,7 @@ client.trace_connection.project.list(
-**limit:** `typing.Optional[int]` — Page size from 1 to 100; default 50 +**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.
@@ -16123,7 +16529,7 @@ client.trace_connection.trace.list(
-**limit:** `typing.Optional[int]` — Page size from 1 to 100; default 25 +**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.
diff --git a/src/zep_cloud/__init__.py b/src/zep_cloud/__init__.py index 47a51b65..3cbb5e14 100644 --- a/src/zep_cloud/__init__.py +++ b/src/zep_cloud/__init__.py @@ -50,6 +50,22 @@ AgentSkillCandidateReviewSummary, AgentSkillCompilationOutcome, AgentSkillCompilationOutcomeRejectionClass, + AgentSkillContract, + AgentSkillContractApplicability, + AgentSkillContractDependency, + AgentSkillContractEvidence, + AgentSkillContractEvidencePolarity, + AgentSkillContractEvidenceSourceKind, + AgentSkillContractFailure, + AgentSkillContractInvocation, + AgentSkillContractOrigin, + AgentSkillContractRelation, + AgentSkillContractRelationKind, + AgentSkillContractResource, + AgentSkillContractSection, + AgentSkillContractStep, + AgentSkillContractText, + AgentSkillContractVersionConstraint, AgentSkillEvaluation, AgentSkillEvidence, AgentSkillPublicationLineage, @@ -90,10 +106,19 @@ AgentTraceSequenceRange, AgentTraceSource, AgentTraceSourceDeletionResult, + AgentTraceStructuredSummary, + AgentTraceSummaryByteRange, + AgentTraceSummaryCitation, + AgentTraceSummaryCoverage, AgentTraceSummaryCreationReason, + AgentTraceSummaryExcerptedEvent, AgentTraceSummaryOmissionReason, AgentTraceSummaryOmittedRange, AgentTraceSummaryPage, + AgentTraceSummaryResource, + AgentTraceSummaryStatement, + AgentTraceSummaryVerification, + AgentTraceSummaryVerificationStatus, AgentTraceSummaryVersion, AgentTraceTaskFamilyInference, AgentTraceVerification, @@ -106,7 +131,6 @@ AgentVerifierPrincipalBindingInput, AgentVerifierStatus, ApiError, - ArtifactListRequest, AsyncResult, Batch, BatchItem, @@ -119,6 +143,8 @@ BatchItemStatus, BatchItemsResponse, BatchPage, + BatchProgress, + BatchStatus, CloneGraphRequest, CloneGraphResult, ContentPolicy, @@ -127,6 +153,8 @@ ContentPolicyEvent, ContentPolicyEventArtifactKind, ContentPolicyEventDropReason, + ContentPolicyEventListFilters, + ContentPolicyEventListFiltersDropReason, ContentPolicyEventPage, ContentPolicyRevisionPage, ContentPolicyRule, @@ -153,9 +181,11 @@ DebugLoggingEnablement, DeleteAgentTraceRequest, DocumentSummary, + DocumentSummaryListFilters, DocumentSummaryPage, Edge, EdgeInput, + EdgeListFilters, EdgeNodeRef, EdgePage, EdgeSearchFilters, @@ -168,6 +198,7 @@ EpisodeContentPolicy, EpisodeContentPolicyStatus, EpisodeDebugLog, + EpisodeListFilters, EpisodePage, ErrorBody, Graph, @@ -180,6 +211,7 @@ Hyperedge, HyperedgeEdge, HyperedgeInput, + HyperedgeListFilters, HyperedgePage, ImportedTraceReference, IngestionTrace, @@ -200,6 +232,7 @@ Instructions, LookupBatchResponse, LookupItem, + LookupItemResourceType, LookupRequest, MembershipMutationResult, Message, @@ -215,11 +248,13 @@ NeighborPage, Node, NodeInput, + NodeListFilters, NodePage, NodeSearchFilters, ObjectiveMappingRule, ObjectiveMappingRuleSource, Observation, + ObservationListFilters, ObservationPage, ObservationSteering, ObservationType, @@ -243,11 +278,10 @@ RoleType, SearchFilters, SearchListRequest, - SearchRequest, - SearchRequestReranker, SkillDefinition, SkillDefinitionSection, SkillFailure, + SkillKind, SkillProcedureStep, SkillRelation, SkillResource, @@ -262,11 +296,18 @@ TaskFamilyMappingRuleSource, TaskPage, TaskProgress, + TaskResult, + TaskResultContentPolicy, + TaskResultContentPolicyStatus, + TaskResultEdge, + TaskResultEpisode, + TaskStatus, Thread, ThreadContextResponse, ThreadDeleteResult, ThreadPage, ThreadSummary, + ThreadSummaryListFilters, ThreadSummaryPage, TraceConnection, TraceConnectionPage, @@ -275,6 +316,8 @@ TraceContentMapping, TraceFilter, TraceImport, + TraceImportCreateResult, + TraceImportOnSourceChange, TraceImportPage, TraceImportPauseReason, TraceImportProvider, @@ -339,7 +382,10 @@ GraphListRequestOrder, GraphListRequestOrderBy, SearchEdgesRequestReranker, + SearchEpisodesRequestReranker, SearchNodesRequestReranker, + SearchObservationsRequestReranker, + SearchThreadSummariesRequestReranker, SubgraphRequestDirection, ) from .thread import ThreadListMessagesRequestOrder, ThreadListRequestOrder, ThreadListRequestOrderBy @@ -392,6 +438,22 @@ "AgentSkillCandidateReviewSummary": ".types", "AgentSkillCompilationOutcome": ".types", "AgentSkillCompilationOutcomeRejectionClass": ".types", + "AgentSkillContract": ".types", + "AgentSkillContractApplicability": ".types", + "AgentSkillContractDependency": ".types", + "AgentSkillContractEvidence": ".types", + "AgentSkillContractEvidencePolarity": ".types", + "AgentSkillContractEvidenceSourceKind": ".types", + "AgentSkillContractFailure": ".types", + "AgentSkillContractInvocation": ".types", + "AgentSkillContractOrigin": ".types", + "AgentSkillContractRelation": ".types", + "AgentSkillContractRelationKind": ".types", + "AgentSkillContractResource": ".types", + "AgentSkillContractSection": ".types", + "AgentSkillContractStep": ".types", + "AgentSkillContractText": ".types", + "AgentSkillContractVersionConstraint": ".types", "AgentSkillEvaluation": ".types", "AgentSkillEvidence": ".types", "AgentSkillPublicationLineage": ".types", @@ -432,10 +494,19 @@ "AgentTraceSequenceRange": ".types", "AgentTraceSource": ".types", "AgentTraceSourceDeletionResult": ".types", + "AgentTraceStructuredSummary": ".types", + "AgentTraceSummaryByteRange": ".types", + "AgentTraceSummaryCitation": ".types", + "AgentTraceSummaryCoverage": ".types", "AgentTraceSummaryCreationReason": ".types", + "AgentTraceSummaryExcerptedEvent": ".types", "AgentTraceSummaryOmissionReason": ".types", "AgentTraceSummaryOmittedRange": ".types", "AgentTraceSummaryPage": ".types", + "AgentTraceSummaryResource": ".types", + "AgentTraceSummaryStatement": ".types", + "AgentTraceSummaryVerification": ".types", + "AgentTraceSummaryVerificationStatus": ".types", "AgentTraceSummaryVersion": ".types", "AgentTraceTaskFamilyInference": ".types", "AgentTraceVerification": ".types", @@ -448,7 +519,6 @@ "AgentVerifierPrincipalBindingInput": ".types", "AgentVerifierStatus": ".types", "ApiError": ".types", - "ArtifactListRequest": ".types", "AsyncResult": ".types", "AsyncZep": ".client", "BadGatewayError": ".errors", @@ -465,6 +535,8 @@ "BatchItemsResponse": ".types", "BatchListRequestStatus": ".batch", "BatchPage": ".types", + "BatchProgress": ".types", + "BatchStatus": ".types", "CloneGraphRequest": ".types", "CloneGraphResult": ".types", "ConflictError": ".errors", @@ -474,6 +546,8 @@ "ContentPolicyEvent": ".types", "ContentPolicyEventArtifactKind": ".types", "ContentPolicyEventDropReason": ".types", + "ContentPolicyEventListFilters": ".types", + "ContentPolicyEventListFiltersDropReason": ".types", "ContentPolicyEventPage": ".types", "ContentPolicyRevisionPage": ".types", "ContentPolicyRule": ".types", @@ -504,9 +578,11 @@ "DefaultAsyncHttpxClient": "._default_clients", "DeleteAgentTraceRequest": ".types", "DocumentSummary": ".types", + "DocumentSummaryListFilters": ".types", "DocumentSummaryPage": ".types", "Edge": ".types", "EdgeInput": ".types", + "EdgeListFilters": ".types", "EdgeNodeRef": ".types", "EdgePage": ".types", "EdgeSearchFilters": ".types", @@ -519,6 +595,7 @@ "EpisodeContentPolicy": ".types", "EpisodeContentPolicyStatus": ".types", "EpisodeDebugLog": ".types", + "EpisodeListFilters": ".types", "EpisodePage": ".types", "ErrorBody": ".types", "ForbiddenError": ".errors", @@ -535,6 +612,7 @@ "Hyperedge": ".types", "HyperedgeEdge": ".types", "HyperedgeInput": ".types", + "HyperedgeListFilters": ".types", "HyperedgePage": ".types", "ImportedTraceReference": ".types", "IngestionTrace": ".types", @@ -555,6 +633,7 @@ "Instructions": ".types", "LookupBatchResponse": ".types", "LookupItem": ".types", + "LookupItemResourceType": ".types", "LookupRequest": ".types", "MembershipMutationResult": ".types", "Message": ".types", @@ -570,12 +649,14 @@ "NeighborPage": ".types", "Node": ".types", "NodeInput": ".types", + "NodeListFilters": ".types", "NodePage": ".types", "NodeSearchFilters": ".types", "NotFoundError": ".errors", "ObjectiveMappingRule": ".types", "ObjectiveMappingRuleSource": ".types", "Observation": ".types", + "ObservationListFilters": ".types", "ObservationPage": ".types", "ObservationSteering": ".types", "ObservationType": ".types", @@ -598,15 +679,17 @@ "RenameAgentTaskFamilyResponse": ".types", "RoleType": ".types", "SearchEdgesRequestReranker": ".graph", + "SearchEpisodesRequestReranker": ".graph", "SearchFilters": ".types", "SearchListRequest": ".types", "SearchNodesRequestReranker": ".graph", - "SearchRequest": ".types", - "SearchRequestReranker": ".types", + "SearchObservationsRequestReranker": ".graph", + "SearchThreadSummariesRequestReranker": ".graph", "ServiceUnavailableError": ".errors", "SkillDefinition": ".types", "SkillDefinitionSection": ".types", "SkillFailure": ".types", + "SkillKind": ".types", "SkillProcedureStep": ".types", "SkillRelation": ".types", "SkillResource": ".types", @@ -622,6 +705,12 @@ "TaskFamilyMappingRuleSource": ".types", "TaskPage": ".types", "TaskProgress": ".types", + "TaskResult": ".types", + "TaskResultContentPolicy": ".types", + "TaskResultContentPolicyStatus": ".types", + "TaskResultEdge": ".types", + "TaskResultEpisode": ".types", + "TaskStatus": ".types", "Thread": ".types", "ThreadContextResponse": ".types", "ThreadDeleteResult": ".types", @@ -630,6 +719,7 @@ "ThreadListRequestOrderBy": ".thread", "ThreadPage": ".types", "ThreadSummary": ".types", + "ThreadSummaryListFilters": ".types", "ThreadSummaryPage": ".types", "TraceConnection": ".types", "TraceConnectionPage": ".types", @@ -638,6 +728,8 @@ "TraceContentMapping": ".types", "TraceFilter": ".types", "TraceImport": ".types", + "TraceImportCreateResult": ".types", + "TraceImportOnSourceChange": ".types", "TraceImportPage": ".types", "TraceImportPauseReason": ".types", "TraceImportProvider": ".types", @@ -755,6 +847,22 @@ def __dir__(): "AgentSkillCandidateReviewSummary", "AgentSkillCompilationOutcome", "AgentSkillCompilationOutcomeRejectionClass", + "AgentSkillContract", + "AgentSkillContractApplicability", + "AgentSkillContractDependency", + "AgentSkillContractEvidence", + "AgentSkillContractEvidencePolarity", + "AgentSkillContractEvidenceSourceKind", + "AgentSkillContractFailure", + "AgentSkillContractInvocation", + "AgentSkillContractOrigin", + "AgentSkillContractRelation", + "AgentSkillContractRelationKind", + "AgentSkillContractResource", + "AgentSkillContractSection", + "AgentSkillContractStep", + "AgentSkillContractText", + "AgentSkillContractVersionConstraint", "AgentSkillEvaluation", "AgentSkillEvidence", "AgentSkillPublicationLineage", @@ -795,10 +903,19 @@ def __dir__(): "AgentTraceSequenceRange", "AgentTraceSource", "AgentTraceSourceDeletionResult", + "AgentTraceStructuredSummary", + "AgentTraceSummaryByteRange", + "AgentTraceSummaryCitation", + "AgentTraceSummaryCoverage", "AgentTraceSummaryCreationReason", + "AgentTraceSummaryExcerptedEvent", "AgentTraceSummaryOmissionReason", "AgentTraceSummaryOmittedRange", "AgentTraceSummaryPage", + "AgentTraceSummaryResource", + "AgentTraceSummaryStatement", + "AgentTraceSummaryVerification", + "AgentTraceSummaryVerificationStatus", "AgentTraceSummaryVersion", "AgentTraceTaskFamilyInference", "AgentTraceVerification", @@ -811,7 +928,6 @@ def __dir__(): "AgentVerifierPrincipalBindingInput", "AgentVerifierStatus", "ApiError", - "ArtifactListRequest", "AsyncResult", "AsyncZep", "BadGatewayError", @@ -828,6 +944,8 @@ def __dir__(): "BatchItemsResponse", "BatchListRequestStatus", "BatchPage", + "BatchProgress", + "BatchStatus", "CloneGraphRequest", "CloneGraphResult", "ConflictError", @@ -837,6 +955,8 @@ def __dir__(): "ContentPolicyEvent", "ContentPolicyEventArtifactKind", "ContentPolicyEventDropReason", + "ContentPolicyEventListFilters", + "ContentPolicyEventListFiltersDropReason", "ContentPolicyEventPage", "ContentPolicyRevisionPage", "ContentPolicyRule", @@ -867,9 +987,11 @@ def __dir__(): "DefaultAsyncHttpxClient", "DeleteAgentTraceRequest", "DocumentSummary", + "DocumentSummaryListFilters", "DocumentSummaryPage", "Edge", "EdgeInput", + "EdgeListFilters", "EdgeNodeRef", "EdgePage", "EdgeSearchFilters", @@ -882,6 +1004,7 @@ def __dir__(): "EpisodeContentPolicy", "EpisodeContentPolicyStatus", "EpisodeDebugLog", + "EpisodeListFilters", "EpisodePage", "ErrorBody", "ForbiddenError", @@ -898,6 +1021,7 @@ def __dir__(): "Hyperedge", "HyperedgeEdge", "HyperedgeInput", + "HyperedgeListFilters", "HyperedgePage", "ImportedTraceReference", "IngestionTrace", @@ -918,6 +1042,7 @@ def __dir__(): "Instructions", "LookupBatchResponse", "LookupItem", + "LookupItemResourceType", "LookupRequest", "MembershipMutationResult", "Message", @@ -933,12 +1058,14 @@ def __dir__(): "NeighborPage", "Node", "NodeInput", + "NodeListFilters", "NodePage", "NodeSearchFilters", "NotFoundError", "ObjectiveMappingRule", "ObjectiveMappingRuleSource", "Observation", + "ObservationListFilters", "ObservationPage", "ObservationSteering", "ObservationType", @@ -961,15 +1088,17 @@ def __dir__(): "RenameAgentTaskFamilyResponse", "RoleType", "SearchEdgesRequestReranker", + "SearchEpisodesRequestReranker", "SearchFilters", "SearchListRequest", "SearchNodesRequestReranker", - "SearchRequest", - "SearchRequestReranker", + "SearchObservationsRequestReranker", + "SearchThreadSummariesRequestReranker", "ServiceUnavailableError", "SkillDefinition", "SkillDefinitionSection", "SkillFailure", + "SkillKind", "SkillProcedureStep", "SkillRelation", "SkillResource", @@ -985,6 +1114,12 @@ def __dir__(): "TaskFamilyMappingRuleSource", "TaskPage", "TaskProgress", + "TaskResult", + "TaskResultContentPolicy", + "TaskResultContentPolicyStatus", + "TaskResultEdge", + "TaskResultEpisode", + "TaskStatus", "Thread", "ThreadContextResponse", "ThreadDeleteResult", @@ -993,6 +1128,7 @@ def __dir__(): "ThreadListRequestOrderBy", "ThreadPage", "ThreadSummary", + "ThreadSummaryListFilters", "ThreadSummaryPage", "TraceConnection", "TraceConnectionPage", @@ -1001,6 +1137,8 @@ def __dir__(): "TraceContentMapping", "TraceFilter", "TraceImport", + "TraceImportCreateResult", + "TraceImportOnSourceChange", "TraceImportPage", "TraceImportPauseReason", "TraceImportProvider", diff --git a/src/zep_cloud/agent/__init__.py b/src/zep_cloud/agent/__init__.py index 37833c4f..49c038a4 100644 --- a/src/zep_cloud/agent/__init__.py +++ b/src/zep_cloud/agent/__init__.py @@ -11,7 +11,7 @@ from .literal_policy import UpdateAgentLiteralPolicyRequestDefault from .skill import AgentSkillSearchRequestMarkdownFormat from .trace import TraceListRequestOrder, TraceListRequestOrderBy, TraceListRequestSourceKind - from .trace_import import TraceImportDeleteRequestTraces + from .trace_import import TraceImportDeleteRequestTraces, UpdateTraceImportRequestOnSourceChange _dynamic_imports: typing.Dict[str, str] = { "AgentListRequestOrder": ".types", "AgentListRequestOrderBy": ".types", @@ -21,6 +21,7 @@ "TraceListRequestOrderBy": ".trace", "TraceListRequestSourceKind": ".trace", "UpdateAgentLiteralPolicyRequestDefault": ".literal_policy", + "UpdateTraceImportRequestOnSourceChange": ".trace_import", "learning": ".learning", "literal_policy": ".literal_policy", "skill": ".skill", @@ -62,6 +63,7 @@ def __dir__(): "TraceListRequestOrderBy", "TraceListRequestSourceKind", "UpdateAgentLiteralPolicyRequestDefault", + "UpdateTraceImportRequestOnSourceChange", "learning", "literal_policy", "skill", diff --git a/src/zep_cloud/agent/client.py b/src/zep_cloud/agent/client.py index e2ac06d0..f461ea91 100644 --- a/src/zep_cloud/agent/client.py +++ b/src/zep_cloud/agent/client.py @@ -137,7 +137,7 @@ def create( def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[AgentListRequestOrderBy] = None, order: typing.Optional[AgentListRequestOrder] = None, @@ -152,8 +152,8 @@ def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -206,7 +206,7 @@ def list( yield page """ return self._raw_client.list( - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -670,7 +670,7 @@ async def main() -> None: async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[AgentListRequestOrderBy] = None, order: typing.Optional[AgentListRequestOrder] = None, @@ -685,8 +685,8 @@ async def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -748,7 +748,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, diff --git a/src/zep_cloud/agent/learning/client.py b/src/zep_cloud/agent/learning/client.py index 96a4a58f..5ed72a7e 100644 --- a/src/zep_cloud/agent/learning/client.py +++ b/src/zep_cloud/agent/learning/client.py @@ -66,7 +66,7 @@ def list_runs( agent_uuid: str, *, task_family: typing.Optional[str] = None, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentSkillCompilationOutcome, Pagev4AgentSkillCompilationOutcome]: @@ -79,8 +79,8 @@ def list_runs( task_family : typing.Optional[str] Task family - limit : typing.Optional[int] - Page size + 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 @@ -110,7 +110,7 @@ def list_runs( yield page """ return self._raw_client.list_runs( - agent_uuid, task_family=task_family, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, task_family=task_family, page_size=page_size, cursor=cursor, request_options=request_options ) @@ -177,7 +177,7 @@ async def list_runs( agent_uuid: str, *, task_family: typing.Optional[str] = None, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentSkillCompilationOutcome, Pagev4AgentSkillCompilationOutcome]: @@ -190,8 +190,8 @@ async def list_runs( task_family : typing.Optional[str] Task family - limit : typing.Optional[int] - Page size + 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 @@ -230,5 +230,5 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_runs( - agent_uuid, task_family=task_family, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, task_family=task_family, page_size=page_size, cursor=cursor, request_options=request_options ) diff --git a/src/zep_cloud/agent/learning/raw_client.py b/src/zep_cloud/agent/learning/raw_client.py index 09b9d873..da3f2e34 100644 --- a/src/zep_cloud/agent/learning/raw_client.py +++ b/src/zep_cloud/agent/learning/raw_client.py @@ -126,7 +126,7 @@ def list_runs( agent_uuid: str, *, task_family: typing.Optional[str] = None, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentSkillCompilationOutcome, Pagev4AgentSkillCompilationOutcome]: @@ -139,8 +139,8 @@ def list_runs( task_family : typing.Optional[str] Task family - limit : typing.Optional[int] - Page size + 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 @@ -158,7 +158,7 @@ def list_runs( method="GET", params={ "task_family": task_family, - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -178,7 +178,7 @@ def list_runs( _get_next = lambda: self.list_runs( agent_uuid, task_family=task_family, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -323,7 +323,7 @@ async def list_runs( agent_uuid: str, *, task_family: typing.Optional[str] = None, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentSkillCompilationOutcome, Pagev4AgentSkillCompilationOutcome]: @@ -336,8 +336,8 @@ async def list_runs( task_family : typing.Optional[str] Task family - limit : typing.Optional[int] - Page size + 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 @@ -355,7 +355,7 @@ async def list_runs( method="GET", params={ "task_family": task_family, - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -377,7 +377,7 @@ async def _get_next(): return await self.list_runs( agent_uuid, task_family=task_family, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/agent/raw_client.py b/src/zep_cloud/agent/raw_client.py index c9f78ef3..8437164e 100644 --- a/src/zep_cloud/agent/raw_client.py +++ b/src/zep_cloud/agent/raw_client.py @@ -194,7 +194,7 @@ def create( def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[AgentListRequestOrderBy] = None, order: typing.Optional[AgentListRequestOrder] = None, @@ -209,8 +209,8 @@ def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -252,7 +252,7 @@ def list( "agents/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -285,7 +285,7 @@ def list( _parsed_next = _parsed_response.next_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -1138,7 +1138,7 @@ async def create( async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[AgentListRequestOrderBy] = None, order: typing.Optional[AgentListRequestOrder] = None, @@ -1153,8 +1153,8 @@ async def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -1196,7 +1196,7 @@ async def list( "agents/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -1231,7 +1231,7 @@ async def list( async def _get_next(): return await self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, diff --git a/src/zep_cloud/agent/skill/candidate/client.py b/src/zep_cloud/agent/skill/candidate/client.py index 55acf471..2f04acf5 100644 --- a/src/zep_cloud/agent/skill/candidate/client.py +++ b/src/zep_cloud/agent/skill/candidate/client.py @@ -30,7 +30,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentSkillCandidateReviewSummary, Pagev4AgentSkillCandidateReviewSummary]: @@ -40,8 +40,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -70,7 +70,7 @@ def list( for page in response.iter_pages(): yield page """ - return self._raw_client.list(agent_uuid, limit=limit, cursor=cursor, request_options=request_options) + return self._raw_client.list(agent_uuid, page_size=page_size, cursor=cursor, request_options=request_options) def get( self, agent_uuid: str, review_uuid: str, *, request_options: typing.Optional[RequestOptions] = None @@ -127,7 +127,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentSkillCandidateReviewSummary, Pagev4AgentSkillCandidateReviewSummary]: @@ -137,8 +137,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -176,7 +176,9 @@ async def main() -> None: asyncio.run(main()) """ - return await self._raw_client.list(agent_uuid, limit=limit, cursor=cursor, request_options=request_options) + return await self._raw_client.list( + agent_uuid, page_size=page_size, cursor=cursor, request_options=request_options + ) async def get( self, agent_uuid: str, review_uuid: str, *, request_options: typing.Optional[RequestOptions] = None diff --git a/src/zep_cloud/agent/skill/candidate/raw_client.py b/src/zep_cloud/agent/skill/candidate/raw_client.py index 6361e239..849046e1 100644 --- a/src/zep_cloud/agent/skill/candidate/raw_client.py +++ b/src/zep_cloud/agent/skill/candidate/raw_client.py @@ -32,7 +32,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentSkillCandidateReviewSummary, Pagev4AgentSkillCandidateReviewSummary]: @@ -42,8 +42,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -60,7 +60,7 @@ def list( f"agents/{encode_path_param(agent_uuid)}/skill-candidates", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -79,7 +79,7 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -275,7 +275,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentSkillCandidateReviewSummary, Pagev4AgentSkillCandidateReviewSummary]: @@ -285,8 +285,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -303,7 +303,7 @@ async def list( f"agents/{encode_path_param(agent_uuid)}/skill-candidates", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -324,7 +324,7 @@ async def list( async def _get_next(): return await self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/agent/skill/client.py b/src/zep_cloud/agent/skill/client.py index 7d4682ef..deca5b85 100644 --- a/src/zep_cloud/agent/skill/client.py +++ b/src/zep_cloud/agent/skill/client.py @@ -142,7 +142,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, environments: typing.Optional[typing.Sequence[str]] = OMIT, kind: typing.Optional[str] = OMIT, @@ -156,8 +156,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 20) + 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 @@ -196,7 +196,7 @@ def list( """ return self._raw_client.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=cursor, environments=environments, kind=kind, @@ -210,7 +210,7 @@ def search( agent_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, environments: typing.Optional[typing.Sequence[str]] = OMIT, include_markdown: typing.Optional[bool] = OMIT, @@ -228,8 +228,8 @@ def search( query : str - limit : typing.Optional[int] - Page size (maximum 20) + 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 @@ -278,7 +278,7 @@ def search( return self._raw_client.search( agent_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, environments=environments, include_markdown=include_markdown, @@ -669,7 +669,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, environments: typing.Optional[typing.Sequence[str]] = OMIT, kind: typing.Optional[str] = OMIT, @@ -683,8 +683,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 20) + 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 @@ -732,7 +732,7 @@ async def main() -> None: """ return await self._raw_client.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=cursor, environments=environments, kind=kind, @@ -746,7 +746,7 @@ async def search( agent_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, environments: typing.Optional[typing.Sequence[str]] = OMIT, include_markdown: typing.Optional[bool] = OMIT, @@ -764,8 +764,8 @@ async def search( query : str - limit : typing.Optional[int] - Page size (maximum 20) + 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 @@ -823,7 +823,7 @@ async def main() -> None: return await self._raw_client.search( agent_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, environments=environments, include_markdown=include_markdown, diff --git a/src/zep_cloud/agent/skill/evidence/client.py b/src/zep_cloud/agent/skill/evidence/client.py index af1e7f64..deafbead 100644 --- a/src/zep_cloud/agent/skill/evidence/client.py +++ b/src/zep_cloud/agent/skill/evidence/client.py @@ -30,7 +30,7 @@ def list( agent_uuid: str, skill_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentSkillEvidence, Pagev4AgentSkillEvidence]: @@ -43,8 +43,8 @@ def list( skill_uuid : str Skill UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -75,7 +75,7 @@ def list( yield page """ return self._raw_client.list( - agent_uuid, skill_uuid, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, skill_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) @@ -99,7 +99,7 @@ async def list( agent_uuid: str, skill_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentSkillEvidence, Pagev4AgentSkillEvidence]: @@ -112,8 +112,8 @@ async def list( skill_uuid : str Skill UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -153,5 +153,5 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - agent_uuid, skill_uuid, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, skill_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) diff --git a/src/zep_cloud/agent/skill/evidence/raw_client.py b/src/zep_cloud/agent/skill/evidence/raw_client.py index abe24326..29970ed9 100644 --- a/src/zep_cloud/agent/skill/evidence/raw_client.py +++ b/src/zep_cloud/agent/skill/evidence/raw_client.py @@ -30,7 +30,7 @@ def list( agent_uuid: str, skill_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentSkillEvidence, Pagev4AgentSkillEvidence]: @@ -43,8 +43,8 @@ def list( skill_uuid : str Skill UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -61,7 +61,7 @@ def list( f"agents/{encode_path_param(agent_uuid)}/skills/{encode_path_param(skill_uuid)}/evidence", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -81,7 +81,7 @@ def list( _get_next = lambda: self.list( agent_uuid, skill_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -164,7 +164,7 @@ async def list( agent_uuid: str, skill_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentSkillEvidence, Pagev4AgentSkillEvidence]: @@ -177,8 +177,8 @@ async def list( skill_uuid : str Skill UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -195,7 +195,7 @@ async def list( f"agents/{encode_path_param(agent_uuid)}/skills/{encode_path_param(skill_uuid)}/evidence", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -217,7 +217,7 @@ async def _get_next(): return await self.list( agent_uuid, skill_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/agent/skill/raw_client.py b/src/zep_cloud/agent/skill/raw_client.py index 6ae9ada9..cb7cf7a5 100644 --- a/src/zep_cloud/agent/skill/raw_client.py +++ b/src/zep_cloud/agent/skill/raw_client.py @@ -306,7 +306,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, environments: typing.Optional[typing.Sequence[str]] = OMIT, kind: typing.Optional[str] = OMIT, @@ -320,8 +320,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 20) + 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 @@ -346,7 +346,7 @@ def list( f"agents/{encode_path_param(agent_uuid)}/skills/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -376,7 +376,7 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, environments=environments, kind=kind, @@ -458,7 +458,7 @@ def search( agent_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, environments: typing.Optional[typing.Sequence[str]] = OMIT, include_markdown: typing.Optional[bool] = OMIT, @@ -476,8 +476,8 @@ def search( query : str - limit : typing.Optional[int] - Page size (maximum 20) + 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 @@ -510,7 +510,7 @@ def search( f"agents/{encode_path_param(agent_uuid)}/skills/search", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -544,7 +544,7 @@ def search( _get_next = lambda: self.search( agent_uuid, query=query, - limit=limit, + page_size=page_size, cursor=_parsed_next, environments=environments, include_markdown=include_markdown, @@ -1388,7 +1388,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, environments: typing.Optional[typing.Sequence[str]] = OMIT, kind: typing.Optional[str] = OMIT, @@ -1402,8 +1402,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 20) + 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 @@ -1428,7 +1428,7 @@ async def list( f"agents/{encode_path_param(agent_uuid)}/skills/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -1460,7 +1460,7 @@ async def list( async def _get_next(): return await self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, environments=environments, kind=kind, @@ -1543,7 +1543,7 @@ async def search( agent_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, environments: typing.Optional[typing.Sequence[str]] = OMIT, include_markdown: typing.Optional[bool] = OMIT, @@ -1561,8 +1561,8 @@ async def search( query : str - limit : typing.Optional[int] - Page size (maximum 20) + 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 @@ -1595,7 +1595,7 @@ async def search( f"agents/{encode_path_param(agent_uuid)}/skills/search", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -1631,7 +1631,7 @@ async def _get_next(): return await self.search( agent_uuid, query=query, - limit=limit, + page_size=page_size, cursor=_parsed_next, environments=environments, include_markdown=include_markdown, diff --git a/src/zep_cloud/agent/skill/relation/client.py b/src/zep_cloud/agent/skill/relation/client.py index 30d0bb4b..f127eb2b 100644 --- a/src/zep_cloud/agent/skill/relation/client.py +++ b/src/zep_cloud/agent/skill/relation/client.py @@ -34,7 +34,7 @@ def list( kind: typing.Optional[ typing.Union[RelationListRequestKindItem, typing.Sequence[RelationListRequestKindItem]] ] = None, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentSkillRelationship, Pagev4AgentSkillRelationship]: @@ -50,8 +50,8 @@ def list( kind : typing.Optional[typing.Union[RelationListRequestKindItem, typing.Sequence[RelationListRequestKindItem]]] Relationship kinds - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -82,7 +82,7 @@ def list( yield page """ return self._raw_client.list( - agent_uuid, skill_uuid, kind=kind, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, skill_uuid, kind=kind, page_size=page_size, cursor=cursor, request_options=request_options ) @@ -109,7 +109,7 @@ async def list( kind: typing.Optional[ typing.Union[RelationListRequestKindItem, typing.Sequence[RelationListRequestKindItem]] ] = None, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentSkillRelationship, Pagev4AgentSkillRelationship]: @@ -125,8 +125,8 @@ async def list( kind : typing.Optional[typing.Union[RelationListRequestKindItem, typing.Sequence[RelationListRequestKindItem]]] Relationship kinds - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -166,5 +166,5 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - agent_uuid, skill_uuid, kind=kind, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, skill_uuid, kind=kind, page_size=page_size, cursor=cursor, request_options=request_options ) diff --git a/src/zep_cloud/agent/skill/relation/raw_client.py b/src/zep_cloud/agent/skill/relation/raw_client.py index ce3a0915..50297a6a 100644 --- a/src/zep_cloud/agent/skill/relation/raw_client.py +++ b/src/zep_cloud/agent/skill/relation/raw_client.py @@ -34,7 +34,7 @@ def list( kind: typing.Optional[ typing.Union[RelationListRequestKindItem, typing.Sequence[RelationListRequestKindItem]] ] = None, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentSkillRelationship, Pagev4AgentSkillRelationship]: @@ -50,8 +50,8 @@ def list( kind : typing.Optional[typing.Union[RelationListRequestKindItem, typing.Sequence[RelationListRequestKindItem]]] Relationship kinds - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -69,7 +69,7 @@ def list( method="GET", params={ "kind": ",".join(map(str, kind)) if isinstance(kind, (list, tuple, set)) else kind, - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -90,7 +90,7 @@ def list( agent_uuid, skill_uuid, kind=kind, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -176,7 +176,7 @@ async def list( kind: typing.Optional[ typing.Union[RelationListRequestKindItem, typing.Sequence[RelationListRequestKindItem]] ] = None, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentSkillRelationship, Pagev4AgentSkillRelationship]: @@ -192,8 +192,8 @@ async def list( kind : typing.Optional[typing.Union[RelationListRequestKindItem, typing.Sequence[RelationListRequestKindItem]]] Relationship kinds - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -211,7 +211,7 @@ async def list( method="GET", params={ "kind": ",".join(map(str, kind)) if isinstance(kind, (list, tuple, set)) else kind, - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -234,7 +234,7 @@ async def _get_next(): agent_uuid, skill_uuid, kind=kind, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/agent/skill/version/client.py b/src/zep_cloud/agent/skill/version/client.py index e9712b00..0c2fdd5d 100644 --- a/src/zep_cloud/agent/skill/version/client.py +++ b/src/zep_cloud/agent/skill/version/client.py @@ -93,7 +93,7 @@ def list( agent_uuid: str, skill_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, markdown_format: typing.Optional[VersionListRequestMarkdownFormat] = None, request_options: typing.Optional[RequestOptions] = None, @@ -107,8 +107,8 @@ def list( skill_uuid : str Skill UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -144,7 +144,7 @@ def list( return self._raw_client.list( agent_uuid, skill_uuid, - limit=limit, + page_size=page_size, cursor=cursor, markdown_format=markdown_format, request_options=request_options, @@ -335,7 +335,7 @@ async def list( agent_uuid: str, skill_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, markdown_format: typing.Optional[VersionListRequestMarkdownFormat] = None, request_options: typing.Optional[RequestOptions] = None, @@ -349,8 +349,8 @@ async def list( skill_uuid : str Skill UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -395,7 +395,7 @@ async def main() -> None: return await self._raw_client.list( agent_uuid, skill_uuid, - limit=limit, + page_size=page_size, cursor=cursor, markdown_format=markdown_format, request_options=request_options, diff --git a/src/zep_cloud/agent/skill/version/raw_client.py b/src/zep_cloud/agent/skill/version/raw_client.py index 415040bf..3aeecca3 100644 --- a/src/zep_cloud/agent/skill/version/raw_client.py +++ b/src/zep_cloud/agent/skill/version/raw_client.py @@ -175,7 +175,7 @@ def list( agent_uuid: str, skill_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, markdown_format: typing.Optional[VersionListRequestMarkdownFormat] = None, request_options: typing.Optional[RequestOptions] = None, @@ -189,8 +189,8 @@ def list( skill_uuid : str Skill UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -210,7 +210,7 @@ def list( f"agents/{encode_path_param(agent_uuid)}/skills/{encode_path_param(skill_uuid)}/versions", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "markdown_format": markdown_format, }, @@ -231,7 +231,7 @@ def list( _get_next = lambda: self.list( agent_uuid, skill_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, markdown_format=markdown_format, request_options=request_options, @@ -691,7 +691,7 @@ async def list( agent_uuid: str, skill_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, markdown_format: typing.Optional[VersionListRequestMarkdownFormat] = None, request_options: typing.Optional[RequestOptions] = None, @@ -705,8 +705,8 @@ async def list( skill_uuid : str Skill UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -726,7 +726,7 @@ async def list( f"agents/{encode_path_param(agent_uuid)}/skills/{encode_path_param(skill_uuid)}/versions", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "markdown_format": markdown_format, }, @@ -749,7 +749,7 @@ async def _get_next(): return await self.list( agent_uuid, skill_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, markdown_format=markdown_format, request_options=request_options, diff --git a/src/zep_cloud/agent/task_family/client.py b/src/zep_cloud/agent/task_family/client.py index 72264cd5..0b9ea48b 100644 --- a/src/zep_cloud/agent/task_family/client.py +++ b/src/zep_cloud/agent/task_family/client.py @@ -33,7 +33,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentTaskFamilyDescriptor, AgentTaskFamilyDescriptorPage]: @@ -43,8 +43,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -73,7 +73,7 @@ def list( for page in response.iter_pages(): yield page """ - return self._raw_client.list(agent_uuid, limit=limit, cursor=cursor, request_options=request_options) + return self._raw_client.list(agent_uuid, page_size=page_size, cursor=cursor, request_options=request_options) def rename( self, @@ -148,7 +148,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentTaskFamilyDescriptor, AgentTaskFamilyDescriptorPage]: @@ -158,8 +158,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -197,7 +197,9 @@ async def main() -> None: asyncio.run(main()) """ - return await self._raw_client.list(agent_uuid, limit=limit, cursor=cursor, request_options=request_options) + return await self._raw_client.list( + agent_uuid, page_size=page_size, cursor=cursor, request_options=request_options + ) async def rename( self, diff --git a/src/zep_cloud/agent/task_family/raw_client.py b/src/zep_cloud/agent/task_family/raw_client.py index b3bb30a8..30960436 100644 --- a/src/zep_cloud/agent/task_family/raw_client.py +++ b/src/zep_cloud/agent/task_family/raw_client.py @@ -34,7 +34,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentTaskFamilyDescriptor, AgentTaskFamilyDescriptorPage]: @@ -44,8 +44,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -62,7 +62,7 @@ def list( f"agents/{encode_path_param(agent_uuid)}/task-families/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, headers={ @@ -84,7 +84,7 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -267,7 +267,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentTaskFamilyDescriptor, AgentTaskFamilyDescriptorPage]: @@ -277,8 +277,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -295,7 +295,7 @@ async def list( f"agents/{encode_path_param(agent_uuid)}/task-families/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, headers={ @@ -319,7 +319,7 @@ async def list( async def _get_next(): return await self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/agent/trace/client.py b/src/zep_cloud/agent/trace/client.py index 296da41c..9c8ed299 100644 --- a/src/zep_cloud/agent/trace/client.py +++ b/src/zep_cloud/agent/trace/client.py @@ -122,7 +122,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[TraceListRequestOrderBy] = None, order: typing.Optional[TraceListRequestOrder] = None, @@ -142,8 +142,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -204,7 +204,7 @@ def list( """ return self._raw_client.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -584,7 +584,7 @@ def list_events( agent_uuid: str, trace_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentTraceEvent, AgentTraceEventPage]: @@ -597,8 +597,8 @@ def list_events( trace_uuid : str Trace UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -629,7 +629,7 @@ def list_events( yield page """ return self._raw_client.list_events( - agent_uuid, trace_uuid, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, trace_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) def append_event( @@ -863,7 +863,7 @@ def list_summary_versions( agent_uuid: str, trace_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentTraceSummaryVersion, AgentTraceSummaryPage]: @@ -876,8 +876,8 @@ def list_summary_versions( trace_uuid : str Trace UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -908,7 +908,7 @@ def list_summary_versions( yield page """ return self._raw_client.list_summary_versions( - agent_uuid, trace_uuid, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, trace_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) @@ -1012,7 +1012,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[TraceListRequestOrderBy] = None, order: typing.Optional[TraceListRequestOrder] = None, @@ -1032,8 +1032,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -1103,7 +1103,7 @@ async def main() -> None: """ return await self._raw_client.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -1531,7 +1531,7 @@ async def list_events( agent_uuid: str, trace_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentTraceEvent, AgentTraceEventPage]: @@ -1544,8 +1544,8 @@ async def list_events( trace_uuid : str Trace UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -1585,7 +1585,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_events( - agent_uuid, trace_uuid, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, trace_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) async def append_event( @@ -1851,7 +1851,7 @@ async def list_summary_versions( agent_uuid: str, trace_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentTraceSummaryVersion, AgentTraceSummaryPage]: @@ -1864,8 +1864,8 @@ async def list_summary_versions( trace_uuid : str Trace UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -1905,5 +1905,5 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_summary_versions( - agent_uuid, trace_uuid, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, trace_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) diff --git a/src/zep_cloud/agent/trace/raw_client.py b/src/zep_cloud/agent/trace/raw_client.py index 61ce7c1d..6db7a135 100644 --- a/src/zep_cloud/agent/trace/raw_client.py +++ b/src/zep_cloud/agent/trace/raw_client.py @@ -197,7 +197,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[TraceListRequestOrderBy] = None, order: typing.Optional[TraceListRequestOrder] = None, @@ -217,8 +217,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -265,7 +265,7 @@ def list( f"agents/{encode_path_param(agent_uuid)}/traces/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -301,7 +301,7 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -996,7 +996,7 @@ def list_events( agent_uuid: str, trace_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentTraceEvent, AgentTraceEventPage]: @@ -1009,8 +1009,8 @@ def list_events( trace_uuid : str Trace UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -1027,7 +1027,7 @@ def list_events( f"agents/{encode_path_param(agent_uuid)}/traces/{encode_path_param(trace_uuid)}/events", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -1047,7 +1047,7 @@ def list_events( _get_next = lambda: self.list_events( agent_uuid, trace_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -1452,7 +1452,7 @@ def list_summary_versions( agent_uuid: str, trace_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[AgentTraceSummaryVersion, AgentTraceSummaryPage]: @@ -1465,8 +1465,8 @@ def list_summary_versions( trace_uuid : str Trace UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -1483,7 +1483,7 @@ def list_summary_versions( f"agents/{encode_path_param(agent_uuid)}/traces/{encode_path_param(trace_uuid)}/summary/versions", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -1503,7 +1503,7 @@ def list_summary_versions( _get_next = lambda: self.list_summary_versions( agent_uuid, trace_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -1685,7 +1685,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[TraceListRequestOrderBy] = None, order: typing.Optional[TraceListRequestOrder] = None, @@ -1705,8 +1705,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -1753,7 +1753,7 @@ async def list( f"agents/{encode_path_param(agent_uuid)}/traces/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -1791,7 +1791,7 @@ async def list( async def _get_next(): return await self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -2487,7 +2487,7 @@ async def list_events( agent_uuid: str, trace_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentTraceEvent, AgentTraceEventPage]: @@ -2500,8 +2500,8 @@ async def list_events( trace_uuid : str Trace UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -2518,7 +2518,7 @@ async def list_events( f"agents/{encode_path_param(agent_uuid)}/traces/{encode_path_param(trace_uuid)}/events", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -2540,7 +2540,7 @@ async def _get_next(): return await self.list_events( agent_uuid, trace_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -2946,7 +2946,7 @@ async def list_summary_versions( agent_uuid: str, trace_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[AgentTraceSummaryVersion, AgentTraceSummaryPage]: @@ -2959,8 +2959,8 @@ async def list_summary_versions( trace_uuid : str Trace UUID - limit : typing.Optional[int] - Page size (maximum 100) + 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 @@ -2977,7 +2977,7 @@ async def list_summary_versions( f"agents/{encode_path_param(agent_uuid)}/traces/{encode_path_param(trace_uuid)}/summary/versions", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -2999,7 +2999,7 @@ async def _get_next(): return await self.list_summary_versions( agent_uuid, trace_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/agent/trace_import/__init__.py b/src/zep_cloud/agent/trace_import/__init__.py index 8c60875a..7cdca43a 100644 --- a/src/zep_cloud/agent/trace_import/__init__.py +++ b/src/zep_cloud/agent/trace_import/__init__.py @@ -6,9 +6,13 @@ from importlib import import_module if typing.TYPE_CHECKING: - from .types import TraceImportDeleteRequestTraces + from .types import TraceImportDeleteRequestTraces, UpdateTraceImportRequestOnSourceChange from . import run -_dynamic_imports: typing.Dict[str, str] = {"TraceImportDeleteRequestTraces": ".types", "run": ".run"} +_dynamic_imports: typing.Dict[str, str] = { + "TraceImportDeleteRequestTraces": ".types", + "UpdateTraceImportRequestOnSourceChange": ".types", + "run": ".run", +} def __getattr__(attr_name: str) -> typing.Any: @@ -32,4 +36,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["TraceImportDeleteRequestTraces", "run"] +__all__ = ["TraceImportDeleteRequestTraces", "UpdateTraceImportRequestOnSourceChange", "run"] diff --git a/src/zep_cloud/agent/trace_import/client.py b/src/zep_cloud/agent/trace_import/client.py index fb5f3675..d7cb3dd5 100644 --- a/src/zep_cloud/agent/trace_import/client.py +++ b/src/zep_cloud/agent/trace_import/client.py @@ -9,12 +9,15 @@ from ...core.request_options import RequestOptions from ...types.task import Task from ...types.trace_import import TraceImport +from ...types.trace_import_create_result import TraceImportCreateResult +from ...types.trace_import_on_source_change import TraceImportOnSourceChange from ...types.trace_import_page import TraceImportPage from ...types.trace_import_schedule import TraceImportSchedule from ...types.trace_import_selection import TraceImportSelection from ...types.trace_mapping import TraceMapping from .raw_client import AsyncRawTraceImportClient, RawTraceImportClient from .types.trace_import_delete_request_traces import TraceImportDeleteRequestTraces +from .types.update_trace_import_request_on_source_change import UpdateTraceImportRequestOnSourceChange if typing.TYPE_CHECKING: from .run.client import AsyncRunClient, RunClient @@ -43,7 +46,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[TraceImport, TraceImportPage]: @@ -55,8 +58,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size + 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 @@ -85,7 +88,7 @@ def list( for page in response.iter_pages(): yield page """ - return self._raw_client.list(agent_uuid, limit=limit, cursor=cursor, request_options=request_options) + return self._raw_client.list(agent_uuid, page_size=page_size, cursor=cursor, request_options=request_options) def create( self, @@ -95,16 +98,16 @@ def create( learn_from: typing.Optional[bool] = OMIT, mapping: typing.Optional[TraceMapping] = OMIT, name: typing.Optional[str] = OMIT, - on_source_change: typing.Optional[str] = OMIT, + on_source_change: typing.Optional[TraceImportOnSourceChange] = OMIT, provider_project_id: typing.Optional[str] = OMIT, require_review: typing.Optional[bool] = OMIT, schedule: typing.Optional[TraceImportSchedule] = OMIT, selection: typing.Optional[TraceImportSelection] = OMIT, idempotency_key: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> TraceImport: + ) -> TraceImportCreateResult: """ - Create a scheduled import or queue a one-time import. Example request: `{"connection_uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1","provider_project_id":"project-123","name":"Support traces","selection":{"trace_ids":["trace-123"]},"mapping":{"task_family":{"source":"fixed","value":"support"}}}`. + Create a scheduled import or queue a one-time import. A scheduled import returns HTTP 201 with `import`. A one-time import returns HTTP 202 with `import`, `run`, and `task`. Example request: `{"connection_uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1","provider_project_id":"project-123","name":"Support traces","selection":{"trace_ids":["trace-123"]},"mapping":{"task_family":{"source":"fixed","value":"support"}}}`. Parameters ---------- @@ -123,7 +126,7 @@ def create( name : typing.Optional[str] Name is the import display name. - on_source_change : typing.Optional[str] + on_source_change : typing.Optional[TraceImportOnSourceChange] OnSourceChange defines how changed source traces are handled. provider_project_id : typing.Optional[str] @@ -133,7 +136,7 @@ def create( RequireReview requires review for candidates backed by this import. schedule : typing.Optional[TraceImportSchedule] - Schedule enables recurring imports when supplied. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. + Schedule enables recurring imports when supplied. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}. selection : typing.Optional[TraceImportSelection] Selection defines the traces to import. Example: {"trace_ids":["trace_123"]}. @@ -145,7 +148,7 @@ def create( Returns ------- - TraceImport + TraceImportCreateResult Created Examples @@ -271,7 +274,7 @@ def update( learn_from: typing.Optional[bool] = OMIT, mapping: typing.Optional[TraceMapping] = OMIT, name: typing.Optional[str] = OMIT, - on_source_change: typing.Optional[str] = OMIT, + on_source_change: typing.Optional[UpdateTraceImportRequestOnSourceChange] = OMIT, require_review: typing.Optional[bool] = OMIT, schedule: typing.Optional[TraceImportSchedule] = OMIT, selection: typing.Optional[TraceImportSelection] = OMIT, @@ -301,14 +304,14 @@ def update( name : typing.Optional[str] Name is the new import name, when supplied. - on_source_change : typing.Optional[str] + on_source_change : typing.Optional[UpdateTraceImportRequestOnSourceChange] OnSourceChange is the new change policy, when supplied. require_review : typing.Optional[bool] RequireReview is the new review setting, when supplied. schedule : typing.Optional[TraceImportSchedule] - Schedule is the new schedule, when supplied. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. + Schedule is the new schedule, when supplied. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}. selection : typing.Optional[TraceImportSelection] Selection is the new selection, when supplied. Example: {"trace_ids":["trace_123"]}. @@ -473,7 +476,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[TraceImport, TraceImportPage]: @@ -485,8 +488,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size + 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 @@ -524,7 +527,9 @@ async def main() -> None: asyncio.run(main()) """ - return await self._raw_client.list(agent_uuid, limit=limit, cursor=cursor, request_options=request_options) + return await self._raw_client.list( + agent_uuid, page_size=page_size, cursor=cursor, request_options=request_options + ) async def create( self, @@ -534,16 +539,16 @@ async def create( learn_from: typing.Optional[bool] = OMIT, mapping: typing.Optional[TraceMapping] = OMIT, name: typing.Optional[str] = OMIT, - on_source_change: typing.Optional[str] = OMIT, + on_source_change: typing.Optional[TraceImportOnSourceChange] = OMIT, provider_project_id: typing.Optional[str] = OMIT, require_review: typing.Optional[bool] = OMIT, schedule: typing.Optional[TraceImportSchedule] = OMIT, selection: typing.Optional[TraceImportSelection] = OMIT, idempotency_key: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> TraceImport: + ) -> TraceImportCreateResult: """ - Create a scheduled import or queue a one-time import. Example request: `{"connection_uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1","provider_project_id":"project-123","name":"Support traces","selection":{"trace_ids":["trace-123"]},"mapping":{"task_family":{"source":"fixed","value":"support"}}}`. + Create a scheduled import or queue a one-time import. A scheduled import returns HTTP 201 with `import`. A one-time import returns HTTP 202 with `import`, `run`, and `task`. Example request: `{"connection_uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1","provider_project_id":"project-123","name":"Support traces","selection":{"trace_ids":["trace-123"]},"mapping":{"task_family":{"source":"fixed","value":"support"}}}`. Parameters ---------- @@ -562,7 +567,7 @@ async def create( name : typing.Optional[str] Name is the import display name. - on_source_change : typing.Optional[str] + on_source_change : typing.Optional[TraceImportOnSourceChange] OnSourceChange defines how changed source traces are handled. provider_project_id : typing.Optional[str] @@ -572,7 +577,7 @@ async def create( RequireReview requires review for candidates backed by this import. schedule : typing.Optional[TraceImportSchedule] - Schedule enables recurring imports when supplied. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. + Schedule enables recurring imports when supplied. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}. selection : typing.Optional[TraceImportSelection] Selection defines the traces to import. Example: {"trace_ids":["trace_123"]}. @@ -584,7 +589,7 @@ async def create( Returns ------- - TraceImport + TraceImportCreateResult Created Examples @@ -734,7 +739,7 @@ async def update( learn_from: typing.Optional[bool] = OMIT, mapping: typing.Optional[TraceMapping] = OMIT, name: typing.Optional[str] = OMIT, - on_source_change: typing.Optional[str] = OMIT, + on_source_change: typing.Optional[UpdateTraceImportRequestOnSourceChange] = OMIT, require_review: typing.Optional[bool] = OMIT, schedule: typing.Optional[TraceImportSchedule] = OMIT, selection: typing.Optional[TraceImportSelection] = OMIT, @@ -764,14 +769,14 @@ async def update( name : typing.Optional[str] Name is the new import name, when supplied. - on_source_change : typing.Optional[str] + on_source_change : typing.Optional[UpdateTraceImportRequestOnSourceChange] OnSourceChange is the new change policy, when supplied. require_review : typing.Optional[bool] RequireReview is the new review setting, when supplied. schedule : typing.Optional[TraceImportSchedule] - Schedule is the new schedule, when supplied. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. + Schedule is the new schedule, when supplied. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}. selection : typing.Optional[TraceImportSelection] Selection is the new selection, when supplied. Example: {"trace_ids":["trace_123"]}. diff --git a/src/zep_cloud/agent/trace_import/raw_client.py b/src/zep_cloud/agent/trace_import/raw_client.py index 5e909216..49e2c9f3 100644 --- a/src/zep_cloud/agent/trace_import/raw_client.py +++ b/src/zep_cloud/agent/trace_import/raw_client.py @@ -22,11 +22,14 @@ from ...types.api_error import ApiError as types_api_error_ApiError from ...types.task import Task from ...types.trace_import import TraceImport +from ...types.trace_import_create_result import TraceImportCreateResult +from ...types.trace_import_on_source_change import TraceImportOnSourceChange from ...types.trace_import_page import TraceImportPage from ...types.trace_import_schedule import TraceImportSchedule from ...types.trace_import_selection import TraceImportSelection from ...types.trace_mapping import TraceMapping from .types.trace_import_delete_request_traces import TraceImportDeleteRequestTraces +from .types.update_trace_import_request_on_source_change import UpdateTraceImportRequestOnSourceChange from pydantic import ValidationError # this is used as the default value for optional parameters @@ -41,7 +44,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[TraceImport, TraceImportPage]: @@ -53,8 +56,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size + 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 @@ -71,7 +74,7 @@ def list( f"agents/{encode_path_param(agent_uuid)}/trace-imports", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -90,7 +93,7 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -149,16 +152,16 @@ def create( learn_from: typing.Optional[bool] = OMIT, mapping: typing.Optional[TraceMapping] = OMIT, name: typing.Optional[str] = OMIT, - on_source_change: typing.Optional[str] = OMIT, + on_source_change: typing.Optional[TraceImportOnSourceChange] = OMIT, provider_project_id: typing.Optional[str] = OMIT, require_review: typing.Optional[bool] = OMIT, schedule: typing.Optional[TraceImportSchedule] = OMIT, selection: typing.Optional[TraceImportSelection] = OMIT, idempotency_key: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[TraceImport]: + ) -> HttpResponse[TraceImportCreateResult]: """ - Create a scheduled import or queue a one-time import. Example request: `{"connection_uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1","provider_project_id":"project-123","name":"Support traces","selection":{"trace_ids":["trace-123"]},"mapping":{"task_family":{"source":"fixed","value":"support"}}}`. + Create a scheduled import or queue a one-time import. A scheduled import returns HTTP 201 with `import`. A one-time import returns HTTP 202 with `import`, `run`, and `task`. Example request: `{"connection_uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1","provider_project_id":"project-123","name":"Support traces","selection":{"trace_ids":["trace-123"]},"mapping":{"task_family":{"source":"fixed","value":"support"}}}`. Parameters ---------- @@ -177,7 +180,7 @@ def create( name : typing.Optional[str] Name is the import display name. - on_source_change : typing.Optional[str] + on_source_change : typing.Optional[TraceImportOnSourceChange] OnSourceChange defines how changed source traces are handled. provider_project_id : typing.Optional[str] @@ -187,7 +190,7 @@ def create( RequireReview requires review for candidates backed by this import. schedule : typing.Optional[TraceImportSchedule] - Schedule enables recurring imports when supplied. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. + Schedule enables recurring imports when supplied. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}. selection : typing.Optional[TraceImportSelection] Selection defines the traces to import. Example: {"trace_ids":["trace_123"]}. @@ -199,7 +202,7 @@ def create( Returns ------- - HttpResponse[TraceImport] + HttpResponse[TraceImportCreateResult] Created """ _response = self._client_wrapper.httpx_client.request( @@ -232,9 +235,9 @@ def create( try: if 200 <= _response.status_code < 300: _data = typing.cast( - TraceImport, + TraceImportCreateResult, parse_obj_as( - type_=TraceImport, # type: ignore + type_=TraceImportCreateResult, # type: ignore object_=_response.json(), ), ) @@ -512,7 +515,7 @@ def update( learn_from: typing.Optional[bool] = OMIT, mapping: typing.Optional[TraceMapping] = OMIT, name: typing.Optional[str] = OMIT, - on_source_change: typing.Optional[str] = OMIT, + on_source_change: typing.Optional[UpdateTraceImportRequestOnSourceChange] = OMIT, require_review: typing.Optional[bool] = OMIT, schedule: typing.Optional[TraceImportSchedule] = OMIT, selection: typing.Optional[TraceImportSelection] = OMIT, @@ -542,14 +545,14 @@ def update( name : typing.Optional[str] Name is the new import name, when supplied. - on_source_change : typing.Optional[str] + on_source_change : typing.Optional[UpdateTraceImportRequestOnSourceChange] OnSourceChange is the new change policy, when supplied. require_review : typing.Optional[bool] RequireReview is the new review setting, when supplied. schedule : typing.Optional[TraceImportSchedule] - Schedule is the new schedule, when supplied. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. + Schedule is the new schedule, when supplied. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}. selection : typing.Optional[TraceImportSelection] Selection is the new selection, when supplied. Example: {"trace_ids":["trace_123"]}. @@ -885,7 +888,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[TraceImport, TraceImportPage]: @@ -897,8 +900,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size + 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 @@ -915,7 +918,7 @@ async def list( f"agents/{encode_path_param(agent_uuid)}/trace-imports", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -936,7 +939,7 @@ async def list( async def _get_next(): return await self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -996,16 +999,16 @@ async def create( learn_from: typing.Optional[bool] = OMIT, mapping: typing.Optional[TraceMapping] = OMIT, name: typing.Optional[str] = OMIT, - on_source_change: typing.Optional[str] = OMIT, + on_source_change: typing.Optional[TraceImportOnSourceChange] = OMIT, provider_project_id: typing.Optional[str] = OMIT, require_review: typing.Optional[bool] = OMIT, schedule: typing.Optional[TraceImportSchedule] = OMIT, selection: typing.Optional[TraceImportSelection] = OMIT, idempotency_key: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[TraceImport]: + ) -> AsyncHttpResponse[TraceImportCreateResult]: """ - Create a scheduled import or queue a one-time import. Example request: `{"connection_uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1","provider_project_id":"project-123","name":"Support traces","selection":{"trace_ids":["trace-123"]},"mapping":{"task_family":{"source":"fixed","value":"support"}}}`. + Create a scheduled import or queue a one-time import. A scheduled import returns HTTP 201 with `import`. A one-time import returns HTTP 202 with `import`, `run`, and `task`. Example request: `{"connection_uuid":"8c78a85e-eac2-4f57-b5f5-59a68a1e77a1","provider_project_id":"project-123","name":"Support traces","selection":{"trace_ids":["trace-123"]},"mapping":{"task_family":{"source":"fixed","value":"support"}}}`. Parameters ---------- @@ -1024,7 +1027,7 @@ async def create( name : typing.Optional[str] Name is the import display name. - on_source_change : typing.Optional[str] + on_source_change : typing.Optional[TraceImportOnSourceChange] OnSourceChange defines how changed source traces are handled. provider_project_id : typing.Optional[str] @@ -1034,7 +1037,7 @@ async def create( RequireReview requires review for candidates backed by this import. schedule : typing.Optional[TraceImportSchedule] - Schedule enables recurring imports when supplied. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. + Schedule enables recurring imports when supplied. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}. selection : typing.Optional[TraceImportSelection] Selection defines the traces to import. Example: {"trace_ids":["trace_123"]}. @@ -1046,7 +1049,7 @@ async def create( Returns ------- - AsyncHttpResponse[TraceImport] + AsyncHttpResponse[TraceImportCreateResult] Created """ _response = await self._client_wrapper.httpx_client.request( @@ -1079,9 +1082,9 @@ async def create( try: if 200 <= _response.status_code < 300: _data = typing.cast( - TraceImport, + TraceImportCreateResult, parse_obj_as( - type_=TraceImport, # type: ignore + type_=TraceImportCreateResult, # type: ignore object_=_response.json(), ), ) @@ -1359,7 +1362,7 @@ async def update( learn_from: typing.Optional[bool] = OMIT, mapping: typing.Optional[TraceMapping] = OMIT, name: typing.Optional[str] = OMIT, - on_source_change: typing.Optional[str] = OMIT, + on_source_change: typing.Optional[UpdateTraceImportRequestOnSourceChange] = OMIT, require_review: typing.Optional[bool] = OMIT, schedule: typing.Optional[TraceImportSchedule] = OMIT, selection: typing.Optional[TraceImportSelection] = OMIT, @@ -1389,14 +1392,14 @@ async def update( name : typing.Optional[str] Name is the new import name, when supplied. - on_source_change : typing.Optional[str] + on_source_change : typing.Optional[UpdateTraceImportRequestOnSourceChange] OnSourceChange is the new change policy, when supplied. require_review : typing.Optional[bool] RequireReview is the new review setting, when supplied. schedule : typing.Optional[TraceImportSchedule] - Schedule is the new schedule, when supplied. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. + Schedule is the new schedule, when supplied. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}. selection : typing.Optional[TraceImportSelection] Selection is the new selection, when supplied. Example: {"trace_ids":["trace_123"]}. diff --git a/src/zep_cloud/agent/trace_import/run/client.py b/src/zep_cloud/agent/trace_import/run/client.py index 611ce44e..878a2a0f 100644 --- a/src/zep_cloud/agent/trace_import/run/client.py +++ b/src/zep_cloud/agent/trace_import/run/client.py @@ -38,7 +38,7 @@ def list( agent_uuid: str, import_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[TraceImportRun, TraceImportRunPage]: @@ -53,8 +53,8 @@ def list( import_uuid : str Trace import UUID - limit : typing.Optional[int] - Page size + 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 @@ -85,7 +85,7 @@ def list( yield page """ return self._raw_client.list( - agent_uuid, import_uuid, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, import_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) def create( @@ -211,7 +211,7 @@ async def list( agent_uuid: str, import_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[TraceImportRun, TraceImportRunPage]: @@ -226,8 +226,8 @@ async def list( import_uuid : str Trace import UUID - limit : typing.Optional[int] - Page size + 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 @@ -267,7 +267,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - agent_uuid, import_uuid, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, import_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) async def create( diff --git a/src/zep_cloud/agent/trace_import/run/item/client.py b/src/zep_cloud/agent/trace_import/run/item/client.py index 6cc346a6..614961d7 100644 --- a/src/zep_cloud/agent/trace_import/run/item/client.py +++ b/src/zep_cloud/agent/trace_import/run/item/client.py @@ -31,7 +31,7 @@ def list( import_uuid: str, run_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[TraceImportRunItem, TraceImportRunItemPage]: @@ -49,8 +49,8 @@ def list( run_uuid : str Run UUID - limit : typing.Optional[int] - Page size + 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 @@ -82,7 +82,7 @@ def list( yield page """ return self._raw_client.list( - agent_uuid, import_uuid, run_uuid, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, import_uuid, run_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) @@ -107,7 +107,7 @@ async def list( import_uuid: str, run_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[TraceImportRunItem, TraceImportRunItemPage]: @@ -125,8 +125,8 @@ async def list( run_uuid : str Run UUID - limit : typing.Optional[int] - Page size + 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 @@ -167,5 +167,5 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - agent_uuid, import_uuid, run_uuid, limit=limit, cursor=cursor, request_options=request_options + agent_uuid, import_uuid, run_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) diff --git a/src/zep_cloud/agent/trace_import/run/item/raw_client.py b/src/zep_cloud/agent/trace_import/run/item/raw_client.py index 6a30eabf..82865640 100644 --- a/src/zep_cloud/agent/trace_import/run/item/raw_client.py +++ b/src/zep_cloud/agent/trace_import/run/item/raw_client.py @@ -29,7 +29,7 @@ def list( import_uuid: str, run_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[TraceImportRunItem, TraceImportRunItemPage]: @@ -47,8 +47,8 @@ def list( run_uuid : str Run UUID - limit : typing.Optional[int] - Page size + 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 @@ -65,7 +65,7 @@ def list( f"agents/{encode_path_param(agent_uuid)}/trace-imports/{encode_path_param(import_uuid)}/runs/{encode_path_param(run_uuid)}/items", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -86,7 +86,7 @@ def list( agent_uuid, import_uuid, run_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -148,7 +148,7 @@ async def list( import_uuid: str, run_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[TraceImportRunItem, TraceImportRunItemPage]: @@ -166,8 +166,8 @@ async def list( run_uuid : str Run UUID - limit : typing.Optional[int] - Page size + 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 @@ -184,7 +184,7 @@ async def list( f"agents/{encode_path_param(agent_uuid)}/trace-imports/{encode_path_param(import_uuid)}/runs/{encode_path_param(run_uuid)}/items", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -207,7 +207,7 @@ async def _get_next(): agent_uuid, import_uuid, run_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/agent/trace_import/run/raw_client.py b/src/zep_cloud/agent/trace_import/run/raw_client.py index b37bada9..34494c84 100644 --- a/src/zep_cloud/agent/trace_import/run/raw_client.py +++ b/src/zep_cloud/agent/trace_import/run/raw_client.py @@ -32,7 +32,7 @@ def list( agent_uuid: str, import_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[TraceImportRun, TraceImportRunPage]: @@ -47,8 +47,8 @@ def list( import_uuid : str Trace import UUID - limit : typing.Optional[int] - Page size + 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 @@ -65,7 +65,7 @@ def list( f"agents/{encode_path_param(agent_uuid)}/trace-imports/{encode_path_param(import_uuid)}/runs", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -85,7 +85,7 @@ def list( _get_next = lambda: self.list( agent_uuid, import_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -341,7 +341,7 @@ async def list( agent_uuid: str, import_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[TraceImportRun, TraceImportRunPage]: @@ -356,8 +356,8 @@ async def list( import_uuid : str Trace import UUID - limit : typing.Optional[int] - Page size + 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 @@ -374,7 +374,7 @@ async def list( f"agents/{encode_path_param(agent_uuid)}/trace-imports/{encode_path_param(import_uuid)}/runs", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -396,7 +396,7 @@ async def _get_next(): return await self.list( agent_uuid, import_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/agent/trace_import/types/__init__.py b/src/zep_cloud/agent/trace_import/types/__init__.py index 62b7628b..3d6a0494 100644 --- a/src/zep_cloud/agent/trace_import/types/__init__.py +++ b/src/zep_cloud/agent/trace_import/types/__init__.py @@ -7,7 +7,11 @@ if typing.TYPE_CHECKING: from .trace_import_delete_request_traces import TraceImportDeleteRequestTraces -_dynamic_imports: typing.Dict[str, str] = {"TraceImportDeleteRequestTraces": ".trace_import_delete_request_traces"} + from .update_trace_import_request_on_source_change import UpdateTraceImportRequestOnSourceChange +_dynamic_imports: typing.Dict[str, str] = { + "TraceImportDeleteRequestTraces": ".trace_import_delete_request_traces", + "UpdateTraceImportRequestOnSourceChange": ".update_trace_import_request_on_source_change", +} def __getattr__(attr_name: str) -> typing.Any: @@ -31,4 +35,4 @@ def __dir__(): return sorted(lazy_attrs) -__all__ = ["TraceImportDeleteRequestTraces"] +__all__ = ["TraceImportDeleteRequestTraces", "UpdateTraceImportRequestOnSourceChange"] diff --git a/src/zep_cloud/agent/trace_import/types/update_trace_import_request_on_source_change.py b/src/zep_cloud/agent/trace_import/types/update_trace_import_request_on_source_change.py new file mode 100644 index 00000000..81eab5c3 --- /dev/null +++ b/src/zep_cloud/agent/trace_import/types/update_trace_import_request_on_source_change.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateTraceImportRequestOnSourceChange = typing.Union[typing.Literal["ignore", "replace"], typing.Any] diff --git a/src/zep_cloud/agent/verifier/client.py b/src/zep_cloud/agent/verifier/client.py index b3469e08..54534aa2 100644 --- a/src/zep_cloud/agent/verifier/client.py +++ b/src/zep_cloud/agent/verifier/client.py @@ -36,7 +36,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, class_: typing.Optional[str] = OMIT, principal_id: typing.Optional[str] = OMIT, @@ -51,8 +51,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size + 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] Page cursor @@ -98,7 +98,7 @@ def list( """ return self._raw_client.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=cursor, class_=class_, principal_id=principal_id, @@ -348,7 +348,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, class_: typing.Optional[str] = OMIT, principal_id: typing.Optional[str] = OMIT, @@ -363,8 +363,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size + 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] Page cursor @@ -419,7 +419,7 @@ async def main() -> None: """ return await self._raw_client.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=cursor, class_=class_, principal_id=principal_id, diff --git a/src/zep_cloud/agent/verifier/raw_client.py b/src/zep_cloud/agent/verifier/raw_client.py index 4476d5c5..b5971db4 100644 --- a/src/zep_cloud/agent/verifier/raw_client.py +++ b/src/zep_cloud/agent/verifier/raw_client.py @@ -37,7 +37,7 @@ def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, class_: typing.Optional[str] = OMIT, principal_id: typing.Optional[str] = OMIT, @@ -52,8 +52,8 @@ def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size + 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] Page cursor @@ -85,7 +85,7 @@ def list( f"agents/{encode_path_param(agent_uuid)}/verifiers/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -116,7 +116,7 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, class_=class_, principal_id=principal_id, @@ -569,7 +569,7 @@ async def list( self, agent_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, class_: typing.Optional[str] = OMIT, principal_id: typing.Optional[str] = OMIT, @@ -584,8 +584,8 @@ async def list( agent_uuid : str Agent UUID - limit : typing.Optional[int] - Page size + 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] Page cursor @@ -617,7 +617,7 @@ async def list( f"agents/{encode_path_param(agent_uuid)}/verifiers/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -650,7 +650,7 @@ async def list( async def _get_next(): return await self.list( agent_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, class_=class_, principal_id=principal_id, diff --git a/src/zep_cloud/batch/client.py b/src/zep_cloud/batch/client.py index e9a27277..823078c8 100644 --- a/src/zep_cloud/batch/client.py +++ b/src/zep_cloud/batch/client.py @@ -37,7 +37,7 @@ def with_raw_response(self) -> RawBatchClient: def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, status: typing.Optional[BatchListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, @@ -45,8 +45,8 @@ def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -76,7 +76,7 @@ def list( for page in response.iter_pages(): yield page """ - return self._raw_client.list(limit=limit, cursor=cursor, status=status, request_options=request_options) + return self._raw_client.list(page_size=page_size, cursor=cursor, status=status, request_options=request_options) def create( self, @@ -200,7 +200,7 @@ def list_items( self, batch_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[BatchItem, BatchItemPage]: @@ -210,8 +210,8 @@ def list_items( batch_uuid : str Batch UUID - limit : typing.Optional[int] - Page size + 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 @@ -240,7 +240,9 @@ def list_items( for page in response.iter_pages(): yield page """ - return self._raw_client.list_items(batch_uuid, limit=limit, cursor=cursor, request_options=request_options) + return self._raw_client.list_items( + batch_uuid, page_size=page_size, cursor=cursor, request_options=request_options + ) def add_items( self, @@ -348,7 +350,7 @@ def with_raw_response(self) -> AsyncRawBatchClient: async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, status: typing.Optional[BatchListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, @@ -356,8 +358,8 @@ async def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -396,7 +398,9 @@ async def main() -> None: asyncio.run(main()) """ - return await self._raw_client.list(limit=limit, cursor=cursor, status=status, request_options=request_options) + return await self._raw_client.list( + page_size=page_size, cursor=cursor, status=status, request_options=request_options + ) async def create( self, @@ -544,7 +548,7 @@ async def list_items( self, batch_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[BatchItem, BatchItemPage]: @@ -554,8 +558,8 @@ async def list_items( batch_uuid : str Batch UUID - limit : typing.Optional[int] - Page size + 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 @@ -594,7 +598,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_items( - batch_uuid, limit=limit, cursor=cursor, request_options=request_options + batch_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) async def add_items( diff --git a/src/zep_cloud/batch/raw_client.py b/src/zep_cloud/batch/raw_client.py index d2f8be55..f80fe0ca 100644 --- a/src/zep_cloud/batch/raw_client.py +++ b/src/zep_cloud/batch/raw_client.py @@ -39,7 +39,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, status: typing.Optional[BatchListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, @@ -47,8 +47,8 @@ def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -68,7 +68,7 @@ def list( "batches", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "status": status, }, @@ -87,7 +87,7 @@ def list( _parsed_next = _parsed_response.next_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, status=status, request_options=request_options, @@ -424,7 +424,7 @@ def list_items( self, batch_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[BatchItem, BatchItemPage]: @@ -434,8 +434,8 @@ def list_items( batch_uuid : str Batch UUID - limit : typing.Optional[int] - Page size + 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 @@ -452,7 +452,7 @@ def list_items( f"batches/{encode_path_param(batch_uuid)}/items", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -471,7 +471,7 @@ def list_items( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list_items( batch_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -737,7 +737,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, status: typing.Optional[BatchListRequestStatus] = None, request_options: typing.Optional[RequestOptions] = None, @@ -745,8 +745,8 @@ async def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -766,7 +766,7 @@ async def list( "batches", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "status": status, }, @@ -787,7 +787,7 @@ async def list( async def _get_next(): return await self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, status=status, request_options=request_options, @@ -1127,7 +1127,7 @@ async def list_items( self, batch_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[BatchItem, BatchItemPage]: @@ -1137,8 +1137,8 @@ async def list_items( batch_uuid : str Batch UUID - limit : typing.Optional[int] - Page size + 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 @@ -1155,7 +1155,7 @@ async def list_items( f"batches/{encode_path_param(batch_uuid)}/items", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -1176,7 +1176,7 @@ async def list_items( async def _get_next(): return await self.list_items( batch_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/context/client.py b/src/zep_cloud/context/client.py index d18880bf..749341dd 100644 --- a/src/zep_cloud/context/client.py +++ b/src/zep_cloud/context/client.py @@ -72,7 +72,7 @@ def create_template( def list_templates( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -80,8 +80,8 @@ def list_templates( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -111,7 +111,9 @@ def list_templates( for page in response.iter_pages(): yield page """ - return self._raw_client.list_templates(limit=limit, cursor=cursor, name=name, request_options=request_options) + return self._raw_client.list_templates( + page_size=page_size, cursor=cursor, name=name, request_options=request_options + ) def get_template( self, template_uuid: str, *, request_options: typing.Optional[RequestOptions] = None @@ -301,7 +303,7 @@ async def main() -> None: async def list_templates( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -309,8 +311,8 @@ async def list_templates( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -350,7 +352,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_templates( - limit=limit, cursor=cursor, name=name, request_options=request_options + page_size=page_size, cursor=cursor, name=name, request_options=request_options ) async def get_template( diff --git a/src/zep_cloud/context/raw_client.py b/src/zep_cloud/context/raw_client.py index 1ced36a3..51eeea99 100644 --- a/src/zep_cloud/context/raw_client.py +++ b/src/zep_cloud/context/raw_client.py @@ -140,7 +140,7 @@ def create_template( def list_templates( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -148,8 +148,8 @@ def list_templates( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -169,7 +169,7 @@ def list_templates( "context-templates/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -195,7 +195,7 @@ def list_templates( _parsed_next = _parsed_response.next_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list_templates( - limit=limit, + page_size=page_size, cursor=_parsed_next, name=name, request_options=request_options, @@ -643,7 +643,7 @@ async def create_template( async def list_templates( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, name: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -651,8 +651,8 @@ async def list_templates( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -672,7 +672,7 @@ async def list_templates( "context-templates/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -700,7 +700,7 @@ async def list_templates( async def _get_next(): return await self.list_templates( - limit=limit, + page_size=page_size, cursor=_parsed_next, name=name, request_options=request_options, diff --git a/src/zep_cloud/core/client_wrapper.py b/src/zep_cloud/core/client_wrapper.py index 539416eb..842f8ca9 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.0.0rc1", + "User-Agent": "zep-cloud/4.0.0rc2", "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.0.0rc1", + "X-Fern-SDK-Version": "4.0.0rc2", **(self.get_custom_headers() or {}), } headers["Authorization"] = f"Api-Key {self.api_key}" diff --git a/src/zep_cloud/graph/__init__.py b/src/zep_cloud/graph/__init__.py index 4fe104fa..4958a427 100644 --- a/src/zep_cloud/graph/__init__.py +++ b/src/zep_cloud/graph/__init__.py @@ -11,10 +11,15 @@ GraphListRequestOrder, GraphListRequestOrderBy, SearchEdgesRequestReranker, + SearchEpisodesRequestReranker, SearchNodesRequestReranker, + SearchObservationsRequestReranker, + SearchThreadSummariesRequestReranker, SubgraphRequestDirection, ) from . import document_summary, edge, episode, hyperedge, node, observation, thread_summary + from .document_summary import DocumentSummaryListRequestOrder, DocumentSummaryListRequestOrderBy + from .edge import EdgeListRequestOrder, EdgeListRequestOrderBy from .episode import AddEpisodeRequestType, EpisodeListRequestOrder, EpisodeListRequestOrderBy from .hyperedge import HyperedgeListRequestOrder, HyperedgeListRequestOrderBy from .node import ( @@ -24,8 +29,14 @@ NodeListRequestOrder, NodeListRequestOrderBy, ) + from .observation import ObservationListRequestOrder, ObservationListRequestOrderBy + from .thread_summary import ThreadSummaryListRequestOrder, ThreadSummaryListRequestOrderBy _dynamic_imports: typing.Dict[str, str] = { "AddEpisodeRequestType": ".episode", + "DocumentSummaryListRequestOrder": ".document_summary", + "DocumentSummaryListRequestOrderBy": ".document_summary", + "EdgeListRequestOrder": ".edge", + "EdgeListRequestOrderBy": ".edge", "EpisodeListRequestOrder": ".episode", "EpisodeListRequestOrderBy": ".episode", "GraphContextRequestRecencyBias": ".types", @@ -38,9 +49,16 @@ "NodeListNeighborsRequestOrderBy": ".node", "NodeListRequestOrder": ".node", "NodeListRequestOrderBy": ".node", + "ObservationListRequestOrder": ".observation", + "ObservationListRequestOrderBy": ".observation", "SearchEdgesRequestReranker": ".types", + "SearchEpisodesRequestReranker": ".types", "SearchNodesRequestReranker": ".types", + "SearchObservationsRequestReranker": ".types", + "SearchThreadSummariesRequestReranker": ".types", "SubgraphRequestDirection": ".types", + "ThreadSummaryListRequestOrder": ".thread_summary", + "ThreadSummaryListRequestOrderBy": ".thread_summary", "document_summary": ".document_summary", "edge": ".edge", "episode": ".episode", @@ -74,6 +92,10 @@ def __dir__(): __all__ = [ "AddEpisodeRequestType", + "DocumentSummaryListRequestOrder", + "DocumentSummaryListRequestOrderBy", + "EdgeListRequestOrder", + "EdgeListRequestOrderBy", "EpisodeListRequestOrder", "EpisodeListRequestOrderBy", "GraphContextRequestRecencyBias", @@ -86,9 +108,16 @@ def __dir__(): "NodeListNeighborsRequestOrderBy", "NodeListRequestOrder", "NodeListRequestOrderBy", + "ObservationListRequestOrder", + "ObservationListRequestOrderBy", "SearchEdgesRequestReranker", + "SearchEpisodesRequestReranker", "SearchNodesRequestReranker", + "SearchObservationsRequestReranker", + "SearchThreadSummariesRequestReranker", "SubgraphRequestDirection", + "ThreadSummaryListRequestOrder", + "ThreadSummaryListRequestOrderBy", "document_summary", "edge", "episode", diff --git a/src/zep_cloud/graph/client.py b/src/zep_cloud/graph/client.py index 14d453f0..a7ebcb53 100644 --- a/src/zep_cloud/graph/client.py +++ b/src/zep_cloud/graph/client.py @@ -11,6 +11,7 @@ from ..types.clone_graph_request import CloneGraphRequest from ..types.clone_graph_result import CloneGraphResult from ..types.content_policy_event import ContentPolicyEvent +from ..types.content_policy_event_list_filters import ContentPolicyEventListFilters from ..types.content_policy_event_page import ContentPolicyEventPage from ..types.custom_instruction import CustomInstruction from ..types.edge import Edge @@ -36,7 +37,6 @@ from ..types.observation_type import ObservationType from ..types.ontology import Ontology from ..types.search_filters import SearchFilters -from ..types.search_request_reranker import SearchRequestReranker from ..types.subgraph_response import SubgraphResponse from ..types.thread_summary import ThreadSummary from ..types.thread_summary_page import ThreadSummaryPage @@ -45,7 +45,10 @@ from .types.graph_list_request_order import GraphListRequestOrder from .types.graph_list_request_order_by import GraphListRequestOrderBy from .types.search_edges_request_reranker import SearchEdgesRequestReranker +from .types.search_episodes_request_reranker import SearchEpisodesRequestReranker from .types.search_nodes_request_reranker import SearchNodesRequestReranker +from .types.search_observations_request_reranker import SearchObservationsRequestReranker +from .types.search_thread_summaries_request_reranker import SearchThreadSummariesRequestReranker from .types.subgraph_request_direction import SubgraphRequestDirection if typing.TYPE_CHECKING: @@ -142,7 +145,7 @@ def create( def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[GraphListRequestOrderBy] = None, order: typing.Optional[GraphListRequestOrder] = None, @@ -152,8 +155,8 @@ def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -191,7 +194,12 @@ def list( yield page """ return self._raw_client.list( - limit=limit, cursor=cursor, order_by=order_by, order=order, search=search, request_options=request_options + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + search=search, + request_options=request_options, ) def lookup( @@ -244,7 +252,7 @@ def get(self, graph_uuid: str, *, request_options: typing.Optional[RequestOption Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -279,7 +287,7 @@ def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. idempotency_key : typing.Optional[str] @@ -321,7 +329,7 @@ def update( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -375,7 +383,7 @@ def clone( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. request : CloneGraphRequest @@ -415,7 +423,7 @@ def get_content_policy( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -443,9 +451,9 @@ def list_content_policy_events( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[ContentPolicyEventListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ContentPolicyEvent, ContentPolicyEventPage]: """ @@ -454,16 +462,16 @@ def list_content_policy_events( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Exact-match filters. Supported keys: episode_uuid and drop_reason. + filters : typing.Optional[ContentPolicyEventListFilters] + Exact-match filters that limit the events in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -490,7 +498,7 @@ def list_content_policy_events( yield page """ return self._raw_client.list_content_policy_events( - graph_uuid, limit=limit, cursor=cursor, filters=filters, request_options=request_options + graph_uuid, page_size=page_size, cursor=cursor, filters=filters, request_options=request_options ) def get_context( @@ -509,7 +517,7 @@ def get_context( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -569,7 +577,7 @@ def get_instructions( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -606,7 +614,7 @@ def set_instructions( Parameters ---------- graph_uuid : str - Graph UUID + 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 @@ -653,7 +661,7 @@ def get_observation_steering( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -691,7 +699,7 @@ def set_observation_steering( Parameters ---------- graph_uuid : str - Graph UUID + 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 @@ -741,7 +749,7 @@ def get_ontology(self, graph_uuid: str, *, request_options: typing.Optional[Requ Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -780,7 +788,7 @@ def set_ontology( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_types : typing.Optional[typing.Sequence[EdgeType]] The edge types defined in the ontology in effect at this scope. @@ -832,10 +840,11 @@ def search_edges( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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, @@ -847,13 +856,13 @@ def search_edges( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -865,6 +874,17 @@ def search_edges( 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. @@ -903,10 +923,11 @@ def search_edges( return self._raw_client.search_edges( graph_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, 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, @@ -918,26 +939,27 @@ def search_episodes( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchEpisodesRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Episode, EpisodePage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -949,6 +971,17 @@ def search_episodes( 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[SearchFilters] Filters constraining which items are returned. @@ -956,7 +989,7 @@ def search_episodes( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchEpisodesRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -987,10 +1020,11 @@ def search_episodes( return self._raw_client.search_episodes( graph_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, 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, @@ -1002,10 +1036,11 @@ def search_nodes( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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, @@ -1017,13 +1052,13 @@ def search_nodes( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -1035,6 +1070,17 @@ def search_nodes( 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. @@ -1073,10 +1119,11 @@ def search_nodes( return self._raw_client.search_nodes( graph_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, 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, @@ -1088,26 +1135,27 @@ def search_observations( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchObservationsRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Observation, ObservationPage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -1119,6 +1167,17 @@ def search_observations( 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[SearchFilters] Filters constraining which items are returned. @@ -1126,7 +1185,7 @@ def search_observations( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchObservationsRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -1157,10 +1216,11 @@ def search_observations( return self._raw_client.search_observations( graph_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, 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, @@ -1172,26 +1232,27 @@ def search_thread_summaries( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchThreadSummariesRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ThreadSummary, ThreadSummaryPage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -1203,6 +1264,17 @@ def search_thread_summaries( 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[SearchFilters] Filters constraining which items are returned. @@ -1210,7 +1282,7 @@ def search_thread_summaries( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchThreadSummariesRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -1241,10 +1313,11 @@ def search_thread_summaries( return self._raw_client.search_thread_summaries( graph_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, 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, @@ -1267,7 +1340,7 @@ def get_subgraph( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -1331,7 +1404,7 @@ def warm( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. idempotency_key : typing.Optional[str] @@ -1504,7 +1577,7 @@ async def main() -> None: async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[GraphListRequestOrderBy] = None, order: typing.Optional[GraphListRequestOrder] = None, @@ -1514,8 +1587,8 @@ async def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -1562,7 +1635,12 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - limit=limit, cursor=cursor, order_by=order_by, order=order, search=search, request_options=request_options + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + search=search, + request_options=request_options, ) async def lookup( @@ -1623,7 +1701,7 @@ async def get(self, graph_uuid: str, *, request_options: typing.Optional[Request Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -1666,7 +1744,7 @@ async def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. idempotency_key : typing.Optional[str] @@ -1716,7 +1794,7 @@ async def update( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -1778,7 +1856,7 @@ async def clone( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. request : CloneGraphRequest @@ -1826,7 +1904,7 @@ async def get_content_policy( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -1862,9 +1940,9 @@ async def list_content_policy_events( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[ContentPolicyEventListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ContentPolicyEvent, ContentPolicyEventPage]: """ @@ -1873,16 +1951,16 @@ async def list_content_policy_events( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Exact-match filters. Supported keys: episode_uuid and drop_reason. + filters : typing.Optional[ContentPolicyEventListFilters] + Exact-match filters that limit the events in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1918,7 +1996,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_content_policy_events( - graph_uuid, limit=limit, cursor=cursor, filters=filters, request_options=request_options + graph_uuid, page_size=page_size, cursor=cursor, filters=filters, request_options=request_options ) async def get_context( @@ -1937,7 +2015,7 @@ async def get_context( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -2005,7 +2083,7 @@ async def get_instructions( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -2050,7 +2128,7 @@ async def set_instructions( Parameters ---------- graph_uuid : str - Graph UUID + 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 @@ -2105,7 +2183,7 @@ async def get_observation_steering( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -2151,7 +2229,7 @@ async def set_observation_steering( Parameters ---------- graph_uuid : str - Graph UUID + 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 @@ -2211,7 +2289,7 @@ async def get_ontology( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -2258,7 +2336,7 @@ async def set_ontology( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_types : typing.Optional[typing.Sequence[EdgeType]] The edge types defined in the ontology in effect at this scope. @@ -2318,10 +2396,11 @@ async def search_edges( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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, @@ -2333,13 +2412,13 @@ async def search_edges( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -2351,6 +2430,17 @@ async def search_edges( 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. @@ -2398,10 +2488,11 @@ async def main() -> None: return await self._raw_client.search_edges( graph_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, 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, @@ -2413,26 +2504,27 @@ async def search_episodes( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchEpisodesRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Episode, EpisodePage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -2444,6 +2536,17 @@ async def search_episodes( 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[SearchFilters] Filters constraining which items are returned. @@ -2451,7 +2554,7 @@ async def search_episodes( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchEpisodesRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -2491,10 +2594,11 @@ async def main() -> None: return await self._raw_client.search_episodes( graph_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, 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, @@ -2506,10 +2610,11 @@ async def search_nodes( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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, @@ -2521,13 +2626,13 @@ async def search_nodes( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -2539,6 +2644,17 @@ async def search_nodes( 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. @@ -2586,10 +2702,11 @@ async def main() -> None: return await self._raw_client.search_nodes( graph_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, 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, @@ -2601,26 +2718,27 @@ async def search_observations( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchObservationsRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Observation, ObservationPage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -2632,6 +2750,17 @@ async def search_observations( 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[SearchFilters] Filters constraining which items are returned. @@ -2639,7 +2768,7 @@ async def search_observations( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchObservationsRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -2679,10 +2808,11 @@ async def main() -> None: return await self._raw_client.search_observations( graph_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, 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, @@ -2694,26 +2824,27 @@ async def search_thread_summaries( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchThreadSummariesRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ThreadSummary, ThreadSummaryPage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -2725,6 +2856,17 @@ async def search_thread_summaries( 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[SearchFilters] Filters constraining which items are returned. @@ -2732,7 +2874,7 @@ async def search_thread_summaries( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchThreadSummariesRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -2772,10 +2914,11 @@ async def main() -> None: return await self._raw_client.search_thread_summaries( graph_uuid, query=query, - limit=limit, + page_size=page_size, cursor=cursor, 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, @@ -2798,7 +2941,7 @@ async def get_subgraph( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -2870,7 +3013,7 @@ async def warm( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. idempotency_key : typing.Optional[str] diff --git a/src/zep_cloud/graph/document_summary/__init__.py b/src/zep_cloud/graph/document_summary/__init__.py index 5cde0202..e8377a5b 100644 --- a/src/zep_cloud/graph/document_summary/__init__.py +++ b/src/zep_cloud/graph/document_summary/__init__.py @@ -2,3 +2,36 @@ # isort: skip_file +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import DocumentSummaryListRequestOrder, DocumentSummaryListRequestOrderBy +_dynamic_imports: typing.Dict[str, str] = { + "DocumentSummaryListRequestOrder": ".types", + "DocumentSummaryListRequestOrderBy": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["DocumentSummaryListRequestOrder", "DocumentSummaryListRequestOrderBy"] diff --git a/src/zep_cloud/graph/document_summary/client.py b/src/zep_cloud/graph/document_summary/client.py index cb2f14b2..c7ab7a1d 100644 --- a/src/zep_cloud/graph/document_summary/client.py +++ b/src/zep_cloud/graph/document_summary/client.py @@ -6,8 +6,11 @@ from ...core.pagination import AsyncPager, SyncPager from ...core.request_options import RequestOptions from ...types.document_summary import DocumentSummary +from ...types.document_summary_list_filters import DocumentSummaryListFilters from ...types.document_summary_page import DocumentSummaryPage from .raw_client import AsyncRawDocumentSummaryClient, RawDocumentSummaryClient +from .types.document_summary_list_request_order import DocumentSummaryListRequestOrder +from .types.document_summary_list_request_order_by import DocumentSummaryListRequestOrderBy # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -32,25 +35,39 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[DocumentSummaryListRequestOrderBy] = None, + order: typing.Optional[DocumentSummaryListRequestOrder] = None, + filters: typing.Optional[DocumentSummaryListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[DocumentSummary, DocumentSummaryPage]: """ + Lists the document summaries of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[DocumentSummaryListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[DocumentSummaryListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[DocumentSummaryListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -77,7 +94,13 @@ def list( yield page """ return self._raw_client.list( - graph_uuid, limit=limit, cursor=cursor, filters=filters, request_options=request_options + graph_uuid, + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + filters=filters, + request_options=request_options, ) @@ -100,25 +123,39 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[DocumentSummaryListRequestOrderBy] = None, + order: typing.Optional[DocumentSummaryListRequestOrder] = None, + filters: typing.Optional[DocumentSummaryListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[DocumentSummary, DocumentSummaryPage]: """ + Lists the document summaries of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[DocumentSummaryListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[DocumentSummaryListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[DocumentSummaryListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -154,5 +191,11 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - graph_uuid, limit=limit, cursor=cursor, filters=filters, request_options=request_options + graph_uuid, + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + filters=filters, + request_options=request_options, ) diff --git a/src/zep_cloud/graph/document_summary/raw_client.py b/src/zep_cloud/graph/document_summary/raw_client.py index 9fd1c45b..26566132 100644 --- a/src/zep_cloud/graph/document_summary/raw_client.py +++ b/src/zep_cloud/graph/document_summary/raw_client.py @@ -11,6 +11,7 @@ from ...core.parse_error import ParsingError from ...core.pydantic_utilities import parse_obj_as from ...core.request_options import RequestOptions +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 @@ -18,7 +19,10 @@ from ...errors.unauthorized_error import UnauthorizedError from ...types.api_error import ApiError as types_api_error_ApiError from ...types.document_summary import DocumentSummary +from ...types.document_summary_list_filters import DocumentSummaryListFilters from ...types.document_summary_page import DocumentSummaryPage +from .types.document_summary_list_request_order import DocumentSummaryListRequestOrder +from .types.document_summary_list_request_order_by import DocumentSummaryListRequestOrderBy from pydantic import ValidationError # this is used as the default value for optional parameters @@ -33,25 +37,39 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[DocumentSummaryListRequestOrderBy] = None, + order: typing.Optional[DocumentSummaryListRequestOrder] = None, + filters: typing.Optional[DocumentSummaryListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[DocumentSummary, DocumentSummaryPage]: """ + Lists the document summaries of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[DocumentSummaryListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[DocumentSummaryListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[DocumentSummaryListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -65,11 +83,15 @@ def list( f"graphs/{encode_path_param(graph_uuid)}/document-summaries/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, + "order_by": order_by, + "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=DocumentSummaryListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -92,8 +114,10 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, + order_by=order_by, + order=order, filters=filters, request_options=request_options, ) @@ -175,25 +199,39 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[DocumentSummaryListRequestOrderBy] = None, + order: typing.Optional[DocumentSummaryListRequestOrder] = None, + filters: typing.Optional[DocumentSummaryListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[DocumentSummary, DocumentSummaryPage]: """ + Lists the document summaries of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[DocumentSummaryListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[DocumentSummaryListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[DocumentSummaryListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -207,11 +245,15 @@ async def list( f"graphs/{encode_path_param(graph_uuid)}/document-summaries/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, + "order_by": order_by, + "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=DocumentSummaryListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -236,8 +278,10 @@ async def list( async def _get_next(): return await self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, + order_by=order_by, + order=order, filters=filters, request_options=request_options, ) diff --git a/src/zep_cloud/graph/document_summary/types/__init__.py b/src/zep_cloud/graph/document_summary/types/__init__.py new file mode 100644 index 00000000..86c6c676 --- /dev/null +++ b/src/zep_cloud/graph/document_summary/types/__init__.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .document_summary_list_request_order import DocumentSummaryListRequestOrder + from .document_summary_list_request_order_by import DocumentSummaryListRequestOrderBy +_dynamic_imports: typing.Dict[str, str] = { + "DocumentSummaryListRequestOrder": ".document_summary_list_request_order", + "DocumentSummaryListRequestOrderBy": ".document_summary_list_request_order_by", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["DocumentSummaryListRequestOrder", "DocumentSummaryListRequestOrderBy"] diff --git a/src/zep_cloud/graph/document_summary/types/document_summary_list_request_order.py b/src/zep_cloud/graph/document_summary/types/document_summary_list_request_order.py new file mode 100644 index 00000000..ce14ec91 --- /dev/null +++ b/src/zep_cloud/graph/document_summary/types/document_summary_list_request_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DocumentSummaryListRequestOrder = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/zep_cloud/graph/document_summary/types/document_summary_list_request_order_by.py b/src/zep_cloud/graph/document_summary/types/document_summary_list_request_order_by.py new file mode 100644 index 00000000..fe7e0d95 --- /dev/null +++ b/src/zep_cloud/graph/document_summary/types/document_summary_list_request_order_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DocumentSummaryListRequestOrderBy = typing.Union[typing.Literal["uuid", "created_at"], typing.Any] diff --git a/src/zep_cloud/graph/edge/__init__.py b/src/zep_cloud/graph/edge/__init__.py index 5cde0202..84661e65 100644 --- a/src/zep_cloud/graph/edge/__init__.py +++ b/src/zep_cloud/graph/edge/__init__.py @@ -2,3 +2,33 @@ # isort: skip_file +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import EdgeListRequestOrder, EdgeListRequestOrderBy +_dynamic_imports: typing.Dict[str, str] = {"EdgeListRequestOrder": ".types", "EdgeListRequestOrderBy": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["EdgeListRequestOrder", "EdgeListRequestOrderBy"] diff --git a/src/zep_cloud/graph/edge/client.py b/src/zep_cloud/graph/edge/client.py index a232f962..2a8b94f4 100644 --- a/src/zep_cloud/graph/edge/client.py +++ b/src/zep_cloud/graph/edge/client.py @@ -9,8 +9,11 @@ from ...types.async_result import AsyncResult from ...types.edge import Edge from ...types.edge_input import EdgeInput +from ...types.edge_list_filters import EdgeListFilters from ...types.edge_page import EdgePage from .raw_client import AsyncRawEdgeClient, RawEdgeClient +from .types.edge_list_request_order import EdgeListRequestOrder +from .types.edge_list_request_order_by import EdgeListRequestOrderBy # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -47,7 +50,7 @@ def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edges : typing.Sequence[EdgeInput] The edges to add to the graph. The request accepts 1 to 100 edges. @@ -99,25 +102,39 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[EdgeListRequestOrderBy] = None, + order: typing.Optional[EdgeListRequestOrder] = None, + filters: typing.Optional[EdgeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Edge, EdgePage]: """ + Lists the edges of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid`, `created_at`, or `valid_at`. The default sort is `uuid` in descending order. An edge with no `valid_at` sorts as if its `valid_at` is 1970-01-01T00:00:00Z. Thus it comes before an edge with a later `valid_at` in ascending order, and after an edge with an earlier `valid_at`. + You can use all `filters` fields except `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[EdgeListRequestOrderBy] + Sort key: uuid (default), created_at, or valid_at + + order : typing.Optional[EdgeListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[EdgeListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -144,7 +161,13 @@ def list( yield page """ return self._raw_client.list( - graph_uuid, limit=limit, cursor=cursor, filters=filters, request_options=request_options + graph_uuid, + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + filters=filters, + request_options=request_options, ) def get(self, graph_uuid: str, edge_uuid: str, *, request_options: typing.Optional[RequestOptions] = None) -> Edge: @@ -152,7 +175,7 @@ def get(self, graph_uuid: str, edge_uuid: str, *, request_options: typing.Option Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID @@ -192,7 +215,7 @@ def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID @@ -243,7 +266,7 @@ def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID @@ -320,7 +343,7 @@ async def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edges : typing.Sequence[EdgeInput] The edges to add to the graph. The request accepts 1 to 100 edges. @@ -380,25 +403,39 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[EdgeListRequestOrderBy] = None, + order: typing.Optional[EdgeListRequestOrder] = None, + filters: typing.Optional[EdgeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Edge, EdgePage]: """ + Lists the edges of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid`, `created_at`, or `valid_at`. The default sort is `uuid` in descending order. An edge with no `valid_at` sorts as if its `valid_at` is 1970-01-01T00:00:00Z. Thus it comes before an edge with a later `valid_at` in ascending order, and after an edge with an earlier `valid_at`. + You can use all `filters` fields except `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[EdgeListRequestOrderBy] + Sort key: uuid (default), created_at, or valid_at + + order : typing.Optional[EdgeListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[EdgeListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -434,7 +471,13 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - graph_uuid, limit=limit, cursor=cursor, filters=filters, request_options=request_options + graph_uuid, + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + filters=filters, + request_options=request_options, ) async def get( @@ -444,7 +487,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID @@ -492,7 +535,7 @@ async def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID @@ -551,7 +594,7 @@ async def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID diff --git a/src/zep_cloud/graph/edge/raw_client.py b/src/zep_cloud/graph/edge/raw_client.py index a81a58ae..39ab2744 100644 --- a/src/zep_cloud/graph/edge/raw_client.py +++ b/src/zep_cloud/graph/edge/raw_client.py @@ -23,7 +23,10 @@ from ...types.async_result import AsyncResult from ...types.edge import Edge from ...types.edge_input import EdgeInput +from ...types.edge_list_filters import EdgeListFilters from ...types.edge_page import EdgePage +from .types.edge_list_request_order import EdgeListRequestOrder +from .types.edge_list_request_order_by import EdgeListRequestOrderBy from pydantic import ValidationError # this is used as the default value for optional parameters @@ -50,7 +53,7 @@ def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edges : typing.Sequence[EdgeInput] The edges to add to the graph. The request accepts 1 to 100 edges. @@ -168,25 +171,39 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[EdgeListRequestOrderBy] = None, + order: typing.Optional[EdgeListRequestOrder] = None, + filters: typing.Optional[EdgeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Edge, EdgePage]: """ + Lists the edges of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid`, `created_at`, or `valid_at`. The default sort is `uuid` in descending order. An edge with no `valid_at` sorts as if its `valid_at` is 1970-01-01T00:00:00Z. Thus it comes before an edge with a later `valid_at` in ascending order, and after an edge with an earlier `valid_at`. + You can use all `filters` fields except `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[EdgeListRequestOrderBy] + Sort key: uuid (default), created_at, or valid_at + + order : typing.Optional[EdgeListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[EdgeListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -200,11 +217,15 @@ def list( f"graphs/{encode_path_param(graph_uuid)}/edges/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, + "order_by": order_by, + "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=EdgeListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -227,8 +248,10 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, + order_by=order_by, + order=order, filters=filters, request_options=request_options, ) @@ -308,7 +331,7 @@ def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID @@ -405,7 +428,7 @@ def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID @@ -525,7 +548,7 @@ def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID @@ -661,7 +684,7 @@ async def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edges : typing.Sequence[EdgeInput] The edges to add to the graph. The request accepts 1 to 100 edges. @@ -779,25 +802,39 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[EdgeListRequestOrderBy] = None, + order: typing.Optional[EdgeListRequestOrder] = None, + filters: typing.Optional[EdgeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Edge, EdgePage]: """ + Lists the edges of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid`, `created_at`, or `valid_at`. The default sort is `uuid` in descending order. An edge with no `valid_at` sorts as if its `valid_at` is 1970-01-01T00:00:00Z. Thus it comes before an edge with a later `valid_at` in ascending order, and after an edge with an earlier `valid_at`. + You can use all `filters` fields except `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[EdgeListRequestOrderBy] + Sort key: uuid (default), created_at, or valid_at + + order : typing.Optional[EdgeListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[EdgeListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -811,11 +848,15 @@ async def list( f"graphs/{encode_path_param(graph_uuid)}/edges/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, + "order_by": order_by, + "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=EdgeListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -840,8 +881,10 @@ async def list( async def _get_next(): return await self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, + order_by=order_by, + order=order, filters=filters, request_options=request_options, ) @@ -922,7 +965,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID @@ -1019,7 +1062,7 @@ async def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID @@ -1139,7 +1182,7 @@ async def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_uuid : str Edge UUID diff --git a/src/zep_cloud/graph/edge/types/__init__.py b/src/zep_cloud/graph/edge/types/__init__.py new file mode 100644 index 00000000..6997c4f3 --- /dev/null +++ b/src/zep_cloud/graph/edge/types/__init__.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .edge_list_request_order import EdgeListRequestOrder + from .edge_list_request_order_by import EdgeListRequestOrderBy +_dynamic_imports: typing.Dict[str, str] = { + "EdgeListRequestOrder": ".edge_list_request_order", + "EdgeListRequestOrderBy": ".edge_list_request_order_by", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["EdgeListRequestOrder", "EdgeListRequestOrderBy"] diff --git a/src/zep_cloud/graph/edge/types/edge_list_request_order.py b/src/zep_cloud/graph/edge/types/edge_list_request_order.py new file mode 100644 index 00000000..e9cf07e6 --- /dev/null +++ b/src/zep_cloud/graph/edge/types/edge_list_request_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EdgeListRequestOrder = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/zep_cloud/graph/edge/types/edge_list_request_order_by.py b/src/zep_cloud/graph/edge/types/edge_list_request_order_by.py new file mode 100644 index 00000000..2187ee0a --- /dev/null +++ b/src/zep_cloud/graph/edge/types/edge_list_request_order_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +EdgeListRequestOrderBy = typing.Union[typing.Literal["uuid", "created_at", "valid_at"], typing.Any] diff --git a/src/zep_cloud/graph/episode/client.py b/src/zep_cloud/graph/episode/client.py index 24a97737..b16998c6 100644 --- a/src/zep_cloud/graph/episode/client.py +++ b/src/zep_cloud/graph/episode/client.py @@ -9,6 +9,7 @@ from ...types.async_result import AsyncResult from ...types.episode import Episode from ...types.episode_debug_log import EpisodeDebugLog +from ...types.episode_list_filters import EpisodeListFilters from ...types.episode_page import EpisodePage from ...types.ingestion_trace import IngestionTrace from ...types.ingestion_trace_page import IngestionTracePage @@ -41,7 +42,7 @@ def list_for_document( graph_uuid: str, document_id: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Episode, EpisodePage]: @@ -49,13 +50,13 @@ def list_for_document( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. document_id : str Document ID - limit : typing.Optional[int] - Page size + 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 @@ -86,7 +87,7 @@ def list_for_document( yield page """ return self._raw_client.list_for_document( - graph_uuid, document_id, limit=limit, cursor=cursor, request_options=request_options + graph_uuid, document_id, page_size=page_size, cursor=cursor, request_options=request_options ) def add( @@ -107,7 +108,7 @@ def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. data : str The episode content to add to the graph. @@ -172,11 +173,11 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[EpisodeListRequestOrderBy] = None, order: typing.Optional[EpisodeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[EpisodeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Episode, EpisodePage]: """ @@ -190,10 +191,10 @@ def list( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 @@ -204,8 +205,8 @@ def list( order : typing.Optional[EpisodeListRequestOrder] Sort direction: asc or desc - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[EpisodeListFilters] + Filters that limit the episodes in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -233,7 +234,7 @@ def list( """ return self._raw_client.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -248,7 +249,7 @@ def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -288,7 +289,7 @@ def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -333,7 +334,7 @@ def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -381,7 +382,7 @@ def get_debug_logs( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -414,7 +415,7 @@ def list_ingestion_traces( graph_uuid: str, episode_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[IngestionTrace, IngestionTracePage]: @@ -424,13 +425,13 @@ def list_ingestion_traces( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID - limit : typing.Optional[int] - Page size + 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 @@ -461,7 +462,7 @@ def list_ingestion_traces( yield page """ return self._raw_client.list_ingestion_traces( - graph_uuid, episode_uuid, limit=limit, cursor=cursor, request_options=request_options + graph_uuid, episode_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) @@ -485,7 +486,7 @@ async def list_for_document( graph_uuid: str, document_id: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Episode, EpisodePage]: @@ -493,13 +494,13 @@ async def list_for_document( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. document_id : str Document ID - limit : typing.Optional[int] - Page size + 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 @@ -539,7 +540,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_for_document( - graph_uuid, document_id, limit=limit, cursor=cursor, request_options=request_options + graph_uuid, document_id, page_size=page_size, cursor=cursor, request_options=request_options ) async def add( @@ -560,7 +561,7 @@ async def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. data : str The episode content to add to the graph. @@ -633,11 +634,11 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[EpisodeListRequestOrderBy] = None, order: typing.Optional[EpisodeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[EpisodeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Episode, EpisodePage]: """ @@ -651,10 +652,10 @@ async def list( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 @@ -665,8 +666,8 @@ async def list( order : typing.Optional[EpisodeListRequestOrder] Sort direction: asc or desc - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[EpisodeListFilters] + Filters that limit the episodes in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -703,7 +704,7 @@ async def main() -> None: """ return await self._raw_client.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -718,7 +719,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -766,7 +767,7 @@ async def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -819,7 +820,7 @@ async def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -875,7 +876,7 @@ async def get_debug_logs( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -916,7 +917,7 @@ async def list_ingestion_traces( graph_uuid: str, episode_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[IngestionTrace, IngestionTracePage]: @@ -926,13 +927,13 @@ async def list_ingestion_traces( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID - limit : typing.Optional[int] - Page size + 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 @@ -972,5 +973,5 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_ingestion_traces( - graph_uuid, episode_uuid, limit=limit, cursor=cursor, request_options=request_options + graph_uuid, episode_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) diff --git a/src/zep_cloud/graph/episode/raw_client.py b/src/zep_cloud/graph/episode/raw_client.py index d3355e39..9fd7ab7e 100644 --- a/src/zep_cloud/graph/episode/raw_client.py +++ b/src/zep_cloud/graph/episode/raw_client.py @@ -12,6 +12,7 @@ from ...core.parse_error import ParsingError from ...core.pydantic_utilities import parse_obj_as from ...core.request_options import RequestOptions +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 @@ -22,6 +23,7 @@ from ...types.async_result import AsyncResult from ...types.episode import Episode from ...types.episode_debug_log import EpisodeDebugLog +from ...types.episode_list_filters import EpisodeListFilters from ...types.episode_page import EpisodePage from ...types.ingestion_trace import IngestionTrace from ...types.ingestion_trace_page import IngestionTracePage @@ -43,7 +45,7 @@ def list_for_document( graph_uuid: str, document_id: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Episode, EpisodePage]: @@ -51,13 +53,13 @@ def list_for_document( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. document_id : str Document ID - limit : typing.Optional[int] - Page size + 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 @@ -74,7 +76,7 @@ def list_for_document( f"graphs/{encode_path_param(graph_uuid)}/documents/{encode_path_param(document_id)}/episodes", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -94,7 +96,7 @@ def list_for_document( _get_next = lambda: self.list_for_document( graph_uuid, document_id, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -185,7 +187,7 @@ def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. data : str The episode content to add to the graph. @@ -321,11 +323,11 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[EpisodeListRequestOrderBy] = None, order: typing.Optional[EpisodeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[EpisodeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Episode, EpisodePage]: """ @@ -339,10 +341,10 @@ def list( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 @@ -353,8 +355,8 @@ def list( order : typing.Optional[EpisodeListRequestOrder] Sort direction: asc or desc - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[EpisodeListFilters] + Filters that limit the episodes in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -368,13 +370,15 @@ def list( f"graphs/{encode_path_param(graph_uuid)}/episodes/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=EpisodeListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -397,7 +401,7 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -469,7 +473,7 @@ def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -566,7 +570,7 @@ def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -680,7 +684,7 @@ def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -798,7 +802,7 @@ def get_debug_logs( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -888,7 +892,7 @@ def list_ingestion_traces( graph_uuid: str, episode_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[IngestionTrace, IngestionTracePage]: @@ -898,13 +902,13 @@ def list_ingestion_traces( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID - limit : typing.Optional[int] - Page size + 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 @@ -921,7 +925,7 @@ def list_ingestion_traces( f"graphs/{encode_path_param(graph_uuid)}/episodes/{encode_path_param(episode_uuid)}/ingestion-traces", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -941,7 +945,7 @@ def list_ingestion_traces( _get_next = lambda: self.list_ingestion_traces( graph_uuid, episode_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -1013,7 +1017,7 @@ async def list_for_document( graph_uuid: str, document_id: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Episode, EpisodePage]: @@ -1021,13 +1025,13 @@ async def list_for_document( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. document_id : str Document ID - limit : typing.Optional[int] - Page size + 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 @@ -1044,7 +1048,7 @@ async def list_for_document( f"graphs/{encode_path_param(graph_uuid)}/documents/{encode_path_param(document_id)}/episodes", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -1066,7 +1070,7 @@ async def _get_next(): return await self.list_for_document( graph_uuid, document_id, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -1158,7 +1162,7 @@ async def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. data : str The episode content to add to the graph. @@ -1294,11 +1298,11 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[EpisodeListRequestOrderBy] = None, order: typing.Optional[EpisodeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[EpisodeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Episode, EpisodePage]: """ @@ -1312,10 +1316,10 @@ async def list( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 @@ -1326,8 +1330,8 @@ async def list( order : typing.Optional[EpisodeListRequestOrder] Sort direction: asc or desc - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[EpisodeListFilters] + Filters that limit the episodes in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1341,13 +1345,15 @@ async def list( f"graphs/{encode_path_param(graph_uuid)}/episodes/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=EpisodeListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -1372,7 +1378,7 @@ async def list( async def _get_next(): return await self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -1445,7 +1451,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -1542,7 +1548,7 @@ async def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -1656,7 +1662,7 @@ async def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -1774,7 +1780,7 @@ async def get_debug_logs( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID @@ -1864,7 +1870,7 @@ async def list_ingestion_traces( graph_uuid: str, episode_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[IngestionTrace, IngestionTracePage]: @@ -1874,13 +1880,13 @@ async def list_ingestion_traces( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. episode_uuid : str Episode UUID - limit : typing.Optional[int] - Page size + 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 @@ -1897,7 +1903,7 @@ async def list_ingestion_traces( f"graphs/{encode_path_param(graph_uuid)}/episodes/{encode_path_param(episode_uuid)}/ingestion-traces", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -1919,7 +1925,7 @@ async def _get_next(): return await self.list_ingestion_traces( graph_uuid, episode_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/graph/hyperedge/client.py b/src/zep_cloud/graph/hyperedge/client.py index e48190fc..10ce7ed3 100644 --- a/src/zep_cloud/graph/hyperedge/client.py +++ b/src/zep_cloud/graph/hyperedge/client.py @@ -11,6 +11,7 @@ from ...types.edge_node_ref import EdgeNodeRef from ...types.hyperedge import Hyperedge from ...types.hyperedge_input import HyperedgeInput +from ...types.hyperedge_list_filters import HyperedgeListFilters from ...types.hyperedge_page import HyperedgePage from .raw_client import AsyncRawHyperedgeClient, RawHyperedgeClient from .types.hyperedge_list_request_order import HyperedgeListRequestOrder @@ -60,7 +61,7 @@ def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edges : typing.Sequence[HyperedgeInput] The member edges to create. Each pair becomes one edge carrying the @@ -131,11 +132,11 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[HyperedgeListRequestOrderBy] = None, order: typing.Optional[HyperedgeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[HyperedgeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Hyperedge, HyperedgePage]: """ @@ -147,10 +148,10 @@ def list( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 @@ -161,8 +162,8 @@ def list( order : typing.Optional[HyperedgeListRequestOrder] Sort direction: asc or desc - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[HyperedgeListFilters] + Filters that limit the hyperedges in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -190,7 +191,7 @@ def list( """ return self._raw_client.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -209,7 +210,7 @@ def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -252,7 +253,7 @@ def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -304,7 +305,7 @@ def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -358,7 +359,7 @@ def create_edge( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -424,7 +425,7 @@ def delete_edge( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -501,7 +502,7 @@ async def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edges : typing.Sequence[HyperedgeInput] The member edges to create. Each pair becomes one edge carrying the @@ -580,11 +581,11 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[HyperedgeListRequestOrderBy] = None, order: typing.Optional[HyperedgeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[HyperedgeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Hyperedge, HyperedgePage]: """ @@ -596,10 +597,10 @@ async def list( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 @@ -610,8 +611,8 @@ async def list( order : typing.Optional[HyperedgeListRequestOrder] Sort direction: asc or desc - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[HyperedgeListFilters] + Filters that limit the hyperedges in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -648,7 +649,7 @@ async def main() -> None: """ return await self._raw_client.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -667,7 +668,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -718,7 +719,7 @@ async def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -778,7 +779,7 @@ async def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -840,7 +841,7 @@ async def create_edge( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -914,7 +915,7 @@ async def delete_edge( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID diff --git a/src/zep_cloud/graph/hyperedge/raw_client.py b/src/zep_cloud/graph/hyperedge/raw_client.py index 76f14b33..2c5a265c 100644 --- a/src/zep_cloud/graph/hyperedge/raw_client.py +++ b/src/zep_cloud/graph/hyperedge/raw_client.py @@ -26,6 +26,7 @@ from ...types.edge_node_ref import EdgeNodeRef from ...types.hyperedge import Hyperedge from ...types.hyperedge_input import HyperedgeInput +from ...types.hyperedge_list_filters import HyperedgeListFilters from ...types.hyperedge_page import HyperedgePage from .types.hyperedge_list_request_order import HyperedgeListRequestOrder from .types.hyperedge_list_request_order_by import HyperedgeListRequestOrderBy @@ -64,7 +65,7 @@ def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edges : typing.Sequence[HyperedgeInput] The member edges to create. Each pair becomes one edge carrying the @@ -190,11 +191,11 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[HyperedgeListRequestOrderBy] = None, order: typing.Optional[HyperedgeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[HyperedgeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Hyperedge, HyperedgePage]: """ @@ -206,10 +207,10 @@ def list( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 @@ -220,8 +221,8 @@ def list( order : typing.Optional[HyperedgeListRequestOrder] Sort direction: asc or desc - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[HyperedgeListFilters] + Filters that limit the hyperedges in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -235,13 +236,15 @@ def list( f"graphs/{encode_path_param(graph_uuid)}/hyperedges/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=HyperedgeListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -264,7 +267,7 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -351,7 +354,7 @@ def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -451,7 +454,7 @@ def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -561,7 +564,7 @@ def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -689,7 +692,7 @@ def create_edge( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -815,7 +818,7 @@ def delete_edge( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -938,7 +941,7 @@ async def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edges : typing.Sequence[HyperedgeInput] The member edges to create. Each pair becomes one edge carrying the @@ -1064,11 +1067,11 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[HyperedgeListRequestOrderBy] = None, order: typing.Optional[HyperedgeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[HyperedgeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Hyperedge, HyperedgePage]: """ @@ -1080,10 +1083,10 @@ async def list( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 @@ -1094,8 +1097,8 @@ async def list( order : typing.Optional[HyperedgeListRequestOrder] Sort direction: asc or desc - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[HyperedgeListFilters] + Filters that limit the hyperedges in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1109,13 +1112,15 @@ async def list( f"graphs/{encode_path_param(graph_uuid)}/hyperedges/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=HyperedgeListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -1140,7 +1145,7 @@ async def list( async def _get_next(): return await self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -1228,7 +1233,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -1328,7 +1333,7 @@ async def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -1438,7 +1443,7 @@ async def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -1566,7 +1571,7 @@ async def create_edge( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID @@ -1692,7 +1697,7 @@ async def delete_edge( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. hyperedge_uuid : str Hyperedge UUID diff --git a/src/zep_cloud/graph/node/client.py b/src/zep_cloud/graph/node/client.py index b3d8e96c..35b75524 100644 --- a/src/zep_cloud/graph/node/client.py +++ b/src/zep_cloud/graph/node/client.py @@ -11,6 +11,7 @@ from ...types.neighbor_page import NeighborPage from ...types.node import Node from ...types.node_input import NodeInput +from ...types.node_list_filters import NodeListFilters from ...types.node_page import NodePage from ...types.search_filters import SearchFilters from .raw_client import AsyncRawNodeClient, RawNodeClient @@ -51,7 +52,7 @@ def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. nodes : typing.Sequence[NodeInput] The nodes to add to the graph. @@ -91,33 +92,39 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[NodeListRequestOrderBy] = None, order: typing.Optional[NodeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[NodeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Node, NodePage]: """ + Lists the nodes of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid`, `created_at`, or `degree`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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[NodeListRequestOrderBy] - Sort key: uuid (default) or degree + Sort key: uuid (default), created_at, or degree order : typing.Optional[NodeListRequestOrder] Sort direction: asc or desc (default desc) - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[NodeListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -145,7 +152,7 @@ def list( """ return self._raw_client.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -158,7 +165,7 @@ def get(self, graph_uuid: str, node_uuid: str, *, request_options: typing.Option Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -198,7 +205,7 @@ def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -245,7 +252,7 @@ def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -298,7 +305,7 @@ def list_neighbors( graph_uuid: str, node_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[NodeListNeighborsRequestOrderBy] = None, order: typing.Optional[NodeListNeighborsRequestOrder] = None, @@ -310,13 +317,13 @@ def list_neighbors( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID - limit : typing.Optional[int] - Page size + 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 @@ -361,7 +368,7 @@ def list_neighbors( return self._raw_client.list_neighbors( graph_uuid, node_uuid, - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -398,7 +405,7 @@ async def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. nodes : typing.Sequence[NodeInput] The nodes to add to the graph. @@ -446,33 +453,39 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[NodeListRequestOrderBy] = None, order: typing.Optional[NodeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[NodeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Node, NodePage]: """ + Lists the nodes of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid`, `created_at`, or `degree`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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[NodeListRequestOrderBy] - Sort key: uuid (default) or degree + Sort key: uuid (default), created_at, or degree order : typing.Optional[NodeListRequestOrder] Sort direction: asc or desc (default desc) - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[NodeListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -509,7 +522,7 @@ async def main() -> None: """ return await self._raw_client.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -524,7 +537,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -572,7 +585,7 @@ async def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -627,7 +640,7 @@ async def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -688,7 +701,7 @@ async def list_neighbors( graph_uuid: str, node_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[NodeListNeighborsRequestOrderBy] = None, order: typing.Optional[NodeListNeighborsRequestOrder] = None, @@ -700,13 +713,13 @@ async def list_neighbors( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID - limit : typing.Optional[int] - Page size + 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 @@ -760,7 +773,7 @@ async def main() -> None: return await self._raw_client.list_neighbors( graph_uuid, node_uuid, - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, diff --git a/src/zep_cloud/graph/node/raw_client.py b/src/zep_cloud/graph/node/raw_client.py index c61442ec..edef32c5 100644 --- a/src/zep_cloud/graph/node/raw_client.py +++ b/src/zep_cloud/graph/node/raw_client.py @@ -25,6 +25,7 @@ from ...types.neighbor_page import NeighborPage from ...types.node import Node from ...types.node_input import NodeInput +from ...types.node_list_filters import NodeListFilters from ...types.node_page import NodePage from ...types.search_filters import SearchFilters from .types.neighbors_request_direction import NeighborsRequestDirection @@ -54,7 +55,7 @@ def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. nodes : typing.Sequence[NodeInput] The nodes to add to the graph. @@ -166,33 +167,39 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[NodeListRequestOrderBy] = None, order: typing.Optional[NodeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[NodeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Node, NodePage]: """ + Lists the nodes of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid`, `created_at`, or `degree`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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[NodeListRequestOrderBy] - Sort key: uuid (default) or degree + Sort key: uuid (default), created_at, or degree order : typing.Optional[NodeListRequestOrder] Sort direction: asc or desc (default desc) - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[NodeListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -206,13 +213,15 @@ def list( f"graphs/{encode_path_param(graph_uuid)}/nodes/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=NodeListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -235,7 +244,7 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -318,7 +327,7 @@ def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -426,7 +435,7 @@ def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -542,7 +551,7 @@ def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -665,7 +674,7 @@ def list_neighbors( graph_uuid: str, node_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[NodeListNeighborsRequestOrderBy] = None, order: typing.Optional[NodeListNeighborsRequestOrder] = None, @@ -677,13 +686,13 @@ def list_neighbors( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID - limit : typing.Optional[int] - Page size + 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 @@ -712,7 +721,7 @@ def list_neighbors( f"graphs/{encode_path_param(graph_uuid)}/nodes/{encode_path_param(node_uuid)}/neighbors", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -745,7 +754,7 @@ def list_neighbors( _get_next = lambda: self.list_neighbors( graph_uuid, node_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -839,7 +848,7 @@ async def add( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. nodes : typing.Sequence[NodeInput] The nodes to add to the graph. @@ -951,33 +960,39 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[NodeListRequestOrderBy] = None, order: typing.Optional[NodeListRequestOrder] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[NodeListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Node, NodePage]: """ + Lists the nodes of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid`, `created_at`, or `degree`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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[NodeListRequestOrderBy] - Sort key: uuid (default) or degree + Sort key: uuid (default), created_at, or degree order : typing.Optional[NodeListRequestOrder] Sort direction: asc or desc (default desc) - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + filters : typing.Optional[NodeListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -991,13 +1006,15 @@ async def list( f"graphs/{encode_path_param(graph_uuid)}/nodes/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=NodeListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -1022,7 +1039,7 @@ async def list( async def _get_next(): return await self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -1106,7 +1123,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -1214,7 +1231,7 @@ async def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -1330,7 +1347,7 @@ async def update( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID @@ -1453,7 +1470,7 @@ async def list_neighbors( graph_uuid: str, node_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[NodeListNeighborsRequestOrderBy] = None, order: typing.Optional[NodeListNeighborsRequestOrder] = None, @@ -1465,13 +1482,13 @@ async def list_neighbors( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. node_uuid : str Node UUID - limit : typing.Optional[int] - Page size + 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 @@ -1500,7 +1517,7 @@ async def list_neighbors( f"graphs/{encode_path_param(graph_uuid)}/nodes/{encode_path_param(node_uuid)}/neighbors", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -1535,7 +1552,7 @@ async def _get_next(): return await self.list_neighbors( graph_uuid, node_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, diff --git a/src/zep_cloud/graph/node/types/node_list_request_order_by.py b/src/zep_cloud/graph/node/types/node_list_request_order_by.py index 1fa1186a..ca8118d6 100644 --- a/src/zep_cloud/graph/node/types/node_list_request_order_by.py +++ b/src/zep_cloud/graph/node/types/node_list_request_order_by.py @@ -2,4 +2,4 @@ import typing -NodeListRequestOrderBy = typing.Union[typing.Literal["uuid", "degree"], typing.Any] +NodeListRequestOrderBy = typing.Union[typing.Literal["uuid", "created_at", "degree"], typing.Any] diff --git a/src/zep_cloud/graph/observation/__init__.py b/src/zep_cloud/graph/observation/__init__.py index 5cde0202..9af3b43c 100644 --- a/src/zep_cloud/graph/observation/__init__.py +++ b/src/zep_cloud/graph/observation/__init__.py @@ -2,3 +2,36 @@ # isort: skip_file +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ObservationListRequestOrder, ObservationListRequestOrderBy +_dynamic_imports: typing.Dict[str, str] = { + "ObservationListRequestOrder": ".types", + "ObservationListRequestOrderBy": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["ObservationListRequestOrder", "ObservationListRequestOrderBy"] diff --git a/src/zep_cloud/graph/observation/client.py b/src/zep_cloud/graph/observation/client.py index 9f028cd0..d34a09d9 100644 --- a/src/zep_cloud/graph/observation/client.py +++ b/src/zep_cloud/graph/observation/client.py @@ -6,8 +6,11 @@ from ...core.pagination import AsyncPager, SyncPager from ...core.request_options import RequestOptions from ...types.observation import Observation +from ...types.observation_list_filters import ObservationListFilters from ...types.observation_page import ObservationPage from .raw_client import AsyncRawObservationClient, RawObservationClient +from .types.observation_list_request_order import ObservationListRequestOrder +from .types.observation_list_request_order_by import ObservationListRequestOrderBy # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -32,25 +35,39 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[ObservationListRequestOrderBy] = None, + order: typing.Optional[ObservationListRequestOrder] = None, + filters: typing.Optional[ObservationListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Observation, ObservationPage]: """ + Lists the observations of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[ObservationListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[ObservationListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[ObservationListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -77,7 +94,13 @@ def list( yield page """ return self._raw_client.list( - graph_uuid, limit=limit, cursor=cursor, filters=filters, request_options=request_options + graph_uuid, + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + filters=filters, + request_options=request_options, ) def get( @@ -87,7 +110,7 @@ def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. observation_uuid : str Observation UUID @@ -135,25 +158,39 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[ObservationListRequestOrderBy] = None, + order: typing.Optional[ObservationListRequestOrder] = None, + filters: typing.Optional[ObservationListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Observation, ObservationPage]: """ + Lists the observations of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[ObservationListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[ObservationListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[ObservationListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -189,7 +226,13 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - graph_uuid, limit=limit, cursor=cursor, filters=filters, request_options=request_options + graph_uuid, + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + filters=filters, + request_options=request_options, ) async def get( @@ -199,7 +242,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. observation_uuid : str Observation UUID diff --git a/src/zep_cloud/graph/observation/raw_client.py b/src/zep_cloud/graph/observation/raw_client.py index 19c083e4..a9eb75ef 100644 --- a/src/zep_cloud/graph/observation/raw_client.py +++ b/src/zep_cloud/graph/observation/raw_client.py @@ -12,6 +12,7 @@ from ...core.parse_error import ParsingError from ...core.pydantic_utilities import parse_obj_as from ...core.request_options import RequestOptions +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 @@ -19,7 +20,10 @@ from ...errors.unauthorized_error import UnauthorizedError from ...types.api_error import ApiError as types_api_error_ApiError from ...types.observation import Observation +from ...types.observation_list_filters import ObservationListFilters from ...types.observation_page import ObservationPage +from .types.observation_list_request_order import ObservationListRequestOrder +from .types.observation_list_request_order_by import ObservationListRequestOrderBy from pydantic import ValidationError # this is used as the default value for optional parameters @@ -34,25 +38,39 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[ObservationListRequestOrderBy] = None, + order: typing.Optional[ObservationListRequestOrder] = None, + filters: typing.Optional[ObservationListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Observation, ObservationPage]: """ + Lists the observations of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[ObservationListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[ObservationListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[ObservationListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -66,11 +84,15 @@ def list( f"graphs/{encode_path_param(graph_uuid)}/observations/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, + "order_by": order_by, + "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=ObservationListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -93,8 +115,10 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, + order_by=order_by, + order=order, filters=filters, request_options=request_options, ) @@ -174,7 +198,7 @@ def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. observation_uuid : str Observation UUID @@ -279,25 +303,39 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[ObservationListRequestOrderBy] = None, + order: typing.Optional[ObservationListRequestOrder] = None, + filters: typing.Optional[ObservationListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Observation, ObservationPage]: """ + Lists the observations of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[ObservationListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[ObservationListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[ObservationListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -311,11 +349,15 @@ async def list( f"graphs/{encode_path_param(graph_uuid)}/observations/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, + "order_by": order_by, + "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=ObservationListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -340,8 +382,10 @@ async def list( async def _get_next(): return await self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, + order_by=order_by, + order=order, filters=filters, request_options=request_options, ) @@ -422,7 +466,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. observation_uuid : str Observation UUID diff --git a/src/zep_cloud/graph/observation/types/__init__.py b/src/zep_cloud/graph/observation/types/__init__.py new file mode 100644 index 00000000..3a31c394 --- /dev/null +++ b/src/zep_cloud/graph/observation/types/__init__.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .observation_list_request_order import ObservationListRequestOrder + from .observation_list_request_order_by import ObservationListRequestOrderBy +_dynamic_imports: typing.Dict[str, str] = { + "ObservationListRequestOrder": ".observation_list_request_order", + "ObservationListRequestOrderBy": ".observation_list_request_order_by", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["ObservationListRequestOrder", "ObservationListRequestOrderBy"] diff --git a/src/zep_cloud/graph/observation/types/observation_list_request_order.py b/src/zep_cloud/graph/observation/types/observation_list_request_order.py new file mode 100644 index 00000000..3f0f74b1 --- /dev/null +++ b/src/zep_cloud/graph/observation/types/observation_list_request_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ObservationListRequestOrder = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/zep_cloud/graph/observation/types/observation_list_request_order_by.py b/src/zep_cloud/graph/observation/types/observation_list_request_order_by.py new file mode 100644 index 00000000..8383d90f --- /dev/null +++ b/src/zep_cloud/graph/observation/types/observation_list_request_order_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ObservationListRequestOrderBy = typing.Union[typing.Literal["uuid", "created_at"], typing.Any] diff --git a/src/zep_cloud/graph/raw_client.py b/src/zep_cloud/graph/raw_client.py index 6e2a37f3..d7ac23ea 100644 --- a/src/zep_cloud/graph/raw_client.py +++ b/src/zep_cloud/graph/raw_client.py @@ -23,6 +23,7 @@ from ..types.clone_graph_request import CloneGraphRequest from ..types.clone_graph_result import CloneGraphResult from ..types.content_policy_event import ContentPolicyEvent +from ..types.content_policy_event_list_filters import ContentPolicyEventListFilters from ..types.content_policy_event_page import ContentPolicyEventPage from ..types.custom_instruction import CustomInstruction from ..types.edge import Edge @@ -48,7 +49,6 @@ from ..types.observation_type import ObservationType from ..types.ontology import Ontology from ..types.search_filters import SearchFilters -from ..types.search_request_reranker import SearchRequestReranker from ..types.subgraph_response import SubgraphResponse from ..types.thread_summary import ThreadSummary from ..types.thread_summary_page import ThreadSummaryPage @@ -56,7 +56,10 @@ from .types.graph_list_request_order import GraphListRequestOrder from .types.graph_list_request_order_by import GraphListRequestOrderBy from .types.search_edges_request_reranker import SearchEdgesRequestReranker +from .types.search_episodes_request_reranker import SearchEpisodesRequestReranker from .types.search_nodes_request_reranker import SearchNodesRequestReranker +from .types.search_observations_request_reranker import SearchObservationsRequestReranker +from .types.search_thread_summaries_request_reranker import SearchThreadSummariesRequestReranker from .types.subgraph_request_direction import SubgraphRequestDirection from pydantic import ValidationError @@ -204,7 +207,7 @@ def create( def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[GraphListRequestOrderBy] = None, order: typing.Optional[GraphListRequestOrder] = None, @@ -214,8 +217,8 @@ def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -242,7 +245,7 @@ def list( "graphs/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -270,7 +273,7 @@ def list( _parsed_next = _parsed_response.next_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -442,7 +445,7 @@ def get(self, graph_uuid: str, *, request_options: typing.Optional[RequestOption Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -535,7 +538,7 @@ def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. idempotency_key : typing.Optional[str] @@ -647,7 +650,7 @@ def update( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -773,7 +776,7 @@ def clone( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. request : CloneGraphRequest @@ -885,7 +888,7 @@ def get_content_policy( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -971,9 +974,9 @@ def list_content_policy_events( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[ContentPolicyEventListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ContentPolicyEvent, ContentPolicyEventPage]: """ @@ -982,16 +985,16 @@ def list_content_policy_events( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Exact-match filters. Supported keys: episode_uuid and drop_reason. + filters : typing.Optional[ContentPolicyEventListFilters] + Exact-match filters that limit the events in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1005,11 +1008,13 @@ def list_content_policy_events( f"graphs/{encode_path_param(graph_uuid)}/content-policy/events/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=ContentPolicyEventListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -1032,7 +1037,7 @@ def list_content_policy_events( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list_content_policy_events( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, filters=filters, request_options=request_options, @@ -1111,7 +1116,7 @@ def get_context( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -1245,7 +1250,7 @@ def get_instructions( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -1329,7 +1334,7 @@ def set_instructions( Parameters ---------- graph_uuid : str - Graph UUID + 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 @@ -1428,7 +1433,7 @@ def get_observation_steering( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -1513,7 +1518,7 @@ def set_observation_steering( Parameters ---------- graph_uuid : str - Graph UUID + 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 @@ -1617,7 +1622,7 @@ def get_ontology( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -1703,7 +1708,7 @@ def set_ontology( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_types : typing.Optional[typing.Sequence[EdgeType]] The edge types defined in the ontology in effect at this scope. @@ -1809,10 +1814,11 @@ def search_edges( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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, @@ -1824,13 +1830,13 @@ def search_edges( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -1842,6 +1848,17 @@ def search_edges( 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. @@ -1864,17 +1881,18 @@ def search_edges( f"graphs/{encode_path_param(graph_uuid)}/search/edges", method="POST", params={ - "limit": limit, + "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, - "query": query, "reranker": reranker, }, headers={ @@ -1899,10 +1917,11 @@ def search_edges( _get_next = lambda: self.search_edges( graph_uuid, query=query, - limit=limit, + 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, @@ -1971,26 +1990,27 @@ def search_episodes( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchEpisodesRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Episode, EpisodePage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -2002,6 +2022,17 @@ def search_episodes( 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[SearchFilters] Filters constraining which items are returned. @@ -2009,7 +2040,7 @@ def search_episodes( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchEpisodesRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -2024,17 +2055,18 @@ def search_episodes( f"graphs/{encode_path_param(graph_uuid)}/search/episodes", method="POST", params={ - "limit": limit, + "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=SearchFilters, direction="write" ), "mmr_lambda": mmr_lambda, - "query": query, "reranker": reranker, }, headers={ @@ -2059,10 +2091,11 @@ def search_episodes( _get_next = lambda: self.search_episodes( graph_uuid, query=query, - limit=limit, + 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, @@ -2131,10 +2164,11 @@ def search_nodes( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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, @@ -2146,13 +2180,13 @@ def search_nodes( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -2164,6 +2198,17 @@ def search_nodes( 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. @@ -2186,17 +2231,18 @@ def search_nodes( f"graphs/{encode_path_param(graph_uuid)}/search/nodes", method="POST", params={ - "limit": limit, + "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, - "query": query, "reranker": reranker, }, headers={ @@ -2221,10 +2267,11 @@ def search_nodes( _get_next = lambda: self.search_nodes( graph_uuid, query=query, - limit=limit, + 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, @@ -2293,26 +2340,27 @@ def search_observations( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchObservationsRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Observation, ObservationPage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -2324,6 +2372,17 @@ def search_observations( 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[SearchFilters] Filters constraining which items are returned. @@ -2331,7 +2390,7 @@ def search_observations( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchObservationsRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -2346,17 +2405,18 @@ def search_observations( f"graphs/{encode_path_param(graph_uuid)}/search/observations", method="POST", params={ - "limit": limit, + "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=SearchFilters, direction="write" ), "mmr_lambda": mmr_lambda, - "query": query, "reranker": reranker, }, headers={ @@ -2381,10 +2441,11 @@ def search_observations( _get_next = lambda: self.search_observations( graph_uuid, query=query, - limit=limit, + 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, @@ -2453,26 +2514,27 @@ def search_thread_summaries( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchThreadSummariesRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ThreadSummary, ThreadSummaryPage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -2484,6 +2546,17 @@ def search_thread_summaries( 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[SearchFilters] Filters constraining which items are returned. @@ -2491,7 +2564,7 @@ def search_thread_summaries( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchThreadSummariesRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -2506,17 +2579,18 @@ def search_thread_summaries( f"graphs/{encode_path_param(graph_uuid)}/search/thread-summaries", method="POST", params={ - "limit": limit, + "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=SearchFilters, direction="write" ), "mmr_lambda": mmr_lambda, - "query": query, "reranker": reranker, }, headers={ @@ -2541,10 +2615,11 @@ def search_thread_summaries( _get_next = lambda: self.search_thread_summaries( graph_uuid, query=query, - limit=limit, + 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, @@ -2624,7 +2699,7 @@ def get_subgraph( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -2751,7 +2826,7 @@ def warm( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. idempotency_key : typing.Optional[str] @@ -2990,7 +3065,7 @@ async def create( async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[GraphListRequestOrderBy] = None, order: typing.Optional[GraphListRequestOrder] = None, @@ -3000,8 +3075,8 @@ async def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -3028,7 +3103,7 @@ async def list( "graphs/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -3058,7 +3133,7 @@ async def list( async def _get_next(): return await self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -3233,7 +3308,7 @@ async def get( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -3326,7 +3401,7 @@ async def delete( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. idempotency_key : typing.Optional[str] @@ -3438,7 +3513,7 @@ async def update( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -3564,7 +3639,7 @@ async def clone( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. request : CloneGraphRequest @@ -3676,7 +3751,7 @@ async def get_content_policy( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -3762,9 +3837,9 @@ async def list_content_policy_events( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + filters: typing.Optional[ContentPolicyEventListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ContentPolicyEvent, ContentPolicyEventPage]: """ @@ -3773,16 +3848,16 @@ async def list_content_policy_events( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Exact-match filters. Supported keys: episode_uuid and drop_reason. + filters : typing.Optional[ContentPolicyEventListFilters] + Exact-match filters that limit the events in the list. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -3796,11 +3871,13 @@ async def list_content_policy_events( f"graphs/{encode_path_param(graph_uuid)}/content-policy/events/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=ContentPolicyEventListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -3825,7 +3902,7 @@ async def list_content_policy_events( async def _get_next(): return await self.list_content_policy_events( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, filters=filters, request_options=request_options, @@ -3905,7 +3982,7 @@ async def get_context( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -4039,7 +4116,7 @@ async def get_instructions( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -4123,7 +4200,7 @@ async def set_instructions( Parameters ---------- graph_uuid : str - Graph UUID + 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 @@ -4222,7 +4299,7 @@ async def get_observation_steering( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -4307,7 +4384,7 @@ async def set_observation_steering( Parameters ---------- graph_uuid : str - Graph UUID + 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 @@ -4411,7 +4488,7 @@ async def get_ontology( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -4497,7 +4574,7 @@ async def set_ontology( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. edge_types : typing.Optional[typing.Sequence[EdgeType]] The edge types defined in the ontology in effect at this scope. @@ -4603,10 +4680,11 @@ async def search_edges( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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, @@ -4618,13 +4696,13 @@ async def search_edges( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -4636,6 +4714,17 @@ async def search_edges( 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. @@ -4658,17 +4747,18 @@ async def search_edges( f"graphs/{encode_path_param(graph_uuid)}/search/edges", method="POST", params={ - "limit": limit, + "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, - "query": query, "reranker": reranker, }, headers={ @@ -4695,10 +4785,11 @@ async def _get_next(): return await self.search_edges( graph_uuid, query=query, - limit=limit, + 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, @@ -4768,26 +4859,27 @@ async def search_episodes( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchEpisodesRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Episode, EpisodePage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -4799,6 +4891,17 @@ async def search_episodes( 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[SearchFilters] Filters constraining which items are returned. @@ -4806,7 +4909,7 @@ async def search_episodes( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchEpisodesRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -4821,17 +4924,18 @@ async def search_episodes( f"graphs/{encode_path_param(graph_uuid)}/search/episodes", method="POST", params={ - "limit": limit, + "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=SearchFilters, direction="write" ), "mmr_lambda": mmr_lambda, - "query": query, "reranker": reranker, }, headers={ @@ -4858,10 +4962,11 @@ async def _get_next(): return await self.search_episodes( graph_uuid, query=query, - limit=limit, + 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, @@ -4931,10 +5036,11 @@ async def search_nodes( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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, @@ -4946,13 +5052,13 @@ async def search_nodes( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -4964,6 +5070,17 @@ async def search_nodes( 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. @@ -4986,17 +5103,18 @@ async def search_nodes( f"graphs/{encode_path_param(graph_uuid)}/search/nodes", method="POST", params={ - "limit": limit, + "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, - "query": query, "reranker": reranker, }, headers={ @@ -5023,10 +5141,11 @@ async def _get_next(): return await self.search_nodes( graph_uuid, query=query, - limit=limit, + 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, @@ -5096,26 +5215,27 @@ async def search_observations( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchObservationsRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Observation, ObservationPage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -5127,6 +5247,17 @@ async def search_observations( 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[SearchFilters] Filters constraining which items are returned. @@ -5134,7 +5265,7 @@ async def search_observations( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchObservationsRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -5149,17 +5280,18 @@ async def search_observations( f"graphs/{encode_path_param(graph_uuid)}/search/observations", method="POST", params={ - "limit": limit, + "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=SearchFilters, direction="write" ), "mmr_lambda": mmr_lambda, - "query": query, "reranker": reranker, }, headers={ @@ -5186,10 +5318,11 @@ async def _get_next(): return await self.search_observations( graph_uuid, query=query, - limit=limit, + 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, @@ -5259,26 +5392,27 @@ async def search_thread_summaries( graph_uuid: str, *, query: str, - limit: typing.Optional[int] = None, + 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[SearchFilters] = OMIT, mmr_lambda: typing.Optional[float] = OMIT, - reranker: typing.Optional[SearchRequestReranker] = OMIT, + reranker: typing.Optional[SearchThreadSummariesRequestReranker] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ThreadSummary, ThreadSummaryPage]: """ Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. query : str The search query. - limit : typing.Optional[int] - Page size + 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 @@ -5290,6 +5424,17 @@ async def search_thread_summaries( 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[SearchFilters] Filters constraining which items are returned. @@ -5297,7 +5442,7 @@ async def search_thread_summaries( The diversity weighting used for maximal marginal relevance reranking. Required when reranker is mmr. - reranker : typing.Optional[SearchRequestReranker] + reranker : typing.Optional[SearchThreadSummariesRequestReranker] The reranking strategy applied to retrieved results. Defaults to rrf. request_options : typing.Optional[RequestOptions] @@ -5312,17 +5457,18 @@ async def search_thread_summaries( f"graphs/{encode_path_param(graph_uuid)}/search/thread-summaries", method="POST", params={ - "limit": limit, + "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=SearchFilters, direction="write" ), "mmr_lambda": mmr_lambda, - "query": query, "reranker": reranker, }, headers={ @@ -5349,10 +5495,11 @@ async def _get_next(): return await self.search_thread_summaries( graph_uuid, query=query, - limit=limit, + 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, @@ -5433,7 +5580,7 @@ async def get_subgraph( Parameters ---------- graph_uuid : str - Graph UUID + 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. @@ -5560,7 +5707,7 @@ async def warm( Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. idempotency_key : typing.Optional[str] diff --git a/src/zep_cloud/graph/thread_summary/__init__.py b/src/zep_cloud/graph/thread_summary/__init__.py index 5cde0202..188187b7 100644 --- a/src/zep_cloud/graph/thread_summary/__init__.py +++ b/src/zep_cloud/graph/thread_summary/__init__.py @@ -2,3 +2,36 @@ # isort: skip_file +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ThreadSummaryListRequestOrder, ThreadSummaryListRequestOrderBy +_dynamic_imports: typing.Dict[str, str] = { + "ThreadSummaryListRequestOrder": ".types", + "ThreadSummaryListRequestOrderBy": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["ThreadSummaryListRequestOrder", "ThreadSummaryListRequestOrderBy"] diff --git a/src/zep_cloud/graph/thread_summary/client.py b/src/zep_cloud/graph/thread_summary/client.py index 2f445ecb..28a45f0f 100644 --- a/src/zep_cloud/graph/thread_summary/client.py +++ b/src/zep_cloud/graph/thread_summary/client.py @@ -6,8 +6,11 @@ from ...core.pagination import AsyncPager, SyncPager from ...core.request_options import RequestOptions from ...types.thread_summary import ThreadSummary +from ...types.thread_summary_list_filters import ThreadSummaryListFilters from ...types.thread_summary_page import ThreadSummaryPage from .raw_client import AsyncRawThreadSummaryClient, RawThreadSummaryClient +from .types.thread_summary_list_request_order import ThreadSummaryListRequestOrder +from .types.thread_summary_list_request_order_by import ThreadSummaryListRequestOrderBy # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -32,25 +35,39 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[ThreadSummaryListRequestOrderBy] = None, + order: typing.Optional[ThreadSummaryListRequestOrder] = None, + filters: typing.Optional[ThreadSummaryListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ThreadSummary, ThreadSummaryPage]: """ + Lists the thread summaries of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[ThreadSummaryListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[ThreadSummaryListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[ThreadSummaryListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -77,7 +94,13 @@ def list( yield page """ return self._raw_client.list( - graph_uuid, limit=limit, cursor=cursor, filters=filters, request_options=request_options + graph_uuid, + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + filters=filters, + request_options=request_options, ) @@ -100,25 +123,39 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[ThreadSummaryListRequestOrderBy] = None, + order: typing.Optional[ThreadSummaryListRequestOrder] = None, + filters: typing.Optional[ThreadSummaryListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ThreadSummary, ThreadSummaryPage]: """ + Lists the thread summaries of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[ThreadSummaryListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[ThreadSummaryListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[ThreadSummaryListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -154,5 +191,11 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - graph_uuid, limit=limit, cursor=cursor, filters=filters, request_options=request_options + graph_uuid, + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + filters=filters, + request_options=request_options, ) diff --git a/src/zep_cloud/graph/thread_summary/raw_client.py b/src/zep_cloud/graph/thread_summary/raw_client.py index 74ec97dc..cee9588e 100644 --- a/src/zep_cloud/graph/thread_summary/raw_client.py +++ b/src/zep_cloud/graph/thread_summary/raw_client.py @@ -11,6 +11,7 @@ from ...core.parse_error import ParsingError from ...core.pydantic_utilities import parse_obj_as from ...core.request_options import RequestOptions +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 @@ -18,7 +19,10 @@ from ...errors.unauthorized_error import UnauthorizedError from ...types.api_error import ApiError as types_api_error_ApiError from ...types.thread_summary import ThreadSummary +from ...types.thread_summary_list_filters import ThreadSummaryListFilters from ...types.thread_summary_page import ThreadSummaryPage +from .types.thread_summary_list_request_order import ThreadSummaryListRequestOrder +from .types.thread_summary_list_request_order_by import ThreadSummaryListRequestOrderBy from pydantic import ValidationError # this is used as the default value for optional parameters @@ -33,25 +37,39 @@ def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[ThreadSummaryListRequestOrderBy] = None, + order: typing.Optional[ThreadSummaryListRequestOrder] = None, + filters: typing.Optional[ThreadSummaryListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ThreadSummary, ThreadSummaryPage]: """ + Lists the thread summaries of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[ThreadSummaryListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[ThreadSummaryListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[ThreadSummaryListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -65,11 +83,15 @@ def list( f"graphs/{encode_path_param(graph_uuid)}/thread-summaries/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, + "order_by": order_by, + "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=ThreadSummaryListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -92,8 +114,10 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, + order_by=order_by, + order=order, filters=filters, request_options=request_options, ) @@ -175,25 +199,39 @@ async def list( self, graph_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, - filters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, + order_by: typing.Optional[ThreadSummaryListRequestOrderBy] = None, + order: typing.Optional[ThreadSummaryListRequestOrder] = None, + filters: typing.Optional[ThreadSummaryListFilters] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ThreadSummary, ThreadSummaryPage]: """ + Lists the thread summaries of a graph and returns one page of results. The default `page_size` is 50, and the maximum `page_size` is 100. + You can sort by `uuid` or `created_at`. The default sort is `uuid` in descending order. + You cannot use these `filters` fields: `episode_uuids`, `connected_node_uuids`, `source_node_uuids`, `target_node_uuids`, and `content_policy_violated`. + If the request has an unsupported or unknown filter field, the API returns an `unsupported_filter` error. + Parameters ---------- graph_uuid : str - Graph UUID + The UUID of the graph. For a user graph, you can also use the UUID of the user. - limit : typing.Optional[int] - Page size + 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 - filters : typing.Optional[typing.Dict[str, typing.Any]] - Filters constraining which items are returned. + order_by : typing.Optional[ThreadSummaryListRequestOrderBy] + Sort key: uuid (default) or created_at + + order : typing.Optional[ThreadSummaryListRequestOrder] + Sort direction: asc or desc (default desc) + + filters : typing.Optional[ThreadSummaryListFilters] + Filters that limit the items in the list. The operation description + names the filter fields that the operation does not support. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -207,11 +245,15 @@ async def list( f"graphs/{encode_path_param(graph_uuid)}/thread-summaries/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, + "order_by": order_by, + "order": order, }, json={ - "filters": filters, + "filters": convert_and_respect_annotation_metadata( + object_=filters, annotation=ThreadSummaryListFilters, direction="write" + ), }, headers={ "content-type": "application/json", @@ -236,8 +278,10 @@ async def list( async def _get_next(): return await self.list( graph_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, + order_by=order_by, + order=order, filters=filters, request_options=request_options, ) diff --git a/src/zep_cloud/graph/thread_summary/types/__init__.py b/src/zep_cloud/graph/thread_summary/types/__init__.py new file mode 100644 index 00000000..36b568d1 --- /dev/null +++ b/src/zep_cloud/graph/thread_summary/types/__init__.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .thread_summary_list_request_order import ThreadSummaryListRequestOrder + from .thread_summary_list_request_order_by import ThreadSummaryListRequestOrderBy +_dynamic_imports: typing.Dict[str, str] = { + "ThreadSummaryListRequestOrder": ".thread_summary_list_request_order", + "ThreadSummaryListRequestOrderBy": ".thread_summary_list_request_order_by", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["ThreadSummaryListRequestOrder", "ThreadSummaryListRequestOrderBy"] diff --git a/src/zep_cloud/graph/thread_summary/types/thread_summary_list_request_order.py b/src/zep_cloud/graph/thread_summary/types/thread_summary_list_request_order.py new file mode 100644 index 00000000..0fdc0eac --- /dev/null +++ b/src/zep_cloud/graph/thread_summary/types/thread_summary_list_request_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ThreadSummaryListRequestOrder = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/zep_cloud/graph/thread_summary/types/thread_summary_list_request_order_by.py b/src/zep_cloud/graph/thread_summary/types/thread_summary_list_request_order_by.py new file mode 100644 index 00000000..04b58d1b --- /dev/null +++ b/src/zep_cloud/graph/thread_summary/types/thread_summary_list_request_order_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ThreadSummaryListRequestOrderBy = typing.Union[typing.Literal["uuid", "created_at"], typing.Any] diff --git a/src/zep_cloud/graph/types/__init__.py b/src/zep_cloud/graph/types/__init__.py index 73f18e14..ace9479a 100644 --- a/src/zep_cloud/graph/types/__init__.py +++ b/src/zep_cloud/graph/types/__init__.py @@ -10,14 +10,20 @@ from .graph_list_request_order import GraphListRequestOrder from .graph_list_request_order_by import GraphListRequestOrderBy from .search_edges_request_reranker import SearchEdgesRequestReranker + from .search_episodes_request_reranker import SearchEpisodesRequestReranker from .search_nodes_request_reranker import SearchNodesRequestReranker + from .search_observations_request_reranker import SearchObservationsRequestReranker + from .search_thread_summaries_request_reranker import SearchThreadSummariesRequestReranker from .subgraph_request_direction import SubgraphRequestDirection _dynamic_imports: typing.Dict[str, str] = { "GraphContextRequestRecencyBias": ".graph_context_request_recency_bias", "GraphListRequestOrder": ".graph_list_request_order", "GraphListRequestOrderBy": ".graph_list_request_order_by", "SearchEdgesRequestReranker": ".search_edges_request_reranker", + "SearchEpisodesRequestReranker": ".search_episodes_request_reranker", "SearchNodesRequestReranker": ".search_nodes_request_reranker", + "SearchObservationsRequestReranker": ".search_observations_request_reranker", + "SearchThreadSummariesRequestReranker": ".search_thread_summaries_request_reranker", "SubgraphRequestDirection": ".subgraph_request_direction", } @@ -48,6 +54,9 @@ def __dir__(): "GraphListRequestOrder", "GraphListRequestOrderBy", "SearchEdgesRequestReranker", + "SearchEpisodesRequestReranker", "SearchNodesRequestReranker", + "SearchObservationsRequestReranker", + "SearchThreadSummariesRequestReranker", "SubgraphRequestDirection", ] diff --git a/src/zep_cloud/types/search_request_reranker.py b/src/zep_cloud/graph/types/search_episodes_request_reranker.py similarity index 79% rename from src/zep_cloud/types/search_request_reranker.py rename to src/zep_cloud/graph/types/search_episodes_request_reranker.py index 42e1cc4a..49eddbf9 100644 --- a/src/zep_cloud/types/search_request_reranker.py +++ b/src/zep_cloud/graph/types/search_episodes_request_reranker.py @@ -2,6 +2,6 @@ import typing -SearchRequestReranker = typing.Union[ +SearchEpisodesRequestReranker = typing.Union[ typing.Literal["rrf", "mmr", "node_distance", "episode_mentions", "cross_encoder"], typing.Any ] diff --git a/src/zep_cloud/graph/types/search_observations_request_reranker.py b/src/zep_cloud/graph/types/search_observations_request_reranker.py new file mode 100644 index 00000000..6e25ad80 --- /dev/null +++ b/src/zep_cloud/graph/types/search_observations_request_reranker.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SearchObservationsRequestReranker = typing.Union[ + typing.Literal["rrf", "mmr", "node_distance", "episode_mentions", "cross_encoder"], typing.Any +] diff --git a/src/zep_cloud/graph/types/search_thread_summaries_request_reranker.py b/src/zep_cloud/graph/types/search_thread_summaries_request_reranker.py new file mode 100644 index 00000000..4b90a820 --- /dev/null +++ b/src/zep_cloud/graph/types/search_thread_summaries_request_reranker.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SearchThreadSummariesRequestReranker = typing.Union[ + typing.Literal["rrf", "mmr", "node_distance", "episode_mentions", "cross_encoder"], typing.Any +] diff --git a/src/zep_cloud/project/client.py b/src/zep_cloud/project/client.py index 0343a34b..6ab16527 100644 --- a/src/zep_cloud/project/client.py +++ b/src/zep_cloud/project/client.py @@ -191,7 +191,7 @@ def set_content_policy( def list_content_policy_revisions( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ContentPolicy, ContentPolicyRevisionPage]: @@ -200,8 +200,8 @@ def list_content_policy_revisions( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -229,7 +229,7 @@ def list_content_policy_revisions( yield page """ return self._raw_client.list_content_policy_revisions( - limit=limit, cursor=cursor, request_options=request_options + page_size=page_size, cursor=cursor, request_options=request_options ) def get_content_policy_revision( @@ -763,7 +763,7 @@ async def main() -> None: async def list_content_policy_revisions( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ContentPolicy, ContentPolicyRevisionPage]: @@ -772,8 +772,8 @@ async def list_content_policy_revisions( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -810,7 +810,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_content_policy_revisions( - limit=limit, cursor=cursor, request_options=request_options + page_size=page_size, cursor=cursor, request_options=request_options ) async def get_content_policy_revision( diff --git a/src/zep_cloud/project/raw_client.py b/src/zep_cloud/project/raw_client.py index 075507c3..1250e9f5 100644 --- a/src/zep_cloud/project/raw_client.py +++ b/src/zep_cloud/project/raw_client.py @@ -418,7 +418,7 @@ def set_content_policy( def list_content_policy_revisions( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[ContentPolicy, ContentPolicyRevisionPage]: @@ -427,8 +427,8 @@ def list_content_policy_revisions( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -445,7 +445,7 @@ def list_content_policy_revisions( "project/content-policy/revisions", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -463,7 +463,7 @@ def list_content_policy_revisions( _parsed_next = _parsed_response.next_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list_content_policy_revisions( - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -1704,7 +1704,7 @@ async def set_content_policy( async def list_content_policy_revisions( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[ContentPolicy, ContentPolicyRevisionPage]: @@ -1713,8 +1713,8 @@ async def list_content_policy_revisions( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -1731,7 +1731,7 @@ async def list_content_policy_revisions( "project/content-policy/revisions", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -1751,7 +1751,7 @@ async def list_content_policy_revisions( async def _get_next(): return await self.list_content_policy_revisions( - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/task/client.py b/src/zep_cloud/task/client.py index 7384be13..e718778a 100644 --- a/src/zep_cloud/task/client.py +++ b/src/zep_cloud/task/client.py @@ -28,15 +28,15 @@ def with_raw_response(self) -> RawTaskClient: def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Task, TaskPage]: """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -63,7 +63,7 @@ def list( for page in response.iter_pages(): yield page """ - return self._raw_client.list(limit=limit, cursor=cursor, request_options=request_options) + return self._raw_client.list(page_size=page_size, cursor=cursor, request_options=request_options) def get(self, task_uuid: str, *, request_options: typing.Optional[RequestOptions] = None) -> Task: """ @@ -113,15 +113,15 @@ def with_raw_response(self) -> AsyncRawTaskClient: async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Task, TaskPage]: """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -157,7 +157,7 @@ async def main() -> None: asyncio.run(main()) """ - return await self._raw_client.list(limit=limit, cursor=cursor, request_options=request_options) + return await self._raw_client.list(page_size=page_size, cursor=cursor, request_options=request_options) async def get(self, task_uuid: str, *, request_options: typing.Optional[RequestOptions] = None) -> Task: """ diff --git a/src/zep_cloud/task/raw_client.py b/src/zep_cloud/task/raw_client.py index 2b5aa800..784248b9 100644 --- a/src/zep_cloud/task/raw_client.py +++ b/src/zep_cloud/task/raw_client.py @@ -27,15 +27,15 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Task, TaskPage]: """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -52,7 +52,7 @@ def list( "tasks", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -70,7 +70,7 @@ def list( _parsed_next = _parsed_response.next_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -205,15 +205,15 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Task, TaskPage]: """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -230,7 +230,7 @@ async def list( "tasks", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -250,7 +250,7 @@ async def list( async def _get_next(): return await self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/thread/client.py b/src/zep_cloud/thread/client.py index 136b430d..90a38dfd 100644 --- a/src/zep_cloud/thread/client.py +++ b/src/zep_cloud/thread/client.py @@ -49,7 +49,7 @@ def with_raw_response(self) -> RawThreadClient: def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[ThreadListRequestOrderBy] = None, order: typing.Optional[ThreadListRequestOrder] = None, @@ -59,8 +59,8 @@ def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -97,7 +97,7 @@ def list( yield page """ return self._raw_client.list( - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -301,7 +301,7 @@ def list_episodes( self, thread_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Episode, EpisodePage]: @@ -311,8 +311,8 @@ def list_episodes( thread_uuid : str Thread UUID - limit : typing.Optional[int] - Page size + 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 @@ -341,13 +341,15 @@ def list_episodes( for page in response.iter_pages(): yield page """ - return self._raw_client.list_episodes(thread_uuid, limit=limit, cursor=cursor, request_options=request_options) + return self._raw_client.list_episodes( + thread_uuid, page_size=page_size, cursor=cursor, request_options=request_options + ) def list_messages( self, thread_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[typing.Literal["created_at"]] = None, order: typing.Optional[ThreadListMessagesRequestOrder] = None, @@ -359,8 +361,8 @@ def list_messages( thread_uuid : str Thread UUID - limit : typing.Optional[int] - Page size + 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 @@ -396,7 +398,12 @@ def list_messages( yield page """ return self._raw_client.list_messages( - thread_uuid, limit=limit, cursor=cursor, order_by=order_by, order=order, request_options=request_options + thread_uuid, + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + request_options=request_options, ) def add_messages( @@ -524,7 +531,7 @@ def with_raw_response(self) -> AsyncRawThreadClient: async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[ThreadListRequestOrderBy] = None, order: typing.Optional[ThreadListRequestOrder] = None, @@ -534,8 +541,8 @@ async def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -581,7 +588,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - limit=limit, + page_size=page_size, cursor=cursor, order_by=order_by, order=order, @@ -825,7 +832,7 @@ async def list_episodes( self, thread_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Episode, EpisodePage]: @@ -835,8 +842,8 @@ async def list_episodes( thread_uuid : str Thread UUID - limit : typing.Optional[int] - Page size + 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 @@ -875,14 +882,14 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_episodes( - thread_uuid, limit=limit, cursor=cursor, request_options=request_options + thread_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) async def list_messages( self, thread_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[typing.Literal["created_at"]] = None, order: typing.Optional[ThreadListMessagesRequestOrder] = None, @@ -894,8 +901,8 @@ async def list_messages( thread_uuid : str Thread UUID - limit : typing.Optional[int] - Page size + 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 @@ -940,7 +947,12 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_messages( - thread_uuid, limit=limit, cursor=cursor, order_by=order_by, order=order, request_options=request_options + thread_uuid, + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + request_options=request_options, ) async def add_messages( diff --git a/src/zep_cloud/thread/raw_client.py b/src/zep_cloud/thread/raw_client.py index 0f3e97e3..5f52da9e 100644 --- a/src/zep_cloud/thread/raw_client.py +++ b/src/zep_cloud/thread/raw_client.py @@ -46,7 +46,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[ThreadListRequestOrderBy] = None, order: typing.Optional[ThreadListRequestOrder] = None, @@ -56,8 +56,8 @@ def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -83,7 +83,7 @@ def list( "threads", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -104,7 +104,7 @@ def list( _parsed_next = _parsed_response.next_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -640,7 +640,7 @@ def list_episodes( self, thread_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[Episode, EpisodePage]: @@ -650,8 +650,8 @@ def list_episodes( thread_uuid : str Thread UUID - limit : typing.Optional[int] - Page size + 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 @@ -668,7 +668,7 @@ def list_episodes( f"threads/{encode_path_param(thread_uuid)}/episodes", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -687,7 +687,7 @@ def list_episodes( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list_episodes( thread_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -764,7 +764,7 @@ def list_messages( self, thread_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[typing.Literal["created_at"]] = None, order: typing.Optional[ThreadListMessagesRequestOrder] = None, @@ -776,8 +776,8 @@ def list_messages( thread_uuid : str Thread UUID - limit : typing.Optional[int] - Page size + 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 @@ -800,7 +800,7 @@ def list_messages( f"threads/{encode_path_param(thread_uuid)}/messages", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -821,7 +821,7 @@ def list_messages( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list_messages( thread_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -1098,7 +1098,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[ThreadListRequestOrderBy] = None, order: typing.Optional[ThreadListRequestOrder] = None, @@ -1108,8 +1108,8 @@ async def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -1135,7 +1135,7 @@ async def list( "threads", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -1158,7 +1158,7 @@ async def list( async def _get_next(): return await self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -1697,7 +1697,7 @@ async def list_episodes( self, thread_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[Episode, EpisodePage]: @@ -1707,8 +1707,8 @@ async def list_episodes( thread_uuid : str Thread UUID - limit : typing.Optional[int] - Page size + 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 @@ -1725,7 +1725,7 @@ async def list_episodes( f"threads/{encode_path_param(thread_uuid)}/episodes", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -1746,7 +1746,7 @@ async def list_episodes( async def _get_next(): return await self.list_episodes( thread_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -1824,7 +1824,7 @@ async def list_messages( self, thread_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[typing.Literal["created_at"]] = None, order: typing.Optional[ThreadListMessagesRequestOrder] = None, @@ -1836,8 +1836,8 @@ async def list_messages( thread_uuid : str Thread UUID - limit : typing.Optional[int] - Page size + 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 @@ -1860,7 +1860,7 @@ async def list_messages( f"threads/{encode_path_param(thread_uuid)}/messages", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -1883,7 +1883,7 @@ async def list_messages( async def _get_next(): return await self.list_messages( thread_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, diff --git a/src/zep_cloud/trace_connection/client.py b/src/zep_cloud/trace_connection/client.py index 6ce7cc24..37031f68 100644 --- a/src/zep_cloud/trace_connection/client.py +++ b/src/zep_cloud/trace_connection/client.py @@ -40,7 +40,7 @@ def with_raw_response(self) -> RawTraceConnectionClient: def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[TraceConnection, TraceConnectionPage]: @@ -49,8 +49,8 @@ def list( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -77,7 +77,7 @@ def list( for page in response.iter_pages(): yield page """ - return self._raw_client.list(limit=limit, cursor=cursor, request_options=request_options) + return self._raw_client.list(page_size=page_size, cursor=cursor, request_options=request_options) def create( self, @@ -363,7 +363,7 @@ def with_raw_response(self) -> AsyncRawTraceConnectionClient: async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[TraceConnection, TraceConnectionPage]: @@ -372,8 +372,8 @@ async def list( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -409,7 +409,7 @@ async def main() -> None: asyncio.run(main()) """ - return await self._raw_client.list(limit=limit, cursor=cursor, request_options=request_options) + return await self._raw_client.list(page_size=page_size, cursor=cursor, request_options=request_options) async def create( self, diff --git a/src/zep_cloud/trace_connection/project/client.py b/src/zep_cloud/trace_connection/project/client.py index b26019a2..5a98fea5 100644 --- a/src/zep_cloud/trace_connection/project/client.py +++ b/src/zep_cloud/trace_connection/project/client.py @@ -29,20 +29,20 @@ def list( self, connection_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[TraceProviderProject, TraceProviderProjectPage]: """ - List provider projects with the `limit` and `cursor` query parameters. + List provider projects with the `page_size` and `cursor` query parameters. Parameters ---------- connection_uuid : str Trace connection UUID - limit : typing.Optional[int] - Page size from 1 to 100; default 50 + 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] Provider page cursor @@ -71,7 +71,9 @@ def list( for page in response.iter_pages(): yield page """ - return self._raw_client.list(connection_uuid, limit=limit, cursor=cursor, request_options=request_options) + return self._raw_client.list( + connection_uuid, page_size=page_size, cursor=cursor, request_options=request_options + ) class AsyncProjectClient: @@ -93,20 +95,20 @@ async def list( self, connection_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[TraceProviderProject, TraceProviderProjectPage]: """ - List provider projects with the `limit` and `cursor` query parameters. + List provider projects with the `page_size` and `cursor` query parameters. Parameters ---------- connection_uuid : str Trace connection UUID - limit : typing.Optional[int] - Page size from 1 to 100; default 50 + 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] Provider page cursor @@ -144,4 +146,6 @@ async def main() -> None: asyncio.run(main()) """ - return await self._raw_client.list(connection_uuid, limit=limit, cursor=cursor, request_options=request_options) + return await self._raw_client.list( + connection_uuid, page_size=page_size, cursor=cursor, request_options=request_options + ) diff --git a/src/zep_cloud/trace_connection/project/raw_client.py b/src/zep_cloud/trace_connection/project/raw_client.py index 237530e1..4a5c1519 100644 --- a/src/zep_cloud/trace_connection/project/raw_client.py +++ b/src/zep_cloud/trace_connection/project/raw_client.py @@ -28,20 +28,20 @@ def list( self, connection_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[TraceProviderProject, TraceProviderProjectPage]: """ - List provider projects with the `limit` and `cursor` query parameters. + List provider projects with the `page_size` and `cursor` query parameters. Parameters ---------- connection_uuid : str Trace connection UUID - limit : typing.Optional[int] - Page size from 1 to 100; default 50 + 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] Provider page cursor @@ -58,7 +58,7 @@ def list( f"trace-connections/{encode_path_param(connection_uuid)}/projects", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -77,7 +77,7 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( connection_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -148,20 +148,20 @@ async def list( self, connection_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[TraceProviderProject, TraceProviderProjectPage]: """ - List provider projects with the `limit` and `cursor` query parameters. + List provider projects with the `page_size` and `cursor` query parameters. Parameters ---------- connection_uuid : str Trace connection UUID - limit : typing.Optional[int] - Page size from 1 to 100; default 50 + 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] Provider page cursor @@ -178,7 +178,7 @@ async def list( f"trace-connections/{encode_path_param(connection_uuid)}/projects", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -199,7 +199,7 @@ async def list( async def _get_next(): return await self.list( connection_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/trace_connection/raw_client.py b/src/zep_cloud/trace_connection/raw_client.py index 8246016f..474b1d53 100644 --- a/src/zep_cloud/trace_connection/raw_client.py +++ b/src/zep_cloud/trace_connection/raw_client.py @@ -35,7 +35,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[TraceConnection, TraceConnectionPage]: @@ -44,8 +44,8 @@ def list( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -62,7 +62,7 @@ def list( "trace-connections", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -80,7 +80,7 @@ def list( _parsed_next = _parsed_response.next_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -692,7 +692,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[TraceConnection, TraceConnectionPage]: @@ -701,8 +701,8 @@ async def list( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -719,7 +719,7 @@ async def list( "trace-connections", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -739,7 +739,7 @@ async def list( async def _get_next(): return await self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) diff --git a/src/zep_cloud/trace_connection/trace/client.py b/src/zep_cloud/trace_connection/trace/client.py index bc3a2e5f..9f01441e 100644 --- a/src/zep_cloud/trace_connection/trace/client.py +++ b/src/zep_cloud/trace_connection/trace/client.py @@ -92,7 +92,7 @@ def list( connection_uuid: str, *, provider_project_id: str, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, filter: typing.Optional[TraceFilter] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -108,8 +108,8 @@ def list( provider_project_id : str ProviderProjectID is the provider project identifier. - limit : typing.Optional[int] - Page size from 1 to 100; default 25 + 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 @@ -145,7 +145,7 @@ def list( return self._raw_client.list( connection_uuid, provider_project_id=provider_project_id, - limit=limit, + page_size=page_size, cursor=cursor, filter=filter, request_options=request_options, @@ -236,7 +236,7 @@ async def list( connection_uuid: str, *, provider_project_id: str, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, filter: typing.Optional[TraceFilter] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -252,8 +252,8 @@ async def list( provider_project_id : str ProviderProjectID is the provider project identifier. - limit : typing.Optional[int] - Page size from 1 to 100; default 25 + 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 @@ -298,7 +298,7 @@ async def main() -> None: return await self._raw_client.list( connection_uuid, provider_project_id=provider_project_id, - limit=limit, + page_size=page_size, cursor=cursor, filter=filter, request_options=request_options, diff --git a/src/zep_cloud/trace_connection/trace/raw_client.py b/src/zep_cloud/trace_connection/trace/raw_client.py index ef616f93..bd34db34 100644 --- a/src/zep_cloud/trace_connection/trace/raw_client.py +++ b/src/zep_cloud/trace_connection/trace/raw_client.py @@ -168,7 +168,7 @@ def list( connection_uuid: str, *, provider_project_id: str, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, filter: typing.Optional[TraceFilter] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -184,8 +184,8 @@ def list( provider_project_id : str ProviderProjectID is the provider project identifier. - limit : typing.Optional[int] - Page size from 1 to 100; default 25 + 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 @@ -205,7 +205,7 @@ def list( f"trace-connections/{encode_path_param(connection_uuid)}/traces/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -236,7 +236,7 @@ def list( _get_next = lambda: self.list( connection_uuid, provider_project_id=provider_project_id, - limit=limit, + page_size=page_size, cursor=_parsed_next, filter=filter, request_options=request_options, @@ -449,7 +449,7 @@ async def list( connection_uuid: str, *, provider_project_id: str, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, filter: typing.Optional[TraceFilter] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -465,8 +465,8 @@ async def list( provider_project_id : str ProviderProjectID is the provider project identifier. - limit : typing.Optional[int] - Page size from 1 to 100; default 25 + 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 @@ -486,7 +486,7 @@ async def list( f"trace-connections/{encode_path_param(connection_uuid)}/traces/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -519,7 +519,7 @@ async def _get_next(): return await self.list( connection_uuid, provider_project_id=provider_project_id, - limit=limit, + page_size=page_size, cursor=_parsed_next, filter=filter, request_options=request_options, diff --git a/src/zep_cloud/types/__init__.py b/src/zep_cloud/types/__init__.py index 9b0c3119..6569723d 100644 --- a/src/zep_cloud/types/__init__.py +++ b/src/zep_cloud/types/__init__.py @@ -49,6 +49,22 @@ from .agent_skill_candidate_review_summary import AgentSkillCandidateReviewSummary from .agent_skill_compilation_outcome import AgentSkillCompilationOutcome from .agent_skill_compilation_outcome_rejection_class import AgentSkillCompilationOutcomeRejectionClass + from .agent_skill_contract import AgentSkillContract + from .agent_skill_contract_applicability import AgentSkillContractApplicability + from .agent_skill_contract_dependency import AgentSkillContractDependency + from .agent_skill_contract_evidence import AgentSkillContractEvidence + from .agent_skill_contract_evidence_polarity import AgentSkillContractEvidencePolarity + from .agent_skill_contract_evidence_source_kind import AgentSkillContractEvidenceSourceKind + from .agent_skill_contract_failure import AgentSkillContractFailure + from .agent_skill_contract_invocation import AgentSkillContractInvocation + from .agent_skill_contract_origin import AgentSkillContractOrigin + from .agent_skill_contract_relation import AgentSkillContractRelation + from .agent_skill_contract_relation_kind import AgentSkillContractRelationKind + from .agent_skill_contract_resource import AgentSkillContractResource + from .agent_skill_contract_section import AgentSkillContractSection + from .agent_skill_contract_step import AgentSkillContractStep + from .agent_skill_contract_text import AgentSkillContractText + from .agent_skill_contract_version_constraint import AgentSkillContractVersionConstraint from .agent_skill_evaluation import AgentSkillEvaluation from .agent_skill_evidence import AgentSkillEvidence from .agent_skill_publication_lineage import AgentSkillPublicationLineage @@ -89,10 +105,19 @@ from .agent_trace_sequence_range import AgentTraceSequenceRange from .agent_trace_source import AgentTraceSource from .agent_trace_source_deletion_result import AgentTraceSourceDeletionResult + from .agent_trace_structured_summary import AgentTraceStructuredSummary + from .agent_trace_summary_byte_range import AgentTraceSummaryByteRange + from .agent_trace_summary_citation import AgentTraceSummaryCitation + from .agent_trace_summary_coverage import AgentTraceSummaryCoverage from .agent_trace_summary_creation_reason import AgentTraceSummaryCreationReason + from .agent_trace_summary_excerpted_event import AgentTraceSummaryExcerptedEvent from .agent_trace_summary_omission_reason import AgentTraceSummaryOmissionReason from .agent_trace_summary_omitted_range import AgentTraceSummaryOmittedRange from .agent_trace_summary_page import AgentTraceSummaryPage + from .agent_trace_summary_resource import AgentTraceSummaryResource + from .agent_trace_summary_statement import AgentTraceSummaryStatement + from .agent_trace_summary_verification import AgentTraceSummaryVerification + from .agent_trace_summary_verification_status import AgentTraceSummaryVerificationStatus from .agent_trace_summary_version import AgentTraceSummaryVersion from .agent_trace_task_family_inference import AgentTraceTaskFamilyInference from .agent_trace_verification import AgentTraceVerification @@ -105,7 +130,6 @@ from .agent_verifier_principal_binding_input import AgentVerifierPrincipalBindingInput from .agent_verifier_status import AgentVerifierStatus from .api_error import ApiError - from .artifact_list_request import ArtifactListRequest from .async_result import AsyncResult from .batch import Batch from .batch_item import BatchItem @@ -118,6 +142,8 @@ from .batch_item_status import BatchItemStatus from .batch_items_response import BatchItemsResponse from .batch_page import BatchPage + from .batch_progress import BatchProgress + from .batch_status import BatchStatus from .clone_graph_request import CloneGraphRequest from .clone_graph_result import CloneGraphResult from .content_policy import ContentPolicy @@ -126,6 +152,8 @@ from .content_policy_event import ContentPolicyEvent from .content_policy_event_artifact_kind import ContentPolicyEventArtifactKind from .content_policy_event_drop_reason import ContentPolicyEventDropReason + 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_revision_page import ContentPolicyRevisionPage from .content_policy_rule import ContentPolicyRule @@ -152,9 +180,11 @@ from .debug_logging_enablement import DebugLoggingEnablement from .delete_agent_trace_request import DeleteAgentTraceRequest from .document_summary import DocumentSummary + from .document_summary_list_filters import DocumentSummaryListFilters from .document_summary_page import DocumentSummaryPage from .edge import Edge from .edge_input import EdgeInput + from .edge_list_filters import EdgeListFilters from .edge_node_ref import EdgeNodeRef from .edge_page import EdgePage from .edge_search_filters import EdgeSearchFilters @@ -167,6 +197,7 @@ from .episode_content_policy import EpisodeContentPolicy from .episode_content_policy_status import EpisodeContentPolicyStatus from .episode_debug_log import EpisodeDebugLog + from .episode_list_filters import EpisodeListFilters from .episode_page import EpisodePage from .error_body import ErrorBody from .graph import Graph @@ -179,6 +210,7 @@ from .hyperedge import Hyperedge from .hyperedge_edge import HyperedgeEdge from .hyperedge_input import HyperedgeInput + from .hyperedge_list_filters import HyperedgeListFilters from .hyperedge_page import HyperedgePage from .imported_trace_reference import ImportedTraceReference from .ingestion_trace import IngestionTrace @@ -199,6 +231,7 @@ from .instructions import Instructions from .lookup_batch_response import LookupBatchResponse from .lookup_item import LookupItem + from .lookup_item_resource_type import LookupItemResourceType from .lookup_request import LookupRequest from .membership_mutation_result import MembershipMutationResult from .message import Message @@ -214,11 +247,13 @@ from .neighbor_page import NeighborPage from .node import Node from .node_input import NodeInput + from .node_list_filters import NodeListFilters from .node_page import NodePage from .node_search_filters import NodeSearchFilters from .objective_mapping_rule import ObjectiveMappingRule from .objective_mapping_rule_source import ObjectiveMappingRuleSource from .observation import Observation + from .observation_list_filters import ObservationListFilters from .observation_page import ObservationPage from .observation_steering import ObservationSteering from .observation_type import ObservationType @@ -242,11 +277,10 @@ from .role_type import RoleType from .search_filters import SearchFilters from .search_list_request import SearchListRequest - from .search_request import SearchRequest - from .search_request_reranker import SearchRequestReranker from .skill_definition import SkillDefinition from .skill_definition_section import SkillDefinitionSection from .skill_failure import SkillFailure + from .skill_kind import SkillKind from .skill_procedure_step import SkillProcedureStep from .skill_relation import SkillRelation from .skill_resource import SkillResource @@ -261,11 +295,18 @@ from .task_family_mapping_rule_source import TaskFamilyMappingRuleSource from .task_page import TaskPage from .task_progress import TaskProgress + from .task_result import TaskResult + from .task_result_content_policy import TaskResultContentPolicy + from .task_result_content_policy_status import TaskResultContentPolicyStatus + from .task_result_edge import TaskResultEdge + from .task_result_episode import TaskResultEpisode + from .task_status import TaskStatus from .thread import Thread from .thread_context_response import ThreadContextResponse from .thread_delete_result import ThreadDeleteResult from .thread_page import ThreadPage from .thread_summary import ThreadSummary + from .thread_summary_list_filters import ThreadSummaryListFilters from .thread_summary_page import ThreadSummaryPage from .trace_connection import TraceConnection from .trace_connection_page import TraceConnectionPage @@ -274,6 +315,8 @@ from .trace_content_mapping import TraceContentMapping from .trace_filter import TraceFilter from .trace_import import TraceImport + from .trace_import_create_result import TraceImportCreateResult + from .trace_import_on_source_change import TraceImportOnSourceChange from .trace_import_page import TraceImportPage from .trace_import_pause_reason import TraceImportPauseReason from .trace_import_provider import TraceImportProvider @@ -346,6 +389,22 @@ "AgentSkillCandidateReviewSummary": ".agent_skill_candidate_review_summary", "AgentSkillCompilationOutcome": ".agent_skill_compilation_outcome", "AgentSkillCompilationOutcomeRejectionClass": ".agent_skill_compilation_outcome_rejection_class", + "AgentSkillContract": ".agent_skill_contract", + "AgentSkillContractApplicability": ".agent_skill_contract_applicability", + "AgentSkillContractDependency": ".agent_skill_contract_dependency", + "AgentSkillContractEvidence": ".agent_skill_contract_evidence", + "AgentSkillContractEvidencePolarity": ".agent_skill_contract_evidence_polarity", + "AgentSkillContractEvidenceSourceKind": ".agent_skill_contract_evidence_source_kind", + "AgentSkillContractFailure": ".agent_skill_contract_failure", + "AgentSkillContractInvocation": ".agent_skill_contract_invocation", + "AgentSkillContractOrigin": ".agent_skill_contract_origin", + "AgentSkillContractRelation": ".agent_skill_contract_relation", + "AgentSkillContractRelationKind": ".agent_skill_contract_relation_kind", + "AgentSkillContractResource": ".agent_skill_contract_resource", + "AgentSkillContractSection": ".agent_skill_contract_section", + "AgentSkillContractStep": ".agent_skill_contract_step", + "AgentSkillContractText": ".agent_skill_contract_text", + "AgentSkillContractVersionConstraint": ".agent_skill_contract_version_constraint", "AgentSkillEvaluation": ".agent_skill_evaluation", "AgentSkillEvidence": ".agent_skill_evidence", "AgentSkillPublicationLineage": ".agent_skill_publication_lineage", @@ -386,10 +445,19 @@ "AgentTraceSequenceRange": ".agent_trace_sequence_range", "AgentTraceSource": ".agent_trace_source", "AgentTraceSourceDeletionResult": ".agent_trace_source_deletion_result", + "AgentTraceStructuredSummary": ".agent_trace_structured_summary", + "AgentTraceSummaryByteRange": ".agent_trace_summary_byte_range", + "AgentTraceSummaryCitation": ".agent_trace_summary_citation", + "AgentTraceSummaryCoverage": ".agent_trace_summary_coverage", "AgentTraceSummaryCreationReason": ".agent_trace_summary_creation_reason", + "AgentTraceSummaryExcerptedEvent": ".agent_trace_summary_excerpted_event", "AgentTraceSummaryOmissionReason": ".agent_trace_summary_omission_reason", "AgentTraceSummaryOmittedRange": ".agent_trace_summary_omitted_range", "AgentTraceSummaryPage": ".agent_trace_summary_page", + "AgentTraceSummaryResource": ".agent_trace_summary_resource", + "AgentTraceSummaryStatement": ".agent_trace_summary_statement", + "AgentTraceSummaryVerification": ".agent_trace_summary_verification", + "AgentTraceSummaryVerificationStatus": ".agent_trace_summary_verification_status", "AgentTraceSummaryVersion": ".agent_trace_summary_version", "AgentTraceTaskFamilyInference": ".agent_trace_task_family_inference", "AgentTraceVerification": ".agent_trace_verification", @@ -402,7 +470,6 @@ "AgentVerifierPrincipalBindingInput": ".agent_verifier_principal_binding_input", "AgentVerifierStatus": ".agent_verifier_status", "ApiError": ".api_error", - "ArtifactListRequest": ".artifact_list_request", "AsyncResult": ".async_result", "Batch": ".batch", "BatchItem": ".batch_item", @@ -415,6 +482,8 @@ "BatchItemStatus": ".batch_item_status", "BatchItemsResponse": ".batch_items_response", "BatchPage": ".batch_page", + "BatchProgress": ".batch_progress", + "BatchStatus": ".batch_status", "CloneGraphRequest": ".clone_graph_request", "CloneGraphResult": ".clone_graph_result", "ContentPolicy": ".content_policy", @@ -423,6 +492,8 @@ "ContentPolicyEvent": ".content_policy_event", "ContentPolicyEventArtifactKind": ".content_policy_event_artifact_kind", "ContentPolicyEventDropReason": ".content_policy_event_drop_reason", + "ContentPolicyEventListFilters": ".content_policy_event_list_filters", + "ContentPolicyEventListFiltersDropReason": ".content_policy_event_list_filters_drop_reason", "ContentPolicyEventPage": ".content_policy_event_page", "ContentPolicyRevisionPage": ".content_policy_revision_page", "ContentPolicyRule": ".content_policy_rule", @@ -449,9 +520,11 @@ "DebugLoggingEnablement": ".debug_logging_enablement", "DeleteAgentTraceRequest": ".delete_agent_trace_request", "DocumentSummary": ".document_summary", + "DocumentSummaryListFilters": ".document_summary_list_filters", "DocumentSummaryPage": ".document_summary_page", "Edge": ".edge", "EdgeInput": ".edge_input", + "EdgeListFilters": ".edge_list_filters", "EdgeNodeRef": ".edge_node_ref", "EdgePage": ".edge_page", "EdgeSearchFilters": ".edge_search_filters", @@ -464,6 +537,7 @@ "EpisodeContentPolicy": ".episode_content_policy", "EpisodeContentPolicyStatus": ".episode_content_policy_status", "EpisodeDebugLog": ".episode_debug_log", + "EpisodeListFilters": ".episode_list_filters", "EpisodePage": ".episode_page", "ErrorBody": ".error_body", "Graph": ".graph", @@ -476,6 +550,7 @@ "Hyperedge": ".hyperedge", "HyperedgeEdge": ".hyperedge_edge", "HyperedgeInput": ".hyperedge_input", + "HyperedgeListFilters": ".hyperedge_list_filters", "HyperedgePage": ".hyperedge_page", "ImportedTraceReference": ".imported_trace_reference", "IngestionTrace": ".ingestion_trace", @@ -496,6 +571,7 @@ "Instructions": ".instructions", "LookupBatchResponse": ".lookup_batch_response", "LookupItem": ".lookup_item", + "LookupItemResourceType": ".lookup_item_resource_type", "LookupRequest": ".lookup_request", "MembershipMutationResult": ".membership_mutation_result", "Message": ".message", @@ -511,11 +587,13 @@ "NeighborPage": ".neighbor_page", "Node": ".node", "NodeInput": ".node_input", + "NodeListFilters": ".node_list_filters", "NodePage": ".node_page", "NodeSearchFilters": ".node_search_filters", "ObjectiveMappingRule": ".objective_mapping_rule", "ObjectiveMappingRuleSource": ".objective_mapping_rule_source", "Observation": ".observation", + "ObservationListFilters": ".observation_list_filters", "ObservationPage": ".observation_page", "ObservationSteering": ".observation_steering", "ObservationType": ".observation_type", @@ -539,11 +617,10 @@ "RoleType": ".role_type", "SearchFilters": ".search_filters", "SearchListRequest": ".search_list_request", - "SearchRequest": ".search_request", - "SearchRequestReranker": ".search_request_reranker", "SkillDefinition": ".skill_definition", "SkillDefinitionSection": ".skill_definition_section", "SkillFailure": ".skill_failure", + "SkillKind": ".skill_kind", "SkillProcedureStep": ".skill_procedure_step", "SkillRelation": ".skill_relation", "SkillResource": ".skill_resource", @@ -558,11 +635,18 @@ "TaskFamilyMappingRuleSource": ".task_family_mapping_rule_source", "TaskPage": ".task_page", "TaskProgress": ".task_progress", + "TaskResult": ".task_result", + "TaskResultContentPolicy": ".task_result_content_policy", + "TaskResultContentPolicyStatus": ".task_result_content_policy_status", + "TaskResultEdge": ".task_result_edge", + "TaskResultEpisode": ".task_result_episode", + "TaskStatus": ".task_status", "Thread": ".thread", "ThreadContextResponse": ".thread_context_response", "ThreadDeleteResult": ".thread_delete_result", "ThreadPage": ".thread_page", "ThreadSummary": ".thread_summary", + "ThreadSummaryListFilters": ".thread_summary_list_filters", "ThreadSummaryPage": ".thread_summary_page", "TraceConnection": ".trace_connection", "TraceConnectionPage": ".trace_connection_page", @@ -571,6 +655,8 @@ "TraceContentMapping": ".trace_content_mapping", "TraceFilter": ".trace_filter", "TraceImport": ".trace_import", + "TraceImportCreateResult": ".trace_import_create_result", + "TraceImportOnSourceChange": ".trace_import_on_source_change", "TraceImportPage": ".trace_import_page", "TraceImportPauseReason": ".trace_import_pause_reason", "TraceImportProvider": ".trace_import_provider", @@ -667,6 +753,22 @@ def __dir__(): "AgentSkillCandidateReviewSummary", "AgentSkillCompilationOutcome", "AgentSkillCompilationOutcomeRejectionClass", + "AgentSkillContract", + "AgentSkillContractApplicability", + "AgentSkillContractDependency", + "AgentSkillContractEvidence", + "AgentSkillContractEvidencePolarity", + "AgentSkillContractEvidenceSourceKind", + "AgentSkillContractFailure", + "AgentSkillContractInvocation", + "AgentSkillContractOrigin", + "AgentSkillContractRelation", + "AgentSkillContractRelationKind", + "AgentSkillContractResource", + "AgentSkillContractSection", + "AgentSkillContractStep", + "AgentSkillContractText", + "AgentSkillContractVersionConstraint", "AgentSkillEvaluation", "AgentSkillEvidence", "AgentSkillPublicationLineage", @@ -707,10 +809,19 @@ def __dir__(): "AgentTraceSequenceRange", "AgentTraceSource", "AgentTraceSourceDeletionResult", + "AgentTraceStructuredSummary", + "AgentTraceSummaryByteRange", + "AgentTraceSummaryCitation", + "AgentTraceSummaryCoverage", "AgentTraceSummaryCreationReason", + "AgentTraceSummaryExcerptedEvent", "AgentTraceSummaryOmissionReason", "AgentTraceSummaryOmittedRange", "AgentTraceSummaryPage", + "AgentTraceSummaryResource", + "AgentTraceSummaryStatement", + "AgentTraceSummaryVerification", + "AgentTraceSummaryVerificationStatus", "AgentTraceSummaryVersion", "AgentTraceTaskFamilyInference", "AgentTraceVerification", @@ -723,7 +834,6 @@ def __dir__(): "AgentVerifierPrincipalBindingInput", "AgentVerifierStatus", "ApiError", - "ArtifactListRequest", "AsyncResult", "Batch", "BatchItem", @@ -736,6 +846,8 @@ def __dir__(): "BatchItemStatus", "BatchItemsResponse", "BatchPage", + "BatchProgress", + "BatchStatus", "CloneGraphRequest", "CloneGraphResult", "ContentPolicy", @@ -744,6 +856,8 @@ def __dir__(): "ContentPolicyEvent", "ContentPolicyEventArtifactKind", "ContentPolicyEventDropReason", + "ContentPolicyEventListFilters", + "ContentPolicyEventListFiltersDropReason", "ContentPolicyEventPage", "ContentPolicyRevisionPage", "ContentPolicyRule", @@ -770,9 +884,11 @@ def __dir__(): "DebugLoggingEnablement", "DeleteAgentTraceRequest", "DocumentSummary", + "DocumentSummaryListFilters", "DocumentSummaryPage", "Edge", "EdgeInput", + "EdgeListFilters", "EdgeNodeRef", "EdgePage", "EdgeSearchFilters", @@ -785,6 +901,7 @@ def __dir__(): "EpisodeContentPolicy", "EpisodeContentPolicyStatus", "EpisodeDebugLog", + "EpisodeListFilters", "EpisodePage", "ErrorBody", "Graph", @@ -797,6 +914,7 @@ def __dir__(): "Hyperedge", "HyperedgeEdge", "HyperedgeInput", + "HyperedgeListFilters", "HyperedgePage", "ImportedTraceReference", "IngestionTrace", @@ -817,6 +935,7 @@ def __dir__(): "Instructions", "LookupBatchResponse", "LookupItem", + "LookupItemResourceType", "LookupRequest", "MembershipMutationResult", "Message", @@ -832,11 +951,13 @@ def __dir__(): "NeighborPage", "Node", "NodeInput", + "NodeListFilters", "NodePage", "NodeSearchFilters", "ObjectiveMappingRule", "ObjectiveMappingRuleSource", "Observation", + "ObservationListFilters", "ObservationPage", "ObservationSteering", "ObservationType", @@ -860,11 +981,10 @@ def __dir__(): "RoleType", "SearchFilters", "SearchListRequest", - "SearchRequest", - "SearchRequestReranker", "SkillDefinition", "SkillDefinitionSection", "SkillFailure", + "SkillKind", "SkillProcedureStep", "SkillRelation", "SkillResource", @@ -879,11 +999,18 @@ def __dir__(): "TaskFamilyMappingRuleSource", "TaskPage", "TaskProgress", + "TaskResult", + "TaskResultContentPolicy", + "TaskResultContentPolicyStatus", + "TaskResultEdge", + "TaskResultEpisode", + "TaskStatus", "Thread", "ThreadContextResponse", "ThreadDeleteResult", "ThreadPage", "ThreadSummary", + "ThreadSummaryListFilters", "ThreadSummaryPage", "TraceConnection", "TraceConnectionPage", @@ -892,6 +1019,8 @@ def __dir__(): "TraceContentMapping", "TraceFilter", "TraceImport", + "TraceImportCreateResult", + "TraceImportOnSourceChange", "TraceImportPage", "TraceImportPauseReason", "TraceImportProvider", diff --git a/src/zep_cloud/types/agent_skill_contract.py b/src/zep_cloud/types/agent_skill_contract.py new file mode 100644 index 00000000..e9e00575 --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract.py @@ -0,0 +1,55 @@ +# 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 .agent_skill_contract_applicability import AgentSkillContractApplicability +from .agent_skill_contract_dependency import AgentSkillContractDependency +from .agent_skill_contract_evidence import AgentSkillContractEvidence +from .agent_skill_contract_failure import AgentSkillContractFailure +from .agent_skill_contract_invocation import AgentSkillContractInvocation +from .agent_skill_contract_origin import AgentSkillContractOrigin +from .agent_skill_contract_relation import AgentSkillContractRelation +from .agent_skill_contract_resource import AgentSkillContractResource +from .agent_skill_contract_section import AgentSkillContractSection +from .agent_skill_contract_step import AgentSkillContractStep +from .agent_skill_contract_text import AgentSkillContractText +from .skill_kind import SkillKind + + +class AgentSkillContract(UniversalBaseModel): + aliases: typing.Optional[typing.List[str]] = None + applicability: typing.Optional[AgentSkillContractApplicability] = None + citations: typing.Optional[typing.List[str]] = None + confidence: typing.Optional[float] = None + contraindications: typing.Optional[typing.List[AgentSkillContractText]] = None + customer_sections: typing.Optional[typing.List[AgentSkillContractSection]] = None + dependencies: typing.Optional[typing.List[AgentSkillContractDependency]] = None + description: typing.Optional[str] = None + environments: typing.Optional[typing.List[AgentSkillContractResource]] = None + evidence: typing.Optional[typing.List[AgentSkillContractEvidence]] = None + failures: typing.Optional[typing.List[AgentSkillContractFailure]] = None + invocation: typing.Optional[AgentSkillContractInvocation] = None + kind: typing.Optional[SkillKind] = None + name: typing.Optional[str] = None + origin: typing.Optional[AgentSkillContractOrigin] = None + outputs: typing.Optional[typing.List[AgentSkillContractText]] = None + package_name: typing.Optional[str] = None + preconditions: typing.Optional[typing.List[AgentSkillContractText]] = None + procedure: typing.Optional[typing.List[AgentSkillContractStep]] = None + relations: typing.Optional[typing.List[AgentSkillContractRelation]] = None + schema_version: typing.Optional[str] = None + success_criteria: typing.Optional[typing.List[AgentSkillContractText]] = None + task_family: typing.Optional[str] = None + termination_conditions: typing.Optional[typing.List[AgentSkillContractText]] = None + tools: typing.Optional[typing.List[AgentSkillContractResource]] = None + + 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/agent_skill_contract_applicability.py b/src/zep_cloud/types/agent_skill_contract_applicability.py new file mode 100644 index 00000000..bb39c4f8 --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_applicability.py @@ -0,0 +1,22 @@ +# 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 .agent_skill_contract_version_constraint import AgentSkillContractVersionConstraint + + +class AgentSkillContractApplicability(UniversalBaseModel): + agent_versions: typing.Optional[typing.List[str]] = None + citations: typing.Optional[typing.List[str]] = None + models: typing.Optional[typing.List[AgentSkillContractVersionConstraint]] = None + + 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/artifact_list_request.py b/src/zep_cloud/types/agent_skill_contract_dependency.py similarity index 69% rename from src/zep_cloud/types/artifact_list_request.py rename to src/zep_cloud/types/agent_skill_contract_dependency.py index c5fff2e4..08af7fbc 100644 --- a/src/zep_cloud/types/artifact_list_request.py +++ b/src/zep_cloud/types/agent_skill_contract_dependency.py @@ -6,11 +6,9 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -class ArtifactListRequest(UniversalBaseModel): - filters: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) - """ - Filters constraining which items are returned. - """ +class AgentSkillContractDependency(UniversalBaseModel): + package_name: typing.Optional[str] = None + version_constraint: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/zep_cloud/types/agent_skill_contract_evidence.py b/src/zep_cloud/types/agent_skill_contract_evidence.py new file mode 100644 index 00000000..ccb2d05d --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_evidence.py @@ -0,0 +1,26 @@ +# 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 .agent_skill_contract_evidence_polarity import AgentSkillContractEvidencePolarity +from .agent_skill_contract_evidence_source_kind import AgentSkillContractEvidenceSourceKind + + +class AgentSkillContractEvidence(UniversalBaseModel): + attempt_family_id: typing.Optional[str] = None + id: typing.Optional[str] = None + polarity: typing.Optional[AgentSkillContractEvidencePolarity] = None + source_id: typing.Optional[str] = None + source_kind: typing.Optional[AgentSkillContractEvidenceSourceKind] = None + trajectory_id: typing.Optional[str] = None + + 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/agent_skill_contract_evidence_polarity.py b/src/zep_cloud/types/agent_skill_contract_evidence_polarity.py new file mode 100644 index 00000000..012f7062 --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_evidence_polarity.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AgentSkillContractEvidencePolarity = typing.Union[typing.Literal["supporting", "contradicting", "neutral"], typing.Any] diff --git a/src/zep_cloud/types/agent_skill_contract_evidence_source_kind.py b/src/zep_cloud/types/agent_skill_contract_evidence_source_kind.py new file mode 100644 index 00000000..314cce3f --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_evidence_source_kind.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AgentSkillContractEvidenceSourceKind = typing.Union[typing.Literal["trajectory", "event", "summary"], typing.Any] diff --git a/src/zep_cloud/types/agent_skill_contract_failure.py b/src/zep_cloud/types/agent_skill_contract_failure.py new file mode 100644 index 00000000..5dcdec0f --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_failure.py @@ -0,0 +1,21 @@ +# 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 .agent_skill_contract_text import AgentSkillContractText + + +class AgentSkillContractFailure(UniversalBaseModel): + condition: typing.Optional[AgentSkillContractText] = None + recovery: typing.Optional[typing.List[AgentSkillContractText]] = None + + 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/agent_skill_contract_invocation.py b/src/zep_cloud/types/agent_skill_contract_invocation.py new file mode 100644 index 00000000..8818bc1a --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_invocation.py @@ -0,0 +1,21 @@ +# 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 .agent_skill_contract_text import AgentSkillContractText + + +class AgentSkillContractInvocation(UniversalBaseModel): + conditions: typing.Optional[typing.List[AgentSkillContractText]] = None + summary: typing.Optional[AgentSkillContractText] = None + + 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/agent_skill_contract_origin.py b/src/zep_cloud/types/agent_skill_contract_origin.py new file mode 100644 index 00000000..2330939e --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_origin.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AgentSkillContractOrigin = typing.Union[typing.Literal["evidence_derived", "customer_authored"], typing.Any] diff --git a/src/zep_cloud/types/agent_skill_contract_relation.py b/src/zep_cloud/types/agent_skill_contract_relation.py new file mode 100644 index 00000000..2feee0d8 --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_relation.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 .agent_skill_contract_relation_kind import AgentSkillContractRelationKind + + +class AgentSkillContractRelation(UniversalBaseModel): + citations: typing.Optional[typing.List[str]] = None + kind: typing.Optional[AgentSkillContractRelationKind] = None + target_package_name: typing.Optional[str] = None + version_constraint: typing.Optional[str] = None + + 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/agent_skill_contract_relation_kind.py b/src/zep_cloud/types/agent_skill_contract_relation_kind.py new file mode 100644 index 00000000..da748c0c --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_relation_kind.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AgentSkillContractRelationKind = typing.Union[ + typing.Literal["composes", "requires", "conflicts_with", "supersedes", "related"], typing.Any +] diff --git a/src/zep_cloud/types/agent_skill_contract_resource.py b/src/zep_cloud/types/agent_skill_contract_resource.py new file mode 100644 index 00000000..3601a823 --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_resource.py @@ -0,0 +1,22 @@ +# 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 AgentSkillContractResource(UniversalBaseModel): + aliases: typing.Optional[typing.List[str]] = None + citations: typing.Optional[typing.List[str]] = None + name: typing.Optional[str] = None + version_constraint: typing.Optional[str] = None + + 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/agent_skill_contract_section.py b/src/zep_cloud/types/agent_skill_contract_section.py new file mode 100644 index 00000000..95f0c7b8 --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_section.py @@ -0,0 +1,22 @@ +# 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 AgentSkillContractSection(UniversalBaseModel): + heading: typing.Optional[str] = None + markdown: typing.Optional[str] = None + schema_version: typing.Optional[str] = None + section_id: typing.Optional[str] = None + + 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/agent_skill_contract_step.py b/src/zep_cloud/types/agent_skill_contract_step.py new file mode 100644 index 00000000..cdeb0f8b --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_step.py @@ -0,0 +1,22 @@ +# 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 .agent_skill_contract_text import AgentSkillContractText + + +class AgentSkillContractStep(UniversalBaseModel): + decision: typing.Optional[AgentSkillContractText] = None + expected_observations: typing.Optional[typing.List[AgentSkillContractText]] = None + instruction: typing.Optional[AgentSkillContractText] = None + + 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/agent_skill_contract_text.py b/src/zep_cloud/types/agent_skill_contract_text.py new file mode 100644 index 00000000..2a9b94b3 --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_text.py @@ -0,0 +1,20 @@ +# 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 AgentSkillContractText(UniversalBaseModel): + citations: typing.Optional[typing.List[str]] = None + text: typing.Optional[str] = None + + 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/agent_skill_contract_version_constraint.py b/src/zep_cloud/types/agent_skill_contract_version_constraint.py new file mode 100644 index 00000000..13d402f1 --- /dev/null +++ b/src/zep_cloud/types/agent_skill_contract_version_constraint.py @@ -0,0 +1,20 @@ +# 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 AgentSkillContractVersionConstraint(UniversalBaseModel): + name: typing.Optional[str] = None + version_constraint: typing.Optional[str] = None + + 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/agent_skill_version.py b/src/zep_cloud/types/agent_skill_version.py index d6633c3f..9cfae13f 100644 --- a/src/zep_cloud/types/agent_skill_version.py +++ b/src/zep_cloud/types/agent_skill_version.py @@ -4,11 +4,12 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .agent_skill_contract import AgentSkillContract from .skill_definition import SkillDefinition class AgentSkillVersion(UniversalBaseModel): - contract: typing.Optional[typing.Dict[str, typing.Any]] = None + contract: typing.Optional[AgentSkillContract] = None created_at: typing.Optional[str] = None definition: typing.Optional[SkillDefinition] = None markdown: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/zep_cloud/types/agent_trace_event_context.py b/src/zep_cloud/types/agent_trace_event_context.py index 77d618ff..6ea6bf5a 100644 --- a/src/zep_cloud/types/agent_trace_event_context.py +++ b/src/zep_cloud/types/agent_trace_event_context.py @@ -5,6 +5,7 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .agent_trace_resource_ref import AgentTraceResourceRef +from .agent_trace_verification import AgentTraceVerification class AgentTraceEventContext(UniversalBaseModel): @@ -12,7 +13,7 @@ class AgentTraceEventContext(UniversalBaseModel): environments: typing.Optional[typing.List[AgentTraceResourceRef]] = None model: typing.Optional[AgentTraceResourceRef] = None tools: typing.Optional[typing.List[AgentTraceResourceRef]] = None - verification: typing.Optional[str] = None + verification: typing.Optional[AgentTraceVerification] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/zep_cloud/types/agent_trace_source.py b/src/zep_cloud/types/agent_trace_source.py index 8f1b5a51..bd40ede6 100644 --- a/src/zep_cloud/types/agent_trace_source.py +++ b/src/zep_cloud/types/agent_trace_source.py @@ -14,7 +14,7 @@ class AgentTraceSource(UniversalBaseModel): provider: typing.Optional[str] = None provider_project_id: typing.Optional[str] = None run_uuid: typing.Optional[str] = None - scores: typing.Optional[typing.Dict[str, typing.Any]] = None + scores: typing.Optional[typing.Dict[str, float]] = None source_changed: typing.Optional[bool] = pydantic.Field(default=None) """ SourceChanged reports whether the provider trace changed after import. diff --git a/src/zep_cloud/types/agent_trace_structured_summary.py b/src/zep_cloud/types/agent_trace_structured_summary.py new file mode 100644 index 00000000..cb505df9 --- /dev/null +++ b/src/zep_cloud/types/agent_trace_structured_summary.py @@ -0,0 +1,43 @@ +# 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 .agent_trace_outcome import AgentTraceOutcome +from .agent_trace_summary_coverage import AgentTraceSummaryCoverage +from .agent_trace_summary_resource import AgentTraceSummaryResource +from .agent_trace_summary_statement import AgentTraceSummaryStatement +from .agent_trace_summary_verification import AgentTraceSummaryVerification + + +class AgentTraceStructuredSummary(UniversalBaseModel): + ambiguities: typing.Optional[typing.List[AgentTraceSummaryStatement]] = None + approach: typing.Optional[typing.List[AgentTraceSummaryStatement]] = None + artifacts: typing.Optional[typing.List[AgentTraceSummaryResource]] = None + candidate_lessons: typing.Optional[typing.List[AgentTraceSummaryStatement]] = None + corrections: typing.Optional[typing.List[AgentTraceSummaryStatement]] = None + coverage: typing.Optional[AgentTraceSummaryCoverage] = None + effective_steps: typing.Optional[typing.List[AgentTraceSummaryStatement]] = None + environments: typing.Optional[typing.List[AgentTraceSummaryResource]] = None + errors: typing.Optional[typing.List[AgentTraceSummaryStatement]] = None + event_time_basis: typing.Optional[str] = None + first_event_time: typing.Optional[str] = None + ineffective_steps: typing.Optional[typing.List[AgentTraceSummaryStatement]] = None + last_event_time: typing.Optional[str] = None + objective: typing.Optional[str] = None + recoveries: typing.Optional[typing.List[AgentTraceSummaryStatement]] = None + reported_outcome: typing.Optional[AgentTraceOutcome] = None + result: typing.Optional[AgentTraceSummaryStatement] = None + task_family: typing.Optional[str] = None + tools: typing.Optional[typing.List[AgentTraceSummaryResource]] = None + verification: typing.Optional[AgentTraceSummaryVerification] = None + + 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/agent_trace_summary_byte_range.py b/src/zep_cloud/types/agent_trace_summary_byte_range.py new file mode 100644 index 00000000..47b2976a --- /dev/null +++ b/src/zep_cloud/types/agent_trace_summary_byte_range.py @@ -0,0 +1,20 @@ +# 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 AgentTraceSummaryByteRange(UniversalBaseModel): + end: typing.Optional[int] = None + start: typing.Optional[int] = None + + 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/agent_trace_summary_citation.py b/src/zep_cloud/types/agent_trace_summary_citation.py new file mode 100644 index 00000000..e1e09adb --- /dev/null +++ b/src/zep_cloud/types/agent_trace_summary_citation.py @@ -0,0 +1,20 @@ +# 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 AgentTraceSummaryCitation(UniversalBaseModel): + event_id: typing.Optional[str] = None + sequence: typing.Optional[int] = None + + 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/agent_trace_summary_coverage.py b/src/zep_cloud/types/agent_trace_summary_coverage.py new file mode 100644 index 00000000..fde261cd --- /dev/null +++ b/src/zep_cloud/types/agent_trace_summary_coverage.py @@ -0,0 +1,24 @@ +# 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 .agent_trace_summary_excerpted_event import AgentTraceSummaryExcerptedEvent +from .agent_trace_summary_omitted_range import AgentTraceSummaryOmittedRange + + +class AgentTraceSummaryCoverage(UniversalBaseModel): + excerpted_events: typing.Optional[typing.List[AgentTraceSummaryExcerptedEvent]] = None + first_sequence: typing.Optional[int] = None + last_sequence: typing.Optional[int] = None + omitted_sequence_ranges: typing.Optional[typing.List[AgentTraceSummaryOmittedRange]] = None + + 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/agent_trace_summary_excerpted_event.py b/src/zep_cloud/types/agent_trace_summary_excerpted_event.py new file mode 100644 index 00000000..69c619e5 --- /dev/null +++ b/src/zep_cloud/types/agent_trace_summary_excerpted_event.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 .agent_trace_summary_byte_range import AgentTraceSummaryByteRange + + +class AgentTraceSummaryExcerptedEvent(UniversalBaseModel): + content_bytes: typing.Optional[int] = None + event_id: typing.Optional[str] = None + omitted_byte_ranges: typing.Optional[typing.List[AgentTraceSummaryByteRange]] = None + sequence: typing.Optional[int] = None + + 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/agent_trace_summary_resource.py b/src/zep_cloud/types/agent_trace_summary_resource.py new file mode 100644 index 00000000..dd7ecd1c --- /dev/null +++ b/src/zep_cloud/types/agent_trace_summary_resource.py @@ -0,0 +1,22 @@ +# 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 .agent_trace_summary_citation import AgentTraceSummaryCitation + + +class AgentTraceSummaryResource(UniversalBaseModel): + citations: typing.Optional[typing.List[AgentTraceSummaryCitation]] = None + name: typing.Optional[str] = None + version: typing.Optional[str] = None + + 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/agent_trace_summary_statement.py b/src/zep_cloud/types/agent_trace_summary_statement.py new file mode 100644 index 00000000..9fe22b14 --- /dev/null +++ b/src/zep_cloud/types/agent_trace_summary_statement.py @@ -0,0 +1,21 @@ +# 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 .agent_trace_summary_citation import AgentTraceSummaryCitation + + +class AgentTraceSummaryStatement(UniversalBaseModel): + citations: typing.Optional[typing.List[AgentTraceSummaryCitation]] = None + text: typing.Optional[str] = None + + 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/agent_trace_summary_verification.py b/src/zep_cloud/types/agent_trace_summary_verification.py new file mode 100644 index 00000000..483bedd4 --- /dev/null +++ b/src/zep_cloud/types/agent_trace_summary_verification.py @@ -0,0 +1,25 @@ +# 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 .agent_trace_summary_citation import AgentTraceSummaryCitation +from .agent_trace_summary_statement import AgentTraceSummaryStatement +from .agent_trace_summary_verification_status import AgentTraceSummaryVerificationStatus + + +class AgentTraceSummaryVerification(UniversalBaseModel): + citations: typing.Optional[typing.List[AgentTraceSummaryCitation]] = None + details: typing.Optional[typing.List[AgentTraceSummaryStatement]] = None + status: typing.Optional[AgentTraceSummaryVerificationStatus] = None + verifier_ids: typing.Optional[typing.List[str]] = None + + 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/agent_trace_summary_verification_status.py b/src/zep_cloud/types/agent_trace_summary_verification_status.py new file mode 100644 index 00000000..894faa0d --- /dev/null +++ b/src/zep_cloud/types/agent_trace_summary_verification_status.py @@ -0,0 +1,8 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +AgentTraceSummaryVerificationStatus = typing.Union[ + typing.Literal["unverified", "agent_verified", "tool_verified", "customer_verified", "externally_verified"], + typing.Any, +] diff --git a/src/zep_cloud/types/agent_trace_summary_version.py b/src/zep_cloud/types/agent_trace_summary_version.py index 1b4fd0df..08a52001 100644 --- a/src/zep_cloud/types/agent_trace_summary_version.py +++ b/src/zep_cloud/types/agent_trace_summary_version.py @@ -7,6 +7,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from ..core.serialization import FieldMetadata from .agent_trace_outcome import AgentTraceOutcome +from .agent_trace_structured_summary import AgentTraceStructuredSummary from .agent_trace_summary_creation_reason import AgentTraceSummaryCreationReason from .agent_trace_summary_omitted_range import AgentTraceSummaryOmittedRange from .agent_trace_verification import AgentTraceVerification @@ -24,7 +25,7 @@ class AgentTraceSummaryVersion(UniversalBaseModel): omitted_sequence_ranges: typing.Optional[typing.List[AgentTraceSummaryOmittedRange]] = None outcome: typing.Optional[AgentTraceOutcome] = None parent_version_uuid: typing.Optional[str] = None - structured_summary: typing.Optional[typing.Dict[str, typing.Any]] = None + structured_summary: typing.Optional[AgentTraceStructuredSummary] = None text: typing.Optional[str] = None trace_uuid: typing.Optional[str] = None uuid_: typing_extensions.Annotated[ diff --git a/src/zep_cloud/types/batch.py b/src/zep_cloud/types/batch.py index ce9ab404..ba7833e1 100644 --- a/src/zep_cloud/types/batch.py +++ b/src/zep_cloud/types/batch.py @@ -6,6 +6,8 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from ..core.serialization import FieldMetadata +from .batch_progress import BatchProgress +from .batch_status import BatchStatus class Batch(UniversalBaseModel): @@ -19,13 +21,13 @@ class Batch(UniversalBaseModel): Custom metadata associated with the batch, supplied when it was created. """ - progress: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + progress: typing.Optional[BatchProgress] = pydantic.Field(default=None) """ The batch's processing progress, including its current stage and item counts. Present only once processing has started. """ - status: typing.Optional[str] = pydantic.Field(default=None) + status: typing.Optional[BatchStatus] = pydantic.Field(default=None) """ The processing status of the batch: draft, invalid, queued, processing, succeeded, partial, failed, or canceled. diff --git a/src/zep_cloud/types/batch_item.py b/src/zep_cloud/types/batch_item.py index 8a966b72..41e17827 100644 --- a/src/zep_cloud/types/batch_item.py +++ b/src/zep_cloud/types/batch_item.py @@ -60,6 +60,12 @@ class BatchItem(UniversalBaseModel): The kind of item: graph_episode or thread_message. """ + user_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The unique identifier of the user that owns the graph. Present only when + the graph is a user graph. + """ + uuid_: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="uuid"), diff --git a/src/zep_cloud/types/batch_progress.py b/src/zep_cloud/types/batch_progress.py new file mode 100644 index 00000000..d3e0e6b2 --- /dev/null +++ b/src/zep_cloud/types/batch_progress.py @@ -0,0 +1,42 @@ +# 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 BatchProgress(UniversalBaseModel): + failed_items: typing.Optional[int] = pydantic.Field(default=None) + """ + The number of items that failed. + """ + + processing_items: typing.Optional[int] = pydantic.Field(default=None) + """ + The number of items that are in processing now. + """ + + stage: typing.Optional[str] = pydantic.Field(default=None) + """ + The processing stage that the batch is in. + """ + + succeeded_items: typing.Optional[int] = pydantic.Field(default=None) + """ + The number of items that were processed successfully. + """ + + total_items: typing.Optional[int] = pydantic.Field(default=None) + """ + The number of items in the batch. + """ + + 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_status.py b/src/zep_cloud/types/batch_status.py new file mode 100644 index 00000000..deacee6b --- /dev/null +++ b/src/zep_cloud/types/batch_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +BatchStatus = typing.Union[ + typing.Literal["draft", "invalid", "queued", "processing", "succeeded", "partial", "failed", "canceled"], typing.Any +] diff --git a/src/zep_cloud/types/content_policy_event_list_filters.py b/src/zep_cloud/types/content_policy_event_list_filters.py new file mode 100644 index 00000000..1110e4da --- /dev/null +++ b/src/zep_cloud/types/content_policy_event_list_filters.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 .content_policy_event_list_filters_drop_reason import ContentPolicyEventListFiltersDropReason + + +class ContentPolicyEventListFilters(UniversalBaseModel): + drop_reason: typing.Optional[ContentPolicyEventListFiltersDropReason] = pydantic.Field(default=None) + """ + Include only the events with this drop reason. + """ + + episode_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + Include only the events of this episode. + """ + + 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/content_policy_event_list_filters_drop_reason.py b/src/zep_cloud/types/content_policy_event_list_filters_drop_reason.py new file mode 100644 index 00000000..428d080f --- /dev/null +++ b/src/zep_cloud/types/content_policy_event_list_filters_drop_reason.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ContentPolicyEventListFiltersDropReason = typing.Union[ + typing.Literal["match", "indeterminate", "oversize", "dependent"], typing.Any +] diff --git a/src/zep_cloud/types/context_edge.py b/src/zep_cloud/types/context_edge.py index 7b8e20e4..72bfebe2 100644 --- a/src/zep_cloud/types/context_edge.py +++ b/src/zep_cloud/types/context_edge.py @@ -117,6 +117,12 @@ class ContextEdge(UniversalBaseModel): The unique identifier of the edge's target node. """ + user_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The unique identifier of the user that owns the graph. Present only when + the graph is a user graph. + """ + uuid_: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="uuid"), diff --git a/src/zep_cloud/types/context_episode.py b/src/zep_cloud/types/context_episode.py index 4ed40138..24d1a8d5 100644 --- a/src/zep_cloud/types/context_episode.py +++ b/src/zep_cloud/types/context_episode.py @@ -103,6 +103,12 @@ class ContextEpisode(UniversalBaseModel): thread. """ + user_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The unique identifier of the user that owns the graph. Present only when + the graph is a user graph. + """ + uuid_: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="uuid"), diff --git a/src/zep_cloud/types/context_node.py b/src/zep_cloud/types/context_node.py index c4cc9fcb..3147c689 100644 --- a/src/zep_cloud/types/context_node.py +++ b/src/zep_cloud/types/context_node.py @@ -79,6 +79,12 @@ class ContextNode(UniversalBaseModel): A generated summary of the entity that the node represents. """ + user_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The unique identifier of the user that owns the graph. Present only when + the graph is a user graph. + """ + uuid_: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="uuid"), diff --git a/src/zep_cloud/types/context_observation.py b/src/zep_cloud/types/context_observation.py index 2e9cf1c4..f49e9142 100644 --- a/src/zep_cloud/types/context_observation.py +++ b/src/zep_cloud/types/context_observation.py @@ -63,6 +63,12 @@ class ContextObservation(UniversalBaseModel): A generated summary of the observation. """ + user_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The unique identifier of the user that owns the graph. Present only when + the graph is a user graph. + """ + uuid_: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="uuid"), diff --git a/src/zep_cloud/types/document_summary_list_filters.py b/src/zep_cloud/types/document_summary_list_filters.py new file mode 100644 index 00000000..5d3cd9d5 --- /dev/null +++ b/src/zep_cloud/types/document_summary_list_filters.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .date_filters import DateFilters +from .property_filter import PropertyFilter + + +class DocumentSummaryListFilters(UniversalBaseModel): + connected_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges connected to any of these node UUIDs. Node search does not support this filter. + """ + + 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. + """ + + date_filters: typing.Optional[DateFilters] = pydantic.Field(default=None) + """ + Filter results by temporal values. + """ + + edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results with any of these edge types. Node search does not support this filter. + """ + + edge_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results with any of these edge UUIDs. Node search does not support this filter. + """ + + episode_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results derived from any of these episode UUIDs. + """ + + exclude_edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Exclude results with any of these edge types. Node search does not support this filter. + """ + + exclude_node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Exclude nodes that have any of these labels. On an edge list, the API + excludes an edge when its source node or its target node has one of + these labels. Edge search does not support this filter. + """ + + metadata_filters: typing.Optional["MetadataFilterGroup"] = pydantic.Field(default=None) + """ + Filter results by episode metadata. + """ + + node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include only nodes that have at least one of these labels. On an edge + list, the source node and the target node of each edge must each have + at least one of these labels. Edge search does not support this filter. + """ + + property_filters: typing.Optional[typing.List[PropertyFilter]] = pydantic.Field(default=None) + """ + Filter results by node or edge properties. + """ + + source_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges that start at any of these node UUIDs. Node search does not support this filter. + """ + + target_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges that end at any of these node UUIDs. Node search does not support this filter. + """ + + 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 + + +from .metadata_filter_group import MetadataFilterGroup # noqa: E402, I001 + +update_forward_refs(DocumentSummaryListFilters, MetadataFilterGroup=MetadataFilterGroup) diff --git a/src/zep_cloud/types/edge.py b/src/zep_cloud/types/edge.py index 6bf557c3..417fdd5d 100644 --- a/src/zep_cloud/types/edge.py +++ b/src/zep_cloud/types/edge.py @@ -111,6 +111,12 @@ class Edge(UniversalBaseModel): The unique identifier of the edge's target node. """ + user_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The unique identifier of the user that owns the graph. Present only when + the graph is a user graph. + """ + uuid_: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="uuid"), diff --git a/src/zep_cloud/types/edge_list_filters.py b/src/zep_cloud/types/edge_list_filters.py new file mode 100644 index 00000000..6196485c --- /dev/null +++ b/src/zep_cloud/types/edge_list_filters.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .date_filters import DateFilters +from .property_filter import PropertyFilter + + +class EdgeListFilters(UniversalBaseModel): + connected_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges connected to any of these node UUIDs. Node search does not support this filter. + """ + + 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. + """ + + date_filters: typing.Optional[DateFilters] = pydantic.Field(default=None) + """ + Filter results by temporal values. + """ + + edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results with any of these edge types. Node search does not support this filter. + """ + + edge_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results with any of these edge UUIDs. Node search does not support this filter. + """ + + episode_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results derived from any of these episode UUIDs. + """ + + exclude_edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Exclude results with any of these edge types. Node search does not support this filter. + """ + + exclude_node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Exclude nodes that have any of these labels. On an edge list, the API + excludes an edge when its source node or its target node has one of + these labels. Edge search does not support this filter. + """ + + metadata_filters: typing.Optional["MetadataFilterGroup"] = pydantic.Field(default=None) + """ + Filter results by episode metadata. + """ + + node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include only nodes that have at least one of these labels. On an edge + list, the source node and the target node of each edge must each have + at least one of these labels. Edge search does not support this filter. + """ + + property_filters: typing.Optional[typing.List[PropertyFilter]] = pydantic.Field(default=None) + """ + Filter results by node or edge properties. + """ + + source_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges that start at any of these node UUIDs. Node search does not support this filter. + """ + + target_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges that end at any of these node UUIDs. Node search does not support this filter. + """ + + 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 + + +from .metadata_filter_group import MetadataFilterGroup # noqa: E402, I001 + +update_forward_refs(EdgeListFilters, MetadataFilterGroup=MetadataFilterGroup) diff --git a/src/zep_cloud/types/episode.py b/src/zep_cloud/types/episode.py index 3fc32063..9845963e 100644 --- a/src/zep_cloud/types/episode.py +++ b/src/zep_cloud/types/episode.py @@ -97,6 +97,12 @@ class Episode(UniversalBaseModel): thread. """ + user_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The unique identifier of the user that owns the graph. Present only when + the graph is a user graph. + """ + uuid_: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="uuid"), diff --git a/src/zep_cloud/types/episode_list_filters.py b/src/zep_cloud/types/episode_list_filters.py new file mode 100644 index 00000000..b56e9bc4 --- /dev/null +++ b/src/zep_cloud/types/episode_list_filters.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs + + +class EpisodeListFilters(UniversalBaseModel): + content_policy_violated: typing.Optional[bool] = pydantic.Field(default=None) + """ + 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. + """ + + mentioned_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include only episodes that mention at least one of these nodes. At + most 256 node UUIDs. + """ + + metadata_filters: typing.Optional["MetadataFilterGroup"] = pydantic.Field(default=None) + """ + Include only episodes whose metadata matches this filter group. + """ + + 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 + + +from .metadata_filter_group import MetadataFilterGroup # noqa: E402, I001 + +update_forward_refs(EpisodeListFilters, MetadataFilterGroup=MetadataFilterGroup) diff --git a/src/zep_cloud/types/hyperedge.py b/src/zep_cloud/types/hyperedge.py index 781d817e..a4059fc9 100644 --- a/src/zep_cloud/types/hyperedge.py +++ b/src/zep_cloud/types/hyperedge.py @@ -42,6 +42,12 @@ class Hyperedge(UniversalBaseModel): The time at which the fact stopped being true. """ + user_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The unique identifier of the user that owns the graph. Present only when + the graph is a user graph. + """ + uuid_: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="uuid"), diff --git a/src/zep_cloud/types/hyperedge_list_filters.py b/src/zep_cloud/types/hyperedge_list_filters.py new file mode 100644 index 00000000..17b4c7fe --- /dev/null +++ b/src/zep_cloud/types/hyperedge_list_filters.py @@ -0,0 +1,35 @@ +# 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 HyperedgeListFilters(UniversalBaseModel): + edge_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include only hyperedges that have one of these member edges. At most + 256 edge UUIDs. + """ + + episode_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include only hyperedges that have a member edge from one of these + episodes. At most 256 episode UUIDs. + """ + + node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include only hyperedges that have a member edge connected to one of + these nodes. At most 256 node UUIDs. + """ + + 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/lookup_item.py b/src/zep_cloud/types/lookup_item.py index 8606ed81..1c409ec8 100644 --- a/src/zep_cloud/types/lookup_item.py +++ b/src/zep_cloud/types/lookup_item.py @@ -6,6 +6,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from ..core.serialization import FieldMetadata +from .lookup_item_resource_type import LookupItemResourceType class LookupItem(UniversalBaseModel): @@ -19,7 +20,7 @@ class LookupItem(UniversalBaseModel): The developer-assigned identifier that was looked up. """ - resource_type: typing.Optional[str] = pydantic.Field(default=None) + resource_type: typing.Optional[LookupItemResourceType] = pydantic.Field(default=None) """ The type of resource this entry resolves: user, thread, or graph. """ diff --git a/src/zep_cloud/types/lookup_item_resource_type.py b/src/zep_cloud/types/lookup_item_resource_type.py new file mode 100644 index 00000000..11666b29 --- /dev/null +++ b/src/zep_cloud/types/lookup_item_resource_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LookupItemResourceType = typing.Union[typing.Literal["user", "thread", "graph"], typing.Any] diff --git a/src/zep_cloud/types/node.py b/src/zep_cloud/types/node.py index f2dba08f..4f952259 100644 --- a/src/zep_cloud/types/node.py +++ b/src/zep_cloud/types/node.py @@ -73,6 +73,12 @@ class Node(UniversalBaseModel): A generated summary of the entity that the node represents. """ + user_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The unique identifier of the user that owns the graph. Present only when + the graph is a user graph. + """ + uuid_: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="uuid"), diff --git a/src/zep_cloud/types/node_list_filters.py b/src/zep_cloud/types/node_list_filters.py new file mode 100644 index 00000000..4008be25 --- /dev/null +++ b/src/zep_cloud/types/node_list_filters.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .date_filters import DateFilters +from .property_filter import PropertyFilter + + +class NodeListFilters(UniversalBaseModel): + connected_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges connected to any of these node UUIDs. Node search does not support this filter. + """ + + 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. + """ + + date_filters: typing.Optional[DateFilters] = pydantic.Field(default=None) + """ + Filter results by temporal values. + """ + + edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results with any of these edge types. Node search does not support this filter. + """ + + edge_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results with any of these edge UUIDs. Node search does not support this filter. + """ + + episode_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results derived from any of these episode UUIDs. + """ + + exclude_edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Exclude results with any of these edge types. Node search does not support this filter. + """ + + exclude_node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Exclude nodes that have any of these labels. On an edge list, the API + excludes an edge when its source node or its target node has one of + these labels. Edge search does not support this filter. + """ + + metadata_filters: typing.Optional["MetadataFilterGroup"] = pydantic.Field(default=None) + """ + Filter results by episode metadata. + """ + + node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include only nodes that have at least one of these labels. On an edge + list, the source node and the target node of each edge must each have + at least one of these labels. Edge search does not support this filter. + """ + + property_filters: typing.Optional[typing.List[PropertyFilter]] = pydantic.Field(default=None) + """ + Filter results by node or edge properties. + """ + + source_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges that start at any of these node UUIDs. Node search does not support this filter. + """ + + target_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges that end at any of these node UUIDs. Node search does not support this filter. + """ + + 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 + + +from .metadata_filter_group import MetadataFilterGroup # noqa: E402, I001 + +update_forward_refs(NodeListFilters, MetadataFilterGroup=MetadataFilterGroup) diff --git a/src/zep_cloud/types/observation.py b/src/zep_cloud/types/observation.py index 9ccd587a..cb5ee10b 100644 --- a/src/zep_cloud/types/observation.py +++ b/src/zep_cloud/types/observation.py @@ -57,6 +57,12 @@ class Observation(UniversalBaseModel): A generated summary of the observation. """ + user_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The unique identifier of the user that owns the graph. Present only when + the graph is a user graph. + """ + uuid_: typing_extensions.Annotated[ typing.Optional[str], FieldMetadata(alias="uuid"), diff --git a/src/zep_cloud/types/observation_list_filters.py b/src/zep_cloud/types/observation_list_filters.py new file mode 100644 index 00000000..150e0a78 --- /dev/null +++ b/src/zep_cloud/types/observation_list_filters.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .date_filters import DateFilters +from .property_filter import PropertyFilter + + +class ObservationListFilters(UniversalBaseModel): + connected_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges connected to any of these node UUIDs. Node search does not support this filter. + """ + + 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. + """ + + date_filters: typing.Optional[DateFilters] = pydantic.Field(default=None) + """ + Filter results by temporal values. + """ + + edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results with any of these edge types. Node search does not support this filter. + """ + + edge_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results with any of these edge UUIDs. Node search does not support this filter. + """ + + episode_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results derived from any of these episode UUIDs. + """ + + exclude_edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Exclude results with any of these edge types. Node search does not support this filter. + """ + + exclude_node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Exclude nodes that have any of these labels. On an edge list, the API + excludes an edge when its source node or its target node has one of + these labels. Edge search does not support this filter. + """ + + metadata_filters: typing.Optional["MetadataFilterGroup"] = pydantic.Field(default=None) + """ + Filter results by episode metadata. + """ + + node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include only nodes that have at least one of these labels. On an edge + list, the source node and the target node of each edge must each have + at least one of these labels. Edge search does not support this filter. + """ + + property_filters: typing.Optional[typing.List[PropertyFilter]] = pydantic.Field(default=None) + """ + Filter results by node or edge properties. + """ + + source_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges that start at any of these node UUIDs. Node search does not support this filter. + """ + + target_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges that end at any of these node UUIDs. Node search does not support this filter. + """ + + 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 + + +from .metadata_filter_group import MetadataFilterGroup # noqa: E402, I001 + +update_forward_refs(ObservationListFilters, MetadataFilterGroup=MetadataFilterGroup) diff --git a/src/zep_cloud/types/search_filters.py b/src/zep_cloud/types/search_filters.py index 98ae5dab..dc785dc0 100644 --- a/src/zep_cloud/types/search_filters.py +++ b/src/zep_cloud/types/search_filters.py @@ -48,7 +48,9 @@ class SearchFilters(UniversalBaseModel): exclude_node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ - Exclude results with any of these node labels. Edge search does not support this filter. + Exclude nodes that have any of these labels. On an edge list, the API + excludes an edge when its source node or its target node has one of + these labels. Edge search does not support this filter. """ metadata_filters: typing.Optional["MetadataFilterGroup"] = pydantic.Field(default=None) @@ -58,7 +60,9 @@ class SearchFilters(UniversalBaseModel): node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) """ - Include results with any of these node labels. Edge search does not support this filter. + Include only nodes that have at least one of these labels. On an edge + list, the source node and the target node of each edge must each have + at least one of these labels. Edge search does not support this filter. """ property_filters: typing.Optional[typing.List[PropertyFilter]] = pydantic.Field(default=None) diff --git a/src/zep_cloud/types/search_request.py b/src/zep_cloud/types/search_request.py deleted file mode 100644 index 63831da7..00000000 --- a/src/zep_cloud/types/search_request.py +++ /dev/null @@ -1,56 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from __future__ import annotations - -import typing - -import pydantic -from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs -from .search_filters import SearchFilters -from .search_request_reranker import SearchRequestReranker - - -class SearchRequest(UniversalBaseModel): - bfs_origin_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) - """ - Nodes used as BFS origins for graph-distance-aware retrieval. - """ - - center_node_uuid: typing.Optional[str] = pydantic.Field(default=None) - """ - The node to rank results by distance from. Required when reranker is - node_distance. - """ - - filters: typing.Optional[SearchFilters] = pydantic.Field(default=None) - """ - Filters constraining which items are returned. - """ - - mmr_lambda: typing.Optional[float] = pydantic.Field(default=None) - """ - The diversity weighting used for maximal marginal relevance reranking. - Required when reranker is mmr. - """ - - query: str = pydantic.Field() - """ - The search query. - """ - - reranker: typing.Optional[SearchRequestReranker] = pydantic.Field(default=None) - """ - The reranking strategy applied to retrieved results. Defaults to rrf. - """ - - 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 - - -update_forward_refs(SearchRequest) diff --git a/src/zep_cloud/types/skill_definition.py b/src/zep_cloud/types/skill_definition.py index 7fbfbfad..91d9cfd6 100644 --- a/src/zep_cloud/types/skill_definition.py +++ b/src/zep_cloud/types/skill_definition.py @@ -6,6 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from .skill_definition_section import SkillDefinitionSection from .skill_failure import SkillFailure +from .skill_kind import SkillKind from .skill_procedure_step import SkillProcedureStep from .skill_relation import SkillRelation from .skill_resource import SkillResource @@ -19,7 +20,7 @@ class SkillDefinition(UniversalBaseModel): done_when: typing.Optional[typing.List[str]] = None environments: typing.Optional[typing.List[SkillResource]] = None failures: typing.Optional[typing.List[SkillFailure]] = None - kind: typing.Optional[str] = None + kind: typing.Optional[SkillKind] = None name: typing.Optional[str] = None outputs: typing.Optional[typing.List[str]] = None package_name: typing.Optional[str] = None diff --git a/src/zep_cloud/types/skill_kind.py b/src/zep_cloud/types/skill_kind.py new file mode 100644 index 00000000..f5679833 --- /dev/null +++ b/src/zep_cloud/types/skill_kind.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +SkillKind = typing.Union[ + typing.Literal["principle", "procedure", "workflow", "failure_mode", "recovery", "constraint"], typing.Any +] diff --git a/src/zep_cloud/types/task.py b/src/zep_cloud/types/task.py index e0ee102d..9b44a012 100644 --- a/src/zep_cloud/types/task.py +++ b/src/zep_cloud/types/task.py @@ -8,6 +8,8 @@ from ..core.serialization import FieldMetadata from .error_body import ErrorBody from .task_progress import TaskProgress +from .task_result import TaskResult +from .task_status import TaskStatus class Task(UniversalBaseModel): @@ -35,7 +37,7 @@ class Task(UniversalBaseModel): final stage. """ - result: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None) + result: typing.Optional[TaskResult] = pydantic.Field(default=None) """ Operation-specific output populated once the task reaches succeeded or partial, such as identifiers the operation could not return synchronously. @@ -46,7 +48,7 @@ class Task(UniversalBaseModel): The time a worker began processing the task; absent until then. """ - status: typing.Optional[str] = pydantic.Field(default=None) + status: typing.Optional[TaskStatus] = pydantic.Field(default=None) """ The task's current state: pending, processing, succeeded, partial, or failed. diff --git a/src/zep_cloud/types/task_result.py b/src/zep_cloud/types/task_result.py new file mode 100644 index 00000000..fece02d2 --- /dev/null +++ b/src/zep_cloud/types/task_result.py @@ -0,0 +1,65 @@ +# 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 .task_result_content_policy import TaskResultContentPolicy +from .task_result_edge import TaskResultEdge +from .task_result_episode import TaskResultEpisode + + +class TaskResult(UniversalBaseModel): + content_policy: typing.Optional[TaskResultContentPolicy] = pydantic.Field(default=None) + """ + The content policy outcome of the task. + """ + + edge_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The UUID of the edge that the task wrote. + """ + + edges: typing.Optional[typing.List[TaskResultEdge]] = pydantic.Field(default=None) + """ + The edges that the task wrote. + """ + + episode_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The UUID of the episode that the task added. + """ + + episodes: typing.Optional[typing.List[TaskResultEpisode]] = pydantic.Field(default=None) + """ + The content policy outcome of each message that the task added. + """ + + hyperedge_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The UUID of the hyperedge that the task created. + """ + + skill_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The UUID of the skill that the task imported. + """ + + source_node_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The UUID of the source node of the edge that the task wrote. + """ + + target_node_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The UUID of the target node of the edge that the task wrote. + """ + + 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_content_policy.py b/src/zep_cloud/types/task_result_content_policy.py new file mode 100644 index 00000000..27b746b2 --- /dev/null +++ b/src/zep_cloud/types/task_result_content_policy.py @@ -0,0 +1,61 @@ +# 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 .task_result_content_policy_status import TaskResultContentPolicyStatus + + +class TaskResultContentPolicy(UniversalBaseModel): + category_keys: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + The keys of the categories with a matched rule. + """ + + dropped_count: typing.Optional[int] = pydantic.Field(default=None) + """ + The number of derived candidates of the episode that were dropped. + """ + + failed_count: typing.Optional[int] = pydantic.Field(default=None) + """ + The number of episodes in the batch whose evaluation failed. + """ + + retained_count: typing.Optional[int] = pydantic.Field(default=None) + """ + The number of derived candidates of the episode that were published to + the graph. + """ + + revision: typing.Optional[int] = pydantic.Field(default=None) + """ + The project revision number of the policy that the graph bound. + """ + + status: typing.Optional[TaskResultContentPolicyStatus] = pydantic.Field(default=None) + """ + The evaluation status of the episode. pending means the evaluation has + not finished, complete means every candidate was evaluated, and failed + means ingestion retries were exhausted. + """ + + violated: typing.Optional[bool] = pydantic.Field(default=None) + """ + Whether at least one derived candidate of the episode matched a rule. + """ + + violated_count: typing.Optional[int] = pydantic.Field(default=None) + """ + The number of episodes in the batch that a content policy flagged. + """ + + 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_content_policy_status.py b/src/zep_cloud/types/task_result_content_policy_status.py new file mode 100644 index 00000000..6ddc1a6e --- /dev/null +++ b/src/zep_cloud/types/task_result_content_policy_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TaskResultContentPolicyStatus = typing.Union[typing.Literal["pending", "complete", "failed"], typing.Any] diff --git a/src/zep_cloud/types/task_result_edge.py b/src/zep_cloud/types/task_result_edge.py new file mode 100644 index 00000000..79dcbe73 --- /dev/null +++ b/src/zep_cloud/types/task_result_edge.py @@ -0,0 +1,32 @@ +# 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 TaskResultEdge(UniversalBaseModel): + edge_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The UUID of the edge. + """ + + source_node_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The UUID of the source node of the edge. + """ + + target_node_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The UUID of the target node of the edge. + """ + + 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_episode.py b/src/zep_cloud/types/task_result_episode.py new file mode 100644 index 00000000..b9feb197 --- /dev/null +++ b/src/zep_cloud/types/task_result_episode.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 .task_result_content_policy import TaskResultContentPolicy + + +class TaskResultEpisode(UniversalBaseModel): + content_policy: typing.Optional[TaskResultContentPolicy] = pydantic.Field(default=None) + """ + The content policy state of the episode. + """ + + episode_uuid: typing.Optional[str] = pydantic.Field(default=None) + """ + The UUID of the episode of the message. + """ + + 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_status.py b/src/zep_cloud/types/task_status.py new file mode 100644 index 00000000..3366d413 --- /dev/null +++ b/src/zep_cloud/types/task_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TaskStatus = typing.Union[typing.Literal["pending", "processing", "succeeded", "partial", "failed"], typing.Any] diff --git a/src/zep_cloud/types/thread_summary_list_filters.py b/src/zep_cloud/types/thread_summary_list_filters.py new file mode 100644 index 00000000..18a4aa4c --- /dev/null +++ b/src/zep_cloud/types/thread_summary_list_filters.py @@ -0,0 +1,95 @@ +# This file was auto-generated by Fern from our API Definition. + +from __future__ import annotations + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs +from .date_filters import DateFilters +from .property_filter import PropertyFilter + + +class ThreadSummaryListFilters(UniversalBaseModel): + connected_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges connected to any of these node UUIDs. Node search does not support this filter. + """ + + 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. + """ + + date_filters: typing.Optional[DateFilters] = pydantic.Field(default=None) + """ + Filter results by temporal values. + """ + + edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results with any of these edge types. Node search does not support this filter. + """ + + edge_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results with any of these edge UUIDs. Node search does not support this filter. + """ + + episode_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include results derived from any of these episode UUIDs. + """ + + exclude_edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Exclude results with any of these edge types. Node search does not support this filter. + """ + + exclude_node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Exclude nodes that have any of these labels. On an edge list, the API + excludes an edge when its source node or its target node has one of + these labels. Edge search does not support this filter. + """ + + metadata_filters: typing.Optional["MetadataFilterGroup"] = pydantic.Field(default=None) + """ + Filter results by episode metadata. + """ + + node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include only nodes that have at least one of these labels. On an edge + list, the source node and the target node of each edge must each have + at least one of these labels. Edge search does not support this filter. + """ + + property_filters: typing.Optional[typing.List[PropertyFilter]] = pydantic.Field(default=None) + """ + Filter results by node or edge properties. + """ + + source_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges that start at any of these node UUIDs. Node search does not support this filter. + """ + + target_node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Include edges that end at any of these node UUIDs. Node search does not support this filter. + """ + + 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 + + +from .metadata_filter_group import MetadataFilterGroup # noqa: E402, I001 + +update_forward_refs(ThreadSummaryListFilters, MetadataFilterGroup=MetadataFilterGroup) diff --git a/src/zep_cloud/types/trace_import.py b/src/zep_cloud/types/trace_import.py index bbb34d61..4ee8a442 100644 --- a/src/zep_cloud/types/trace_import.py +++ b/src/zep_cloud/types/trace_import.py @@ -6,6 +6,7 @@ import typing_extensions from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel from ..core.serialization import FieldMetadata +from .trace_import_on_source_change import TraceImportOnSourceChange from .trace_import_pause_reason import TraceImportPauseReason from .trace_import_provider import TraceImportProvider from .trace_import_run_reference import TraceImportRunReference @@ -60,7 +61,7 @@ class TraceImport(UniversalBaseModel): NextRunAt is the next scheduled run time. """ - on_source_change: typing.Optional[str] = pydantic.Field(default=None) + on_source_change: typing.Optional[TraceImportOnSourceChange] = pydantic.Field(default=None) """ OnSourceChange defines how changed source traces are handled. """ @@ -97,7 +98,7 @@ class TraceImport(UniversalBaseModel): schedule: typing.Optional[TraceImportSchedule] = pydantic.Field(default=None) """ - Schedule contains recurring import settings, when enabled. Example: {"interval_hours":4,"start_from":"24h","settle_minutes":5,"max_open_hours":24}. + Schedule contains recurring import settings, when enabled. Example: {"interval_hours":4,"start_from":"now","settle_minutes":5,"max_open_hours":24}. """ selection: typing.Optional[TraceImportSelection] = pydantic.Field(default=None) diff --git a/src/zep_cloud/types/trace_import_create_result.py b/src/zep_cloud/types/trace_import_create_result.py new file mode 100644 index 00000000..4f00a106 --- /dev/null +++ b/src/zep_cloud/types/trace_import_create_result.py @@ -0,0 +1,44 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ..core.serialization import FieldMetadata +from .task import Task +from .trace_import import TraceImport +from .trace_import_run import TraceImportRun + + +class TraceImportCreateResult(UniversalBaseModel): + import_: typing_extensions.Annotated[ + typing.Optional[TraceImport], + FieldMetadata(alias="import"), + pydantic.Field( + alias="import", + description='Import is the created import resource. Example: {"uuid":"332c28e1-e6a7-4bca-97b2-ef1ec82c65fa"}.', + ), + ] = None + """ + Import is the created import resource. Example: {"uuid":"332c28e1-e6a7-4bca-97b2-ef1ec82c65fa"}. + """ + + run: typing.Optional[TraceImportRun] = pydantic.Field(default=None) + """ + Run is the pending one-time run. The field is absent for a scheduled import. Example: {"uuid":"ea7e2724-9bfd-4ca1-aa5c-40a1dd72a688","status":"pending"}. + """ + + task: typing.Optional[Task] = pydantic.Field(default=None) + """ + Task is the pending Task that will process the run. The field is absent for a scheduled import. Example: {"uuid":"3124c01a-8f49-4bfd-9758-6ce491a377c1","status":"pending"}. + """ + + 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/trace_import_on_source_change.py b/src/zep_cloud/types/trace_import_on_source_change.py new file mode 100644 index 00000000..7a78e639 --- /dev/null +++ b/src/zep_cloud/types/trace_import_on_source_change.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +TraceImportOnSourceChange = typing.Union[typing.Literal["ignore", "replace"], typing.Any] diff --git a/src/zep_cloud/types/trace_import_schedule.py b/src/zep_cloud/types/trace_import_schedule.py index 00c990ce..38975b17 100644 --- a/src/zep_cloud/types/trace_import_schedule.py +++ b/src/zep_cloud/types/trace_import_schedule.py @@ -7,24 +7,26 @@ class TraceImportSchedule(UniversalBaseModel): - interval_hours: typing.Optional[int] = pydantic.Field(default=None) + interval_hours: int = pydantic.Field() """ IntervalHours is the scheduled run interval. """ max_open_hours: typing.Optional[int] = pydantic.Field(default=None) """ - MaxOpenHours is the maximum wait for an open trace. + MaxOpenHours is the maximum wait for an open trace. The value must be 1 to 168 hours. The default is 24 hours. """ settle_minutes: typing.Optional[int] = pydantic.Field(default=None) """ - SettleMinutes is the wait time for trace updates. + SettleMinutes is the wait time for trace updates. The value must be 0 to 1,440 minutes. The default is 60 minutes. """ - start_from: typing.Optional[str] = pydantic.Field(default=None) + start_from: str = pydantic.Field() """ - StartFrom selects the initial history window. + StartFrom is the earliest trace start time that scheduled runs import. + The value is "now", which is the time when the import was created, or an + RFC 3339 timestamp. """ if IS_PYDANTIC_V2: diff --git a/src/zep_cloud/types/user.py b/src/zep_cloud/types/user.py index a6fada65..f0cb4246 100644 --- a/src/zep_cloud/types/user.py +++ b/src/zep_cloud/types/user.py @@ -53,7 +53,12 @@ class User(UniversalBaseModel): user_id: typing.Optional[str] = pydantic.Field(default=None) """ - The developer-assigned identifier of the user. + An optional external identity identifier, such as an identity-provider + subject claim. Zep uses it to match an identity-provider sign-in to this + user. It is not an address; use uuid to address the user in v4. It is + unique within the project, can contain at most 500 characters, and + cannot be changed after creation. v4 sets it on create; v3 users keep + their existing value. """ uuid_: typing_extensions.Annotated[ diff --git a/src/zep_cloud/user/client.py b/src/zep_cloud/user/client.py index 3219075e..aa09e611 100644 --- a/src/zep_cloud/user/client.py +++ b/src/zep_cloud/user/client.py @@ -45,6 +45,7 @@ def create( last_name: typing.Optional[str] = OMIT, metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, time_zone: typing.Optional[str] = OMIT, + user_id: typing.Optional[str] = OMIT, idempotency_key: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> User: @@ -74,6 +75,13 @@ def create( time_zone : typing.Optional[str] The user's IANA time zone. + user_id : typing.Optional[str] + An optional external identity identifier, such as an identity-provider + subject claim. Zep uses it to match an identity-provider sign-in to this + user. It is not an address; use uuid to address the user in v4. It is + unique within the project, can contain at most 500 characters, and + cannot be changed after creation. + idempotency_key : typing.Optional[str] request_options : typing.Optional[RequestOptions] @@ -101,6 +109,7 @@ def create( last_name=last_name, metadata=metadata, time_zone=time_zone, + user_id=user_id, idempotency_key=idempotency_key, request_options=request_options, ) @@ -109,7 +118,7 @@ def create( def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[UserListRequestOrderBy] = None, order: typing.Optional[UserListRequestOrder] = None, @@ -119,8 +128,8 @@ def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -157,7 +166,12 @@ def list( yield page """ return self._raw_client.list( - limit=limit, cursor=cursor, order_by=order_by, order=order, search=search, request_options=request_options + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + search=search, + request_options=request_options, ) def lookup( @@ -481,6 +495,7 @@ async def create( last_name: typing.Optional[str] = OMIT, metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, time_zone: typing.Optional[str] = OMIT, + user_id: typing.Optional[str] = OMIT, idempotency_key: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> User: @@ -510,6 +525,13 @@ async def create( time_zone : typing.Optional[str] The user's IANA time zone. + user_id : typing.Optional[str] + An optional external identity identifier, such as an identity-provider + subject claim. Zep uses it to match an identity-provider sign-in to this + user. It is not an address; use uuid to address the user in v4. It is + unique within the project, can contain at most 500 characters, and + cannot be changed after creation. + idempotency_key : typing.Optional[str] request_options : typing.Optional[RequestOptions] @@ -545,6 +567,7 @@ async def main() -> None: last_name=last_name, metadata=metadata, time_zone=time_zone, + user_id=user_id, idempotency_key=idempotency_key, request_options=request_options, ) @@ -553,7 +576,7 @@ async def main() -> None: async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[UserListRequestOrderBy] = None, order: typing.Optional[UserListRequestOrder] = None, @@ -563,8 +586,8 @@ async def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -610,7 +633,12 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - limit=limit, cursor=cursor, order_by=order_by, order=order, search=search, request_options=request_options + page_size=page_size, + cursor=cursor, + order_by=order_by, + order=order, + search=search, + request_options=request_options, ) async def lookup( diff --git a/src/zep_cloud/user/raw_client.py b/src/zep_cloud/user/raw_client.py index 24fa0b94..732bc7b4 100644 --- a/src/zep_cloud/user/raw_client.py +++ b/src/zep_cloud/user/raw_client.py @@ -48,6 +48,7 @@ def create( last_name: typing.Optional[str] = OMIT, metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, time_zone: typing.Optional[str] = OMIT, + user_id: typing.Optional[str] = OMIT, idempotency_key: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[User]: @@ -77,6 +78,13 @@ def create( time_zone : typing.Optional[str] The user's IANA time zone. + user_id : typing.Optional[str] + An optional external identity identifier, such as an identity-provider + subject claim. Zep uses it to match an identity-provider sign-in to this + user. It is not an address; use uuid to address the user in v4. It is + unique within the project, can contain at most 500 characters, and + cannot be changed after creation. + idempotency_key : typing.Optional[str] request_options : typing.Optional[RequestOptions] @@ -100,6 +108,7 @@ def create( "last_name": last_name, "metadata": metadata, "time_zone": time_zone, + "user_id": user_id, }, headers={ "content-type": "application/json", @@ -178,7 +187,7 @@ def create( def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[UserListRequestOrderBy] = None, order: typing.Optional[UserListRequestOrder] = None, @@ -188,8 +197,8 @@ def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -215,7 +224,7 @@ def list( "users/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -243,7 +252,7 @@ def list( _parsed_next = _parsed_response.next_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, @@ -1003,6 +1012,7 @@ async def create( last_name: typing.Optional[str] = OMIT, metadata: typing.Optional[typing.Dict[str, typing.Any]] = OMIT, time_zone: typing.Optional[str] = OMIT, + user_id: typing.Optional[str] = OMIT, idempotency_key: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[User]: @@ -1032,6 +1042,13 @@ async def create( time_zone : typing.Optional[str] The user's IANA time zone. + user_id : typing.Optional[str] + An optional external identity identifier, such as an identity-provider + subject claim. Zep uses it to match an identity-provider sign-in to this + user. It is not an address; use uuid to address the user in v4. It is + unique within the project, can contain at most 500 characters, and + cannot be changed after creation. + idempotency_key : typing.Optional[str] request_options : typing.Optional[RequestOptions] @@ -1055,6 +1072,7 @@ async def create( "last_name": last_name, "metadata": metadata, "time_zone": time_zone, + "user_id": user_id, }, headers={ "content-type": "application/json", @@ -1133,7 +1151,7 @@ async def create( async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, order_by: typing.Optional[UserListRequestOrderBy] = None, order: typing.Optional[UserListRequestOrder] = None, @@ -1143,8 +1161,8 @@ async def list( """ Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -1170,7 +1188,7 @@ async def list( "users/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, "order_by": order_by, "order": order, @@ -1200,7 +1218,7 @@ async def list( async def _get_next(): return await self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, order_by=order_by, order=order, diff --git a/src/zep_cloud/user_group/client.py b/src/zep_cloud/user_group/client.py index ada8383c..b67ac1e7 100644 --- a/src/zep_cloud/user_group/client.py +++ b/src/zep_cloud/user_group/client.py @@ -79,7 +79,7 @@ def create( def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -89,8 +89,8 @@ def list( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -120,7 +120,7 @@ def list( for page in response.iter_pages(): yield page """ - return self._raw_client.list(limit=limit, cursor=cursor, search=search, request_options=request_options) + return self._raw_client.list(page_size=page_size, cursor=cursor, search=search, request_options=request_options) def get(self, group_uuid: str, *, request_options: typing.Optional[RequestOptions] = None) -> UserGroup: """ @@ -255,7 +255,7 @@ def list_member_candidates( self, group_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -268,8 +268,8 @@ def list_member_candidates( group_uuid : str User group UUID - limit : typing.Optional[int] - Page size + 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 @@ -302,7 +302,7 @@ def list_member_candidates( yield page """ return self._raw_client.list_member_candidates( - group_uuid, limit=limit, cursor=cursor, search=search, request_options=request_options + group_uuid, page_size=page_size, cursor=cursor, search=search, request_options=request_options ) def add_members( @@ -355,7 +355,7 @@ def list_members( self, group_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -368,8 +368,8 @@ def list_members( group_uuid : str User group UUID - limit : typing.Optional[int] - Page size + 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 @@ -402,7 +402,7 @@ def list_members( yield page """ return self._raw_client.list_members( - group_uuid, limit=limit, cursor=cursor, search=search, request_options=request_options + group_uuid, page_size=page_size, cursor=cursor, search=search, request_options=request_options ) def remove_members( @@ -500,7 +500,7 @@ def list_for_user( self, user_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[UserGroup, UserGroupPage]: @@ -512,8 +512,8 @@ def list_for_user( user_uuid : str User UUID - limit : typing.Optional[int] - Page size + 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 @@ -542,7 +542,9 @@ def list_for_user( for page in response.iter_pages(): yield page """ - return self._raw_client.list_for_user(user_uuid, limit=limit, cursor=cursor, request_options=request_options) + return self._raw_client.list_for_user( + user_uuid, page_size=page_size, cursor=cursor, request_options=request_options + ) class AsyncUserGroupClient: @@ -616,7 +618,7 @@ async def main() -> None: async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -626,8 +628,8 @@ async def list( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -666,7 +668,9 @@ async def main() -> None: asyncio.run(main()) """ - return await self._raw_client.list(limit=limit, cursor=cursor, search=search, request_options=request_options) + return await self._raw_client.list( + page_size=page_size, cursor=cursor, search=search, request_options=request_options + ) async def get(self, group_uuid: str, *, request_options: typing.Optional[RequestOptions] = None) -> UserGroup: """ @@ -825,7 +829,7 @@ async def list_member_candidates( self, group_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -838,8 +842,8 @@ async def list_member_candidates( group_uuid : str User group UUID - limit : typing.Optional[int] - Page size + 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 @@ -881,7 +885,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_member_candidates( - group_uuid, limit=limit, cursor=cursor, search=search, request_options=request_options + group_uuid, page_size=page_size, cursor=cursor, search=search, request_options=request_options ) async def add_members( @@ -942,7 +946,7 @@ async def list_members( self, group_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -955,8 +959,8 @@ async def list_members( group_uuid : str User group UUID - limit : typing.Optional[int] - Page size + 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 @@ -998,7 +1002,7 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_members( - group_uuid, limit=limit, cursor=cursor, search=search, request_options=request_options + group_uuid, page_size=page_size, cursor=cursor, search=search, request_options=request_options ) async def remove_members( @@ -1112,7 +1116,7 @@ async def list_for_user( self, user_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[UserGroup, UserGroupPage]: @@ -1124,8 +1128,8 @@ async def list_for_user( user_uuid : str User UUID - limit : typing.Optional[int] - Page size + 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 @@ -1164,5 +1168,5 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list_for_user( - user_uuid, limit=limit, cursor=cursor, request_options=request_options + user_uuid, page_size=page_size, cursor=cursor, request_options=request_options ) diff --git a/src/zep_cloud/user_group/raw_client.py b/src/zep_cloud/user_group/raw_client.py index d96c5c47..ddd2d6c7 100644 --- a/src/zep_cloud/user_group/raw_client.py +++ b/src/zep_cloud/user_group/raw_client.py @@ -157,7 +157,7 @@ def create( def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -167,8 +167,8 @@ def list( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -188,7 +188,7 @@ def list( "user-groups/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -214,7 +214,7 @@ def list( _parsed_next = _parsed_response.next_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, search=search, request_options=request_options, @@ -605,7 +605,7 @@ def list_member_candidates( self, group_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -618,8 +618,8 @@ def list_member_candidates( group_uuid : str User group UUID - limit : typing.Optional[int] - Page size + 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 @@ -639,7 +639,7 @@ def list_member_candidates( f"user-groups/{encode_path_param(group_uuid)}/member-candidates/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -666,7 +666,7 @@ def list_member_candidates( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list_member_candidates( group_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, search=search, request_options=request_options, @@ -864,7 +864,7 @@ def list_members( self, group_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -877,8 +877,8 @@ def list_members( group_uuid : str User group UUID - limit : typing.Optional[int] - Page size + 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 @@ -898,7 +898,7 @@ def list_members( f"user-groups/{encode_path_param(group_uuid)}/members/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -925,7 +925,7 @@ def list_members( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list_members( group_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, search=search, request_options=request_options, @@ -1219,7 +1219,7 @@ def list_for_user( self, user_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> SyncPager[UserGroup, UserGroupPage]: @@ -1231,8 +1231,8 @@ def list_for_user( user_uuid : str User UUID - limit : typing.Optional[int] - Page size + 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 @@ -1249,7 +1249,7 @@ def list_for_user( f"users/{encode_path_param(user_uuid)}/user-groups", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -1268,7 +1268,7 @@ def list_for_user( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list_for_user( user_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, ) @@ -1470,7 +1470,7 @@ async def create( async def list( self, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -1480,8 +1480,8 @@ async def list( Parameters ---------- - limit : typing.Optional[int] - Page size + 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 @@ -1501,7 +1501,7 @@ async def list( "user-groups/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -1529,7 +1529,7 @@ async def list( async def _get_next(): return await self.list( - limit=limit, + page_size=page_size, cursor=_parsed_next, search=search, request_options=request_options, @@ -1921,7 +1921,7 @@ async def list_member_candidates( self, group_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -1934,8 +1934,8 @@ async def list_member_candidates( group_uuid : str User group UUID - limit : typing.Optional[int] - Page size + 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 @@ -1955,7 +1955,7 @@ async def list_member_candidates( f"user-groups/{encode_path_param(group_uuid)}/member-candidates/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -1984,7 +1984,7 @@ async def list_member_candidates( async def _get_next(): return await self.list_member_candidates( group_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, search=search, request_options=request_options, @@ -2183,7 +2183,7 @@ async def list_members( self, group_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, search: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, @@ -2196,8 +2196,8 @@ async def list_members( group_uuid : str User group UUID - limit : typing.Optional[int] - Page size + 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 @@ -2217,7 +2217,7 @@ async def list_members( f"user-groups/{encode_path_param(group_uuid)}/members/list", method="POST", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, json={ @@ -2246,7 +2246,7 @@ async def list_members( async def _get_next(): return await self.list_members( group_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, search=search, request_options=request_options, @@ -2541,7 +2541,7 @@ async def list_for_user( self, user_uuid: str, *, - limit: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncPager[UserGroup, UserGroupPage]: @@ -2553,8 +2553,8 @@ async def list_for_user( user_uuid : str User UUID - limit : typing.Optional[int] - Page size + 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 @@ -2571,7 +2571,7 @@ async def list_for_user( f"users/{encode_path_param(user_uuid)}/user-groups", method="GET", params={ - "limit": limit, + "page_size": page_size, "cursor": cursor, }, request_options=request_options, @@ -2592,7 +2592,7 @@ async def list_for_user( async def _get_next(): return await self.list_for_user( user_uuid, - limit=limit, + page_size=page_size, cursor=_parsed_next, request_options=request_options, )