diff --git a/pyproject.toml b/pyproject.toml
index aec9958..316bf16 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "zep-cloud"
[tool.poetry]
name = "zep-cloud"
-version = "3.17.0"
+version = "3.18.0"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 2395296..94c80bf 100644
--- a/reference.md
+++ b/reference.md
@@ -1507,6 +1507,8 @@ client.graph.list_all(
Detects structural patterns in a knowledge graph including relationship frequencies,
multi-hop paths, co-occurrences, hubs, and clusters.
+When a query is provided, uses hybrid search to discover seed nodes,
+detects triple-frequency patterns, and returns resolved edges ranked by relevance.
@@ -1545,7 +1547,7 @@ client.graph.detect_patterns()
**detect:** `typing.Optional[DetectConfig]`
Which pattern types to detect with type-specific configuration.
-Omit to detect all types with defaults.
+Omit to detect all types with defaults. Ignored when query is set.
@@ -1553,7 +1555,7 @@ Omit to detect all types with defaults.
-
-**graph_id:** `typing.Optional[str]` — Graph ID when detecting patterns on a named graph
+**edge_limit:** `typing.Optional[int]` — Max resolved edges per pattern. Default: 10, Max: 100. Only used with query.
@@ -1561,7 +1563,7 @@ Omit to detect all types with defaults.
-
-**include_examples:** `typing.Optional[bool]` — Include example node/edge UUIDs per pattern. Default: false
+**graph_id:** `typing.Optional[str]` — Graph ID when detecting patterns on a named graph
@@ -1585,6 +1587,26 @@ Omit to detect all types with defaults.
-
+**query:** `typing.Optional[str]`
+
+Search query for discovering seed nodes via hybrid search.
+When set, forces triple-frequency detection only and enables edge resolution
+with cross-encoder reranking. Mutually exclusive with seeds.
+
+
+
+
+
+-
+
+**query_limit:** `typing.Optional[int]` — Max seed nodes from search. Default: 10, Max: 50. Only used with query.
+
+
+
+
+
+-
+
**recency_weight:** `typing.Optional[RecencyWeight]`
Exponential half-life decay applied to edge created_at timestamps.
@@ -1607,7 +1629,7 @@ Reuses the same filter format as /graph/search.
-
-**seeds:** `typing.Optional[PatternSeeds]` — Seed selection. If omitted, analyzes the entire graph.
+**seeds:** `typing.Optional[PatternSeeds]` — Seed selection. If omitted, analyzes the entire graph. Mutually exclusive with query.
diff --git a/src/zep_cloud/__init__.py b/src/zep_cloud/__init__.py
index 8492efa..4f8ffb7 100644
--- a/src/zep_cloud/__init__.py
+++ b/src/zep_cloud/__init__.py
@@ -43,7 +43,6 @@
Message,
MessageListResponse,
PathDetectConfig,
- PatternExample,
PatternMetadata,
PatternResult,
PatternSeeds,
@@ -118,7 +117,6 @@
"MessageListResponse",
"NotFoundError",
"PathDetectConfig",
- "PatternExample",
"PatternMetadata",
"PatternResult",
"PatternSeeds",
diff --git a/src/zep_cloud/core/client_wrapper.py b/src/zep_cloud/core/client_wrapper.py
index ecd1bf6..0a08cd2 100644
--- a/src/zep_cloud/core/client_wrapper.py
+++ b/src/zep_cloud/core/client_wrapper.py
@@ -22,10 +22,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "zep-cloud/3.17.0",
+ "User-Agent": "zep-cloud/3.18.0",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "zep-cloud",
- "X-Fern-SDK-Version": "3.17.0",
+ "X-Fern-SDK-Version": "3.18.0",
**(self.get_custom_headers() or {}),
}
headers["Authorization"] = f"Api-Key {self.api_key}"
diff --git a/src/zep_cloud/graph/client.py b/src/zep_cloud/graph/client.py
index 0236f63..f686275 100644
--- a/src/zep_cloud/graph/client.py
+++ b/src/zep_cloud/graph/client.py
@@ -682,10 +682,12 @@ def detect_patterns(
self,
*,
detect: typing.Optional[DetectConfig] = OMIT,
+ edge_limit: typing.Optional[int] = OMIT,
graph_id: typing.Optional[str] = OMIT,
- include_examples: typing.Optional[bool] = OMIT,
limit: typing.Optional[int] = OMIT,
min_occurrences: typing.Optional[int] = OMIT,
+ query: typing.Optional[str] = OMIT,
+ query_limit: typing.Optional[int] = OMIT,
recency_weight: typing.Optional[RecencyWeight] = OMIT,
search_filters: typing.Optional[SearchFilters] = OMIT,
seeds: typing.Optional[PatternSeeds] = OMIT,
@@ -695,25 +697,35 @@ def detect_patterns(
"""
Detects structural patterns in a knowledge graph including relationship frequencies,
multi-hop paths, co-occurrences, hubs, and clusters.
+ When a query is provided, uses hybrid search to discover seed nodes,
+ detects triple-frequency patterns, and returns resolved edges ranked by relevance.
Parameters
----------
detect : typing.Optional[DetectConfig]
Which pattern types to detect with type-specific configuration.
- Omit to detect all types with defaults.
+ Omit to detect all types with defaults. Ignored when query is set.
+
+ edge_limit : typing.Optional[int]
+ Max resolved edges per pattern. Default: 10, Max: 100. Only used with query.
graph_id : typing.Optional[str]
Graph ID when detecting patterns on a named graph
- include_examples : typing.Optional[bool]
- Include example node/edge UUIDs per pattern. Default: false
-
limit : typing.Optional[int]
Max patterns to return. Default: 50, Max: 200
min_occurrences : typing.Optional[int]
Minimum occurrence count to report a pattern. Default: 2
+ query : typing.Optional[str]
+ Search query for discovering seed nodes via hybrid search.
+ When set, forces triple-frequency detection only and enables edge resolution
+ with cross-encoder reranking. Mutually exclusive with seeds.
+
+ query_limit : typing.Optional[int]
+ Max seed nodes from search. Default: 10, Max: 50. Only used with query.
+
recency_weight : typing.Optional[RecencyWeight]
Exponential half-life decay applied to edge created_at timestamps.
Valid values: none, 7_days, 30_days, 90_days. Default: none
@@ -723,7 +735,7 @@ def detect_patterns(
Reuses the same filter format as /graph/search.
seeds : typing.Optional[PatternSeeds]
- Seed selection. If omitted, analyzes the entire graph.
+ Seed selection. If omitted, analyzes the entire graph. Mutually exclusive with query.
user_id : typing.Optional[str]
User ID when detecting patterns on a user graph
@@ -747,10 +759,12 @@ def detect_patterns(
"""
_response = self._raw_client.detect_patterns(
detect=detect,
+ edge_limit=edge_limit,
graph_id=graph_id,
- include_examples=include_examples,
limit=limit,
min_occurrences=min_occurrences,
+ query=query,
+ query_limit=query_limit,
recency_weight=recency_weight,
search_filters=search_filters,
seeds=seeds,
@@ -1686,10 +1700,12 @@ async def detect_patterns(
self,
*,
detect: typing.Optional[DetectConfig] = OMIT,
+ edge_limit: typing.Optional[int] = OMIT,
graph_id: typing.Optional[str] = OMIT,
- include_examples: typing.Optional[bool] = OMIT,
limit: typing.Optional[int] = OMIT,
min_occurrences: typing.Optional[int] = OMIT,
+ query: typing.Optional[str] = OMIT,
+ query_limit: typing.Optional[int] = OMIT,
recency_weight: typing.Optional[RecencyWeight] = OMIT,
search_filters: typing.Optional[SearchFilters] = OMIT,
seeds: typing.Optional[PatternSeeds] = OMIT,
@@ -1699,25 +1715,35 @@ async def detect_patterns(
"""
Detects structural patterns in a knowledge graph including relationship frequencies,
multi-hop paths, co-occurrences, hubs, and clusters.
+ When a query is provided, uses hybrid search to discover seed nodes,
+ detects triple-frequency patterns, and returns resolved edges ranked by relevance.
Parameters
----------
detect : typing.Optional[DetectConfig]
Which pattern types to detect with type-specific configuration.
- Omit to detect all types with defaults.
+ Omit to detect all types with defaults. Ignored when query is set.
+
+ edge_limit : typing.Optional[int]
+ Max resolved edges per pattern. Default: 10, Max: 100. Only used with query.
graph_id : typing.Optional[str]
Graph ID when detecting patterns on a named graph
- include_examples : typing.Optional[bool]
- Include example node/edge UUIDs per pattern. Default: false
-
limit : typing.Optional[int]
Max patterns to return. Default: 50, Max: 200
min_occurrences : typing.Optional[int]
Minimum occurrence count to report a pattern. Default: 2
+ query : typing.Optional[str]
+ Search query for discovering seed nodes via hybrid search.
+ When set, forces triple-frequency detection only and enables edge resolution
+ with cross-encoder reranking. Mutually exclusive with seeds.
+
+ query_limit : typing.Optional[int]
+ Max seed nodes from search. Default: 10, Max: 50. Only used with query.
+
recency_weight : typing.Optional[RecencyWeight]
Exponential half-life decay applied to edge created_at timestamps.
Valid values: none, 7_days, 30_days, 90_days. Default: none
@@ -1727,7 +1753,7 @@ async def detect_patterns(
Reuses the same filter format as /graph/search.
seeds : typing.Optional[PatternSeeds]
- Seed selection. If omitted, analyzes the entire graph.
+ Seed selection. If omitted, analyzes the entire graph. Mutually exclusive with query.
user_id : typing.Optional[str]
User ID when detecting patterns on a user graph
@@ -1759,10 +1785,12 @@ async def main() -> None:
"""
_response = await self._raw_client.detect_patterns(
detect=detect,
+ edge_limit=edge_limit,
graph_id=graph_id,
- include_examples=include_examples,
limit=limit,
min_occurrences=min_occurrences,
+ query=query,
+ query_limit=query_limit,
recency_weight=recency_weight,
search_filters=search_filters,
seeds=seeds,
diff --git a/src/zep_cloud/graph/raw_client.py b/src/zep_cloud/graph/raw_client.py
index 8999828..63e19b5 100644
--- a/src/zep_cloud/graph/raw_client.py
+++ b/src/zep_cloud/graph/raw_client.py
@@ -101,6 +101,17 @@ def list_custom_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -188,6 +199,17 @@ def add_custom_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -273,6 +295,17 @@ def delete_custom_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -450,6 +483,17 @@ def set_entity_types_internal(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -1085,10 +1129,12 @@ def detect_patterns(
self,
*,
detect: typing.Optional[DetectConfig] = OMIT,
+ edge_limit: typing.Optional[int] = OMIT,
graph_id: typing.Optional[str] = OMIT,
- include_examples: typing.Optional[bool] = OMIT,
limit: typing.Optional[int] = OMIT,
min_occurrences: typing.Optional[int] = OMIT,
+ query: typing.Optional[str] = OMIT,
+ query_limit: typing.Optional[int] = OMIT,
recency_weight: typing.Optional[RecencyWeight] = OMIT,
search_filters: typing.Optional[SearchFilters] = OMIT,
seeds: typing.Optional[PatternSeeds] = OMIT,
@@ -1098,25 +1144,35 @@ def detect_patterns(
"""
Detects structural patterns in a knowledge graph including relationship frequencies,
multi-hop paths, co-occurrences, hubs, and clusters.
+ When a query is provided, uses hybrid search to discover seed nodes,
+ detects triple-frequency patterns, and returns resolved edges ranked by relevance.
Parameters
----------
detect : typing.Optional[DetectConfig]
Which pattern types to detect with type-specific configuration.
- Omit to detect all types with defaults.
+ Omit to detect all types with defaults. Ignored when query is set.
+
+ edge_limit : typing.Optional[int]
+ Max resolved edges per pattern. Default: 10, Max: 100. Only used with query.
graph_id : typing.Optional[str]
Graph ID when detecting patterns on a named graph
- include_examples : typing.Optional[bool]
- Include example node/edge UUIDs per pattern. Default: false
-
limit : typing.Optional[int]
Max patterns to return. Default: 50, Max: 200
min_occurrences : typing.Optional[int]
Minimum occurrence count to report a pattern. Default: 2
+ query : typing.Optional[str]
+ Search query for discovering seed nodes via hybrid search.
+ When set, forces triple-frequency detection only and enables edge resolution
+ with cross-encoder reranking. Mutually exclusive with seeds.
+
+ query_limit : typing.Optional[int]
+ Max seed nodes from search. Default: 10, Max: 50. Only used with query.
+
recency_weight : typing.Optional[RecencyWeight]
Exponential half-life decay applied to edge created_at timestamps.
Valid values: none, 7_days, 30_days, 90_days. Default: none
@@ -1126,7 +1182,7 @@ def detect_patterns(
Reuses the same filter format as /graph/search.
seeds : typing.Optional[PatternSeeds]
- Seed selection. If omitted, analyzes the entire graph.
+ Seed selection. If omitted, analyzes the entire graph. Mutually exclusive with query.
user_id : typing.Optional[str]
User ID when detecting patterns on a user graph
@@ -1146,10 +1202,12 @@ def detect_patterns(
"detect": convert_and_respect_annotation_metadata(
object_=detect, annotation=DetectConfig, direction="write"
),
+ "edge_limit": edge_limit,
"graph_id": graph_id,
- "include_examples": include_examples,
"limit": limit,
"min_occurrences": min_occurrences,
+ "query": query,
+ "query_limit": query_limit,
"recency_weight": recency_weight,
"search_filters": convert_and_respect_annotation_metadata(
object_=search_filters, annotation=SearchFilters, direction="write"
@@ -1643,6 +1701,17 @@ async def list_custom_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -1730,6 +1799,17 @@ async def add_custom_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -1815,6 +1895,17 @@ async def delete_custom_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -1992,6 +2083,17 @@ async def set_entity_types_internal(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -2627,10 +2729,12 @@ async def detect_patterns(
self,
*,
detect: typing.Optional[DetectConfig] = OMIT,
+ edge_limit: typing.Optional[int] = OMIT,
graph_id: typing.Optional[str] = OMIT,
- include_examples: typing.Optional[bool] = OMIT,
limit: typing.Optional[int] = OMIT,
min_occurrences: typing.Optional[int] = OMIT,
+ query: typing.Optional[str] = OMIT,
+ query_limit: typing.Optional[int] = OMIT,
recency_weight: typing.Optional[RecencyWeight] = OMIT,
search_filters: typing.Optional[SearchFilters] = OMIT,
seeds: typing.Optional[PatternSeeds] = OMIT,
@@ -2640,25 +2744,35 @@ async def detect_patterns(
"""
Detects structural patterns in a knowledge graph including relationship frequencies,
multi-hop paths, co-occurrences, hubs, and clusters.
+ When a query is provided, uses hybrid search to discover seed nodes,
+ detects triple-frequency patterns, and returns resolved edges ranked by relevance.
Parameters
----------
detect : typing.Optional[DetectConfig]
Which pattern types to detect with type-specific configuration.
- Omit to detect all types with defaults.
+ Omit to detect all types with defaults. Ignored when query is set.
+
+ edge_limit : typing.Optional[int]
+ Max resolved edges per pattern. Default: 10, Max: 100. Only used with query.
graph_id : typing.Optional[str]
Graph ID when detecting patterns on a named graph
- include_examples : typing.Optional[bool]
- Include example node/edge UUIDs per pattern. Default: false
-
limit : typing.Optional[int]
Max patterns to return. Default: 50, Max: 200
min_occurrences : typing.Optional[int]
Minimum occurrence count to report a pattern. Default: 2
+ query : typing.Optional[str]
+ Search query for discovering seed nodes via hybrid search.
+ When set, forces triple-frequency detection only and enables edge resolution
+ with cross-encoder reranking. Mutually exclusive with seeds.
+
+ query_limit : typing.Optional[int]
+ Max seed nodes from search. Default: 10, Max: 50. Only used with query.
+
recency_weight : typing.Optional[RecencyWeight]
Exponential half-life decay applied to edge created_at timestamps.
Valid values: none, 7_days, 30_days, 90_days. Default: none
@@ -2668,7 +2782,7 @@ async def detect_patterns(
Reuses the same filter format as /graph/search.
seeds : typing.Optional[PatternSeeds]
- Seed selection. If omitted, analyzes the entire graph.
+ Seed selection. If omitted, analyzes the entire graph. Mutually exclusive with query.
user_id : typing.Optional[str]
User ID when detecting patterns on a user graph
@@ -2688,10 +2802,12 @@ async def detect_patterns(
"detect": convert_and_respect_annotation_metadata(
object_=detect, annotation=DetectConfig, direction="write"
),
+ "edge_limit": edge_limit,
"graph_id": graph_id,
- "include_examples": include_examples,
"limit": limit,
"min_occurrences": min_occurrences,
+ "query": query,
+ "query_limit": query_limit,
"recency_weight": recency_weight,
"search_filters": convert_and_respect_annotation_metadata(
object_=search_filters, annotation=SearchFilters, direction="write"
diff --git a/src/zep_cloud/types/__init__.py b/src/zep_cloud/types/__init__.py
index cf17d52..33ff8ca 100644
--- a/src/zep_cloud/types/__init__.py
+++ b/src/zep_cloud/types/__init__.py
@@ -42,7 +42,6 @@
from .message import Message
from .message_list_response import MessageListResponse
from .path_detect_config import PathDetectConfig
-from .pattern_example import PatternExample
from .pattern_metadata import PatternMetadata
from .pattern_result import PatternResult
from .pattern_seeds import PatternSeeds
@@ -106,7 +105,6 @@
"Message",
"MessageListResponse",
"PathDetectConfig",
- "PatternExample",
"PatternMetadata",
"PatternResult",
"PatternSeeds",
diff --git a/src/zep_cloud/types/date_filter.py b/src/zep_cloud/types/date_filter.py
index e1619ed..429400e 100644
--- a/src/zep_cloud/types/date_filter.py
+++ b/src/zep_cloud/types/date_filter.py
@@ -15,7 +15,7 @@ class DateFilter(UniversalBaseModel):
date: typing.Optional[str] = pydantic.Field(default=None)
"""
- Date to filter on. Required for non-null operators (=, <>, >, <, >=, <=).
+ Date to filter on. Required for non-null operators (=, \<\>, \>, \<, \>=, \<=).
Should be omitted for IS NULL and IS NOT NULL operators.
"""
diff --git a/src/zep_cloud/types/detect_patterns_response.py b/src/zep_cloud/types/detect_patterns_response.py
index d952b2f..2cc1668 100644
--- a/src/zep_cloud/types/detect_patterns_response.py
+++ b/src/zep_cloud/types/detect_patterns_response.py
@@ -4,6 +4,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .entity_node import EntityNode
from .pattern_metadata import PatternMetadata
from .pattern_result import PatternResult
@@ -14,6 +15,11 @@ class DetectPatternsResponse(UniversalBaseModel):
Statistics about the detection run
"""
+ nodes: typing.Optional[typing.List[EntityNode]] = pydantic.Field(default=None)
+ """
+ Resolved nodes referenced by pattern edges (deduplicated). Only populated when query is set.
+ """
+
patterns: typing.Optional[typing.List[PatternResult]] = pydantic.Field(default=None)
"""
Detected patterns, sorted by weighted_score descending
diff --git a/src/zep_cloud/types/pattern_example.py b/src/zep_cloud/types/pattern_example.py
deleted file mode 100644
index 52360db..0000000
--- a/src/zep_cloud/types/pattern_example.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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 PatternExample(UniversalBaseModel):
- edge_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
- """
- Edge UUIDs involved in this instance
- """
-
- node_uuids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
- """
- Node UUIDs involved in this instance
- """
-
- 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/pattern_result.py b/src/zep_cloud/types/pattern_result.py
index 072df1b..2a132fd 100644
--- a/src/zep_cloud/types/pattern_result.py
+++ b/src/zep_cloud/types/pattern_result.py
@@ -4,7 +4,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
-from .pattern_example import PatternExample
+from .entity_edge import EntityEdge
class PatternResult(UniversalBaseModel):
@@ -18,9 +18,10 @@ class PatternResult(UniversalBaseModel):
Edge types in the pattern structure
"""
- examples: typing.Optional[typing.List[PatternExample]] = pydantic.Field(default=None)
+ edges: typing.Optional[typing.List[EntityEdge]] = pydantic.Field(default=None)
"""
- Example instances (only populated when include_examples is true)
+ Resolved edges for this pattern, sorted by cross-encoder relevance.
+ Only populated when query is set.
"""
node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
diff --git a/src/zep_cloud/types/property_filter.py b/src/zep_cloud/types/property_filter.py
index 85bbc52..8ff4827 100644
--- a/src/zep_cloud/types/property_filter.py
+++ b/src/zep_cloud/types/property_filter.py
@@ -22,7 +22,7 @@ class PropertyFilter(UniversalBaseModel):
"""
Property value to match on. Accepted types: string, int, float64, bool, or nil.
Invalid types (e.g., arrays, objects) will be rejected by validation.
- Must be non-nil for non-null operators (=, <>, >, <, >=, <=).
+ Must be non-nil for non-null operators (=, \<\>, \>, \<, \>=, \<=).
"""
if IS_PYDANTIC_V2:
diff --git a/src/zep_cloud/types/search_filters.py b/src/zep_cloud/types/search_filters.py
index a2ee892..dad7417 100644
--- a/src/zep_cloud/types/search_filters.py
+++ b/src/zep_cloud/types/search_filters.py
@@ -14,8 +14,8 @@ class SearchFilters(UniversalBaseModel):
2D array of date filters for the created_at field.
The outer array elements are combined with OR logic.
The inner array elements are combined with AND logic.
- Example: [[{">", date1}, {"<", date2}], [{"=", date3}]]
- This translates to: (created_at > date1 AND created_at < date2) OR (created_at = date3)
+ Example: [[\{"\>", date1\}, \{"\<", date2\}], [\{"=", date3\}]]
+ This translates to: (created_at \> date1 AND created_at \< date2) OR (created_at = date3)
"""
edge_types: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
@@ -43,8 +43,8 @@ class SearchFilters(UniversalBaseModel):
2D array of date filters for the expired_at field.
The outer array elements are combined with OR logic.
The inner array elements are combined with AND logic.
- Example: [[{">", date1}, {"<", date2}], [{"=", date3}]]
- This translates to: (expired_at > date1 AND expired_at < date2) OR (expired_at = date3)
+ Example: [[\{"\>", date1\}, \{"\<", date2\}], [\{"=", date3\}]]
+ This translates to: (expired_at \> date1 AND expired_at \< date2) OR (expired_at = date3)
"""
invalid_at: typing.Optional[typing.List[typing.List[DateFilter]]] = pydantic.Field(default=None)
@@ -52,8 +52,8 @@ class SearchFilters(UniversalBaseModel):
2D array of date filters for the invalid_at field.
The outer array elements are combined with OR logic.
The inner array elements are combined with AND logic.
- Example: [[{">", date1}, {"<", date2}], [{"=", date3}]]
- This translates to: (invalid_at > date1 AND invalid_at < date2) OR (invalid_at = date3)
+ Example: [[\{"\>", date1\}, \{"\<", date2\}], [\{"=", date3\}]]
+ This translates to: (invalid_at \> date1 AND invalid_at \< date2) OR (invalid_at = date3)
"""
node_labels: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
@@ -71,8 +71,8 @@ class SearchFilters(UniversalBaseModel):
2D array of date filters for the valid_at field.
The outer array elements are combined with OR logic.
The inner array elements are combined with AND logic.
- Example: [[{">", date1}, {"<", date2}], [{"=", date3}]]
- This translates to: (valid_at > date1 AND valid_at < date2) OR (valid_at = date3)
+ Example: [[\{"\>", date1\}, \{"\<", date2\}], [\{"=", date3\}]]
+ This translates to: (valid_at \> date1 AND valid_at \< date2) OR (valid_at = date3)
"""
if IS_PYDANTIC_V2:
diff --git a/src/zep_cloud/user/raw_client.py b/src/zep_cloud/user/raw_client.py
index e6bed02..f9ba418 100644
--- a/src/zep_cloud/user/raw_client.py
+++ b/src/zep_cloud/user/raw_client.py
@@ -78,6 +78,17 @@ def list_user_summary_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -160,6 +171,17 @@ def add_user_summary_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -240,6 +262,17 @@ def delete_user_summary_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -926,6 +959,17 @@ async def list_user_summary_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -1008,6 +1052,17 @@ async def add_user_summary_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),
@@ -1088,6 +1143,17 @@ async def delete_user_summary_instructions(
),
),
)
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
if _response.status_code == 500:
raise InternalServerError(
headers=dict(_response.headers),