add property filters
This commit is contained in:
parent
2d50fa565d
commit
cef4cd4765
3 changed files with 11 additions and 2 deletions
|
|
@ -41,6 +41,14 @@ class DateFilter(BaseModel):
|
|||
)
|
||||
|
||||
|
||||
class PropertyFilter(BaseModel):
|
||||
property_name: str = Field(description='Property name')
|
||||
property_value: str = Field(description='Value you wnt to match on for the property')
|
||||
comparison_operator: ComparisonOperator = Field(
|
||||
description='Comparison operator for the property'
|
||||
)
|
||||
|
||||
|
||||
class SearchFilters(BaseModel):
|
||||
node_labels: list[str] | None = Field(
|
||||
default=None, description='List of node labels to filter on'
|
||||
|
|
@ -53,6 +61,7 @@ class SearchFilters(BaseModel):
|
|||
created_at: list[list[DateFilter]] | None = Field(default=None)
|
||||
expired_at: list[list[DateFilter]] | None = Field(default=None)
|
||||
edge_uuids: list[str] | None = Field(default=None)
|
||||
property_filters: list[PropertyFilter] | None = Field(default=None)
|
||||
|
||||
|
||||
def cypher_to_opensearch_operator(op: ComparisonOperator) -> str:
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[project]
|
||||
name = "graphiti-core"
|
||||
description = "A temporal graph building library"
|
||||
version = "0.24.2"
|
||||
version = "0.24.3"
|
||||
authors = [
|
||||
{ name = "Paul Paliychuk", email = "paul@getzep.com" },
|
||||
{ name = "Preston Rasmussen", email = "preston@getzep.com" },
|
||||
|
|
|
|||
2
uv.lock
generated
2
uv.lock
generated
|
|
@ -808,7 +808,7 @@ wheels = [
|
|||
|
||||
[[package]]
|
||||
name = "graphiti-core"
|
||||
version = "0.24.1"
|
||||
version = "0.24.2"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "diskcache" },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue