zep-cloud 2.12.0__tar.gz → 2.12.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/PKG-INFO +11 -1
- zep_cloud-2.12.2/pyproject.toml +56 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/client_wrapper.py +1 -1
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/external_clients/memory.py +0 -16
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/graph/node/client.py +214 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/memory/client.py +2 -2
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/episode.py +5 -0
- zep_cloud-2.12.0/pyproject.toml +0 -37
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/LICENSE +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/README.md +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/base_client.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/client.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/api_error.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/datetime_utils.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/file.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/http_client.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/jsonable_encoder.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/pydantic_utilities.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/query_encoder.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/remove_none_from_dict.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/core/request_options.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/document/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/document/client.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/environment.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/errors/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/errors/bad_request_error.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/errors/conflict_error.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/errors/internal_server_error.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/errors/not_found_error.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/errors/unauthorized_error.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/external_clients/document.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/external_clients/graph.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/external_clients/ontology.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/external_clients/user.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/extractor/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/extractor/models.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/graph/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/graph/client.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/graph/edge/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/graph/edge/client.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/graph/episode/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/graph/episode/client.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/graph/node/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/group/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/group/client.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/memory/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/py.typed +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/add_memory_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/add_triple_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/api_error.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/apidata_document.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/apidata_document_collection.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/apidata_document_search_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/apidata_document_with_score.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/classify_session_request.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/create_document_request.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/end_session_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/end_sessions_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/entity_edge.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/entity_node.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/entity_property.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/entity_property_type.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/entity_type.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/entity_type_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/episode_data.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/episode_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/fact.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/fact_rating_examples.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/fact_rating_instruction.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/fact_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/facts_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/graph_data_type.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/graph_edges_request.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/graph_nodes_request.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/graph_search_results.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/graph_search_scope.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/group.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/group_list_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/memory.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/memory_search_result.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/message.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/message_list_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/new_fact.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/question.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/reranker.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/role_type.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/search_filters.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/search_scope.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/search_type.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/session.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/session_classification.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/session_list_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/session_search_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/session_search_result.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/success_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/summary.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/summary_list_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/update_document_list_request.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/user.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/user_list_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/user_node_response.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/user/__init__.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/user/client.py +0 -0
- {zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/version.py +0 -0
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zep-cloud
|
|
3
|
-
Version: 2.12.
|
|
3
|
+
Version: 2.12.2
|
|
4
4
|
Summary:
|
|
5
5
|
Requires-Python: >=3.9.0,<4.0
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: Operating System :: MacOS
|
|
8
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Operating System :: POSIX
|
|
11
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
6
13
|
Classifier: Programming Language :: Python :: 3
|
|
7
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
8
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
9
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Typing :: Typed
|
|
11
21
|
Requires-Dist: httpx (>=0.21.2)
|
|
12
22
|
Requires-Dist: pydantic (>=1.9.2)
|
|
13
23
|
Requires-Dist: typing_extensions (>=4.0.0)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "zep-cloud"
|
|
3
|
+
version = "2.12.2"
|
|
4
|
+
description = ""
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = []
|
|
7
|
+
packages = [{ include = "zep_cloud", from = "src" }]
|
|
8
|
+
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Intended Audience :: Developers",
|
|
11
|
+
"Programming Language :: Python",
|
|
12
|
+
"Programming Language :: Python :: 3",
|
|
13
|
+
"Programming Language :: Python :: 3.8",
|
|
14
|
+
"Programming Language :: Python :: 3.9",
|
|
15
|
+
"Programming Language :: Python :: 3.10",
|
|
16
|
+
"Programming Language :: Python :: 3.11",
|
|
17
|
+
"Programming Language :: Python :: 3.12",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Operating System :: POSIX",
|
|
20
|
+
"Operating System :: MacOS",
|
|
21
|
+
"Operating System :: POSIX :: Linux",
|
|
22
|
+
"Operating System :: Microsoft :: Windows",
|
|
23
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
24
|
+
"Typing :: Typed"
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[tool.poetry.dependencies]
|
|
28
|
+
python = ">=3.9.0,<4.0"
|
|
29
|
+
httpx = ">=0.21.2"
|
|
30
|
+
pydantic = ">= 1.9.2"
|
|
31
|
+
typing_extensions = ">= 4.0.0"
|
|
32
|
+
|
|
33
|
+
[tool.poetry.group.dev.dependencies]
|
|
34
|
+
mypy = "1.9.0"
|
|
35
|
+
pytest = "^7.4.0"
|
|
36
|
+
pytest-asyncio = "^0.23.5"
|
|
37
|
+
python-dateutil = "^2.9.0"
|
|
38
|
+
types-python-dateutil = "^2.9.0.20240316"
|
|
39
|
+
langchain = "^0.1.3"
|
|
40
|
+
openai = "^1.9.0"
|
|
41
|
+
langchain-openai = "^0.0.3"
|
|
42
|
+
black = "^24.4.2"
|
|
43
|
+
ruff = "^0.4.8"
|
|
44
|
+
ipykernel = "^6.29.4"
|
|
45
|
+
|
|
46
|
+
[tool.pytest.ini_options]
|
|
47
|
+
testpaths = [ "tests" ]
|
|
48
|
+
asyncio_mode = "auto"
|
|
49
|
+
|
|
50
|
+
[tool.mypy]
|
|
51
|
+
plugins = ["pydantic.mypy"]
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
[build-system]
|
|
55
|
+
requires = ["poetry-core"]
|
|
56
|
+
build-backend = "poetry.core.masonry.api"
|
|
@@ -17,7 +17,7 @@ class BaseClientWrapper:
|
|
|
17
17
|
headers: typing.Dict[str, str] = {
|
|
18
18
|
"X-Fern-Language": "Python",
|
|
19
19
|
"X-Fern-SDK-Name": "zep-cloud",
|
|
20
|
-
"X-Fern-SDK-Version": "2.12.
|
|
20
|
+
"X-Fern-SDK-Version": "2.12.2",
|
|
21
21
|
}
|
|
22
22
|
headers["Authorization"] = f"Api-Key {self.api_key}"
|
|
23
23
|
return headers
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import json
|
|
3
3
|
import typing
|
|
4
|
-
from packaging import version
|
|
5
|
-
|
|
6
|
-
import pydantic
|
|
7
4
|
|
|
8
5
|
from zep_cloud.core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
9
6
|
from zep_cloud.memory.client import (
|
|
@@ -16,9 +13,6 @@ from zep_cloud.memory.client import (
|
|
|
16
13
|
if typing.TYPE_CHECKING:
|
|
17
14
|
from zep_cloud.extractor.models import ZepModel
|
|
18
15
|
|
|
19
|
-
MIN_PYDANTIC_VERSION = "2.0"
|
|
20
|
-
|
|
21
|
-
|
|
22
16
|
class MemoryClient(BaseMemoryClient):
|
|
23
17
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
24
18
|
super().__init__(client_wrapper=client_wrapper)
|
|
@@ -73,11 +67,6 @@ class MemoryClient(BaseMemoryClient):
|
|
|
73
67
|
print(customer_data.name) # Access extracted and validated customer name
|
|
74
68
|
"""
|
|
75
69
|
|
|
76
|
-
if version.parse(pydantic.VERSION) < version.parse(MIN_PYDANTIC_VERSION):
|
|
77
|
-
raise RuntimeError(
|
|
78
|
-
f"Pydantic version {MIN_PYDANTIC_VERSION} or greater is required."
|
|
79
|
-
)
|
|
80
|
-
|
|
81
70
|
model_schema = json.dumps(model.model_json_schema())
|
|
82
71
|
|
|
83
72
|
result = self.extract_data(
|
|
@@ -147,11 +136,6 @@ class AsyncMemoryClient(AsyncBaseMemoryClient):
|
|
|
147
136
|
print(customer_data.name) # Access extracted and validated customer name
|
|
148
137
|
"""
|
|
149
138
|
|
|
150
|
-
if version.parse(pydantic.VERSION) < version.parse(MIN_PYDANTIC_VERSION):
|
|
151
|
-
raise RuntimeError(
|
|
152
|
-
f"Pydantic version {MIN_PYDANTIC_VERSION} or greater is required."
|
|
153
|
-
)
|
|
154
|
-
|
|
155
139
|
model_schema = json.dumps(model.model_json_schema())
|
|
156
140
|
|
|
157
141
|
result = await self.extract_data(
|
|
@@ -12,7 +12,9 @@ from ...errors.bad_request_error import BadRequestError
|
|
|
12
12
|
from ...errors.internal_server_error import InternalServerError
|
|
13
13
|
from ...errors.not_found_error import NotFoundError
|
|
14
14
|
from ...types.api_error import ApiError as types_api_error_ApiError
|
|
15
|
+
from ...types.entity_edge import EntityEdge
|
|
15
16
|
from ...types.entity_node import EntityNode
|
|
17
|
+
from ...types.episode_response import EpisodeResponse
|
|
16
18
|
|
|
17
19
|
# this is used as the default value for optional parameters
|
|
18
20
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -150,6 +152,104 @@ class NodeClient:
|
|
|
150
152
|
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
|
|
151
153
|
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
|
|
152
154
|
|
|
155
|
+
def get_edges(
|
|
156
|
+
self, node_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
157
|
+
) -> typing.List[EntityEdge]:
|
|
158
|
+
"""
|
|
159
|
+
Returns all edges for a node
|
|
160
|
+
|
|
161
|
+
Parameters
|
|
162
|
+
----------
|
|
163
|
+
node_uuid : str
|
|
164
|
+
Node UUID
|
|
165
|
+
|
|
166
|
+
request_options : typing.Optional[RequestOptions]
|
|
167
|
+
Request-specific configuration.
|
|
168
|
+
|
|
169
|
+
Returns
|
|
170
|
+
-------
|
|
171
|
+
typing.List[EntityEdge]
|
|
172
|
+
Edges
|
|
173
|
+
|
|
174
|
+
Examples
|
|
175
|
+
--------
|
|
176
|
+
from zep_cloud.client import Zep
|
|
177
|
+
|
|
178
|
+
client = Zep(
|
|
179
|
+
api_key="YOUR_API_KEY",
|
|
180
|
+
)
|
|
181
|
+
client.graph.node.get_edges(
|
|
182
|
+
node_uuid="node_uuid",
|
|
183
|
+
)
|
|
184
|
+
"""
|
|
185
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
186
|
+
f"graph/node/{jsonable_encoder(node_uuid)}/entity-edges", method="GET", request_options=request_options
|
|
187
|
+
)
|
|
188
|
+
try:
|
|
189
|
+
if 200 <= _response.status_code < 300:
|
|
190
|
+
return pydantic_v1.parse_obj_as(typing.List[EntityEdge], _response.json()) # type: ignore
|
|
191
|
+
if _response.status_code == 400:
|
|
192
|
+
raise BadRequestError(
|
|
193
|
+
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
|
|
194
|
+
)
|
|
195
|
+
if _response.status_code == 500:
|
|
196
|
+
raise InternalServerError(
|
|
197
|
+
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
|
|
198
|
+
)
|
|
199
|
+
_response_json = _response.json()
|
|
200
|
+
except JSONDecodeError:
|
|
201
|
+
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
|
|
202
|
+
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
|
|
203
|
+
|
|
204
|
+
def get_episodes(
|
|
205
|
+
self, node_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
206
|
+
) -> EpisodeResponse:
|
|
207
|
+
"""
|
|
208
|
+
Returns all episodes that mentioned a given node
|
|
209
|
+
|
|
210
|
+
Parameters
|
|
211
|
+
----------
|
|
212
|
+
node_uuid : str
|
|
213
|
+
Node UUID
|
|
214
|
+
|
|
215
|
+
request_options : typing.Optional[RequestOptions]
|
|
216
|
+
Request-specific configuration.
|
|
217
|
+
|
|
218
|
+
Returns
|
|
219
|
+
-------
|
|
220
|
+
EpisodeResponse
|
|
221
|
+
Episodes
|
|
222
|
+
|
|
223
|
+
Examples
|
|
224
|
+
--------
|
|
225
|
+
from zep_cloud.client import Zep
|
|
226
|
+
|
|
227
|
+
client = Zep(
|
|
228
|
+
api_key="YOUR_API_KEY",
|
|
229
|
+
)
|
|
230
|
+
client.graph.node.get_episodes(
|
|
231
|
+
node_uuid="node_uuid",
|
|
232
|
+
)
|
|
233
|
+
"""
|
|
234
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
235
|
+
f"graph/node/{jsonable_encoder(node_uuid)}/episodes", method="GET", request_options=request_options
|
|
236
|
+
)
|
|
237
|
+
try:
|
|
238
|
+
if 200 <= _response.status_code < 300:
|
|
239
|
+
return pydantic_v1.parse_obj_as(EpisodeResponse, _response.json()) # type: ignore
|
|
240
|
+
if _response.status_code == 400:
|
|
241
|
+
raise BadRequestError(
|
|
242
|
+
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
|
|
243
|
+
)
|
|
244
|
+
if _response.status_code == 500:
|
|
245
|
+
raise InternalServerError(
|
|
246
|
+
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
|
|
247
|
+
)
|
|
248
|
+
_response_json = _response.json()
|
|
249
|
+
except JSONDecodeError:
|
|
250
|
+
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
|
|
251
|
+
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
|
|
252
|
+
|
|
153
253
|
def get(self, uuid_: str, *, request_options: typing.Optional[RequestOptions] = None) -> EntityNode:
|
|
154
254
|
"""
|
|
155
255
|
Returns a specific node by its UUID.
|
|
@@ -350,6 +450,120 @@ class AsyncNodeClient:
|
|
|
350
450
|
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
|
|
351
451
|
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
|
|
352
452
|
|
|
453
|
+
async def get_edges(
|
|
454
|
+
self, node_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
455
|
+
) -> typing.List[EntityEdge]:
|
|
456
|
+
"""
|
|
457
|
+
Returns all edges for a node
|
|
458
|
+
|
|
459
|
+
Parameters
|
|
460
|
+
----------
|
|
461
|
+
node_uuid : str
|
|
462
|
+
Node UUID
|
|
463
|
+
|
|
464
|
+
request_options : typing.Optional[RequestOptions]
|
|
465
|
+
Request-specific configuration.
|
|
466
|
+
|
|
467
|
+
Returns
|
|
468
|
+
-------
|
|
469
|
+
typing.List[EntityEdge]
|
|
470
|
+
Edges
|
|
471
|
+
|
|
472
|
+
Examples
|
|
473
|
+
--------
|
|
474
|
+
import asyncio
|
|
475
|
+
|
|
476
|
+
from zep_cloud.client import AsyncZep
|
|
477
|
+
|
|
478
|
+
client = AsyncZep(
|
|
479
|
+
api_key="YOUR_API_KEY",
|
|
480
|
+
)
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
async def main() -> None:
|
|
484
|
+
await client.graph.node.get_edges(
|
|
485
|
+
node_uuid="node_uuid",
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
asyncio.run(main())
|
|
490
|
+
"""
|
|
491
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
492
|
+
f"graph/node/{jsonable_encoder(node_uuid)}/entity-edges", method="GET", request_options=request_options
|
|
493
|
+
)
|
|
494
|
+
try:
|
|
495
|
+
if 200 <= _response.status_code < 300:
|
|
496
|
+
return pydantic_v1.parse_obj_as(typing.List[EntityEdge], _response.json()) # type: ignore
|
|
497
|
+
if _response.status_code == 400:
|
|
498
|
+
raise BadRequestError(
|
|
499
|
+
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
|
|
500
|
+
)
|
|
501
|
+
if _response.status_code == 500:
|
|
502
|
+
raise InternalServerError(
|
|
503
|
+
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
|
|
504
|
+
)
|
|
505
|
+
_response_json = _response.json()
|
|
506
|
+
except JSONDecodeError:
|
|
507
|
+
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
|
|
508
|
+
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
|
|
509
|
+
|
|
510
|
+
async def get_episodes(
|
|
511
|
+
self, node_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
512
|
+
) -> EpisodeResponse:
|
|
513
|
+
"""
|
|
514
|
+
Returns all episodes that mentioned a given node
|
|
515
|
+
|
|
516
|
+
Parameters
|
|
517
|
+
----------
|
|
518
|
+
node_uuid : str
|
|
519
|
+
Node UUID
|
|
520
|
+
|
|
521
|
+
request_options : typing.Optional[RequestOptions]
|
|
522
|
+
Request-specific configuration.
|
|
523
|
+
|
|
524
|
+
Returns
|
|
525
|
+
-------
|
|
526
|
+
EpisodeResponse
|
|
527
|
+
Episodes
|
|
528
|
+
|
|
529
|
+
Examples
|
|
530
|
+
--------
|
|
531
|
+
import asyncio
|
|
532
|
+
|
|
533
|
+
from zep_cloud.client import AsyncZep
|
|
534
|
+
|
|
535
|
+
client = AsyncZep(
|
|
536
|
+
api_key="YOUR_API_KEY",
|
|
537
|
+
)
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
async def main() -> None:
|
|
541
|
+
await client.graph.node.get_episodes(
|
|
542
|
+
node_uuid="node_uuid",
|
|
543
|
+
)
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
asyncio.run(main())
|
|
547
|
+
"""
|
|
548
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
549
|
+
f"graph/node/{jsonable_encoder(node_uuid)}/episodes", method="GET", request_options=request_options
|
|
550
|
+
)
|
|
551
|
+
try:
|
|
552
|
+
if 200 <= _response.status_code < 300:
|
|
553
|
+
return pydantic_v1.parse_obj_as(EpisodeResponse, _response.json()) # type: ignore
|
|
554
|
+
if _response.status_code == 400:
|
|
555
|
+
raise BadRequestError(
|
|
556
|
+
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
|
|
557
|
+
)
|
|
558
|
+
if _response.status_code == 500:
|
|
559
|
+
raise InternalServerError(
|
|
560
|
+
pydantic_v1.parse_obj_as(types_api_error_ApiError, _response.json()) # type: ignore
|
|
561
|
+
)
|
|
562
|
+
_response_json = _response.json()
|
|
563
|
+
except JSONDecodeError:
|
|
564
|
+
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
|
|
565
|
+
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
|
|
566
|
+
|
|
353
567
|
async def get(self, uuid_: str, *, request_options: typing.Optional[RequestOptions] = None) -> EntityNode:
|
|
354
568
|
"""
|
|
355
569
|
Returns a specific node by its UUID.
|
|
@@ -1177,7 +1177,7 @@ class MemoryClient:
|
|
|
1177
1177
|
self, session_id: str, message_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1178
1178
|
) -> Message:
|
|
1179
1179
|
"""
|
|
1180
|
-
Returns a specific message from a session.
|
|
1180
|
+
Deprecated: Use graph.episodes.get instead. Returns a specific message from a session.
|
|
1181
1181
|
|
|
1182
1182
|
Parameters
|
|
1183
1183
|
----------
|
|
@@ -2769,7 +2769,7 @@ class AsyncMemoryClient:
|
|
|
2769
2769
|
self, session_id: str, message_uuid: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
2770
2770
|
) -> Message:
|
|
2771
2771
|
"""
|
|
2772
|
-
Returns a specific message from a session.
|
|
2772
|
+
Deprecated: Use graph.episodes.get instead. Returns a specific message from a session.
|
|
2773
2773
|
|
|
2774
2774
|
Parameters
|
|
2775
2775
|
----------
|
|
@@ -12,6 +12,11 @@ class Episode(pydantic_v1.BaseModel):
|
|
|
12
12
|
content: str
|
|
13
13
|
created_at: str
|
|
14
14
|
processed: typing.Optional[bool] = None
|
|
15
|
+
session_id: typing.Optional[str] = pydantic_v1.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
Optional session ID. Will be present only if the episode corresponds to the messages added using memory.add API
|
|
18
|
+
"""
|
|
19
|
+
|
|
15
20
|
source: typing.Optional[GraphDataType] = None
|
|
16
21
|
source_description: typing.Optional[str] = None
|
|
17
22
|
uuid_: str = pydantic_v1.Field(alias="uuid")
|
zep_cloud-2.12.0/pyproject.toml
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
[tool.poetry]
|
|
2
|
-
name = "zep-cloud"
|
|
3
|
-
version = "2.12.0"
|
|
4
|
-
description = ""
|
|
5
|
-
readme = "README.md"
|
|
6
|
-
authors = []
|
|
7
|
-
packages = [{ include = "zep_cloud", from = "src" }]
|
|
8
|
-
|
|
9
|
-
[tool.poetry.dependencies]
|
|
10
|
-
python = ">=3.9.0,<4.0"
|
|
11
|
-
httpx = ">=0.21.2"
|
|
12
|
-
pydantic = ">= 1.9.2"
|
|
13
|
-
typing_extensions = ">= 4.0.0"
|
|
14
|
-
|
|
15
|
-
[tool.poetry.group.dev.dependencies]
|
|
16
|
-
mypy = "1.9.0"
|
|
17
|
-
pytest = "^7.4.0"
|
|
18
|
-
pytest-asyncio = "^0.23.5"
|
|
19
|
-
python-dateutil = "^2.9.0"
|
|
20
|
-
langchain = "^0.1.3"
|
|
21
|
-
openai = "^1.9.0"
|
|
22
|
-
langchain-openai = "^0.0.3"
|
|
23
|
-
black = "^24.4.2"
|
|
24
|
-
ruff = "^0.4.8"
|
|
25
|
-
ipykernel = "^6.29.4"
|
|
26
|
-
|
|
27
|
-
[tool.pytest.ini_options]
|
|
28
|
-
testpaths = ["tests"]
|
|
29
|
-
asyncio_mode = "auto"
|
|
30
|
-
|
|
31
|
-
[tool.mypy]
|
|
32
|
-
plugins = ["pydantic.mypy"]
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
[build-system]
|
|
36
|
-
requires = ["poetry-core"]
|
|
37
|
-
build-backend = "poetry.core.masonry.api"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{zep_cloud-2.12.0 → zep_cloud-2.12.2}/src/zep_cloud/types/apidata_document_search_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|