Skip to content

Commit 7b92c0b

Browse files
Get project info (#291)
* chore: Fix fact ratings table * SDK regeneration * chore: Version bump * chore: Version bump * SDK regeneration * chore: Add support for user/graph ontology targets * SDK regeneration * chore: Add support for setting entity/edges on a list of users/graphs * SDK regeneration * chore: Bump version * SDK regeneration * feat: Update compose context string util to include episodes and display entity attributes * chore: Bump version * fix: tests * chore: Remove redundant timestamp conversion branch * SDK regeneration * chore: Version bump * SDK regeneration * SDK regeneration * fix: tests * chore: Version bump * SDK regeneration * chore: Simplify date parsing in string composition utility * chore: Add python date util dep * chore: Bump version * SDK regeneration * SDK regeneration * chore: Bump version * SDK regeneration * chore: Remove langchain dependency * chore: Bump version * SDK regeneration * SDK regeneration * SDK regeneration * chore: Bump version * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent aee063b commit 7b92c0b

File tree

11 files changed

+394
-4
lines changed

11 files changed

+394
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "zep-cloud"
33

44
[tool.poetry]
55
name = "zep-cloud"
6-
version = "3.7.0"
6+
version = "3.8.0"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,67 @@ client.graph.update(
12041204
</dl>
12051205

12061206

1207+
</dd>
1208+
</dl>
1209+
</details>
1210+
1211+
## Project
1212+
<details><summary><code>client.project.<a href="src/zep_cloud/project/client.py">get</a>()</code></summary>
1213+
<dl>
1214+
<dd>
1215+
1216+
#### 📝 Description
1217+
1218+
<dl>
1219+
<dd>
1220+
1221+
<dl>
1222+
<dd>
1223+
1224+
Retrieve project info based on the provided api key.
1225+
</dd>
1226+
</dl>
1227+
</dd>
1228+
</dl>
1229+
1230+
#### 🔌 Usage
1231+
1232+
<dl>
1233+
<dd>
1234+
1235+
<dl>
1236+
<dd>
1237+
1238+
```python
1239+
from zep_cloud import Zep
1240+
1241+
client = Zep(
1242+
api_key="YOUR_API_KEY",
1243+
)
1244+
client.project.get()
1245+
1246+
```
1247+
</dd>
1248+
</dl>
1249+
</dd>
1250+
</dl>
1251+
1252+
#### ⚙️ Parameters
1253+
1254+
<dl>
1255+
<dd>
1256+
1257+
<dl>
1258+
<dd>
1259+
1260+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1261+
1262+
</dd>
1263+
</dl>
1264+
</dd>
1265+
</dl>
1266+
1267+
12071268
</dd>
12081269
</dl>
12091270
</details>

src/zep_cloud/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
MessageListResponse,
3636
ModelsFactRatingExamples,
3737
ModelsFactRatingInstruction,
38+
ProjectInfo,
39+
ProjectInfoResponse,
3840
Reranker,
3941
RoleType,
4042
SearchFilters,
@@ -47,7 +49,7 @@
4749
UserNodeResponse,
4850
)
4951
from .errors import BadRequestError, InternalServerError, NotFoundError
50-
from . import graph, thread, user
52+
from . import graph, project, thread, user
5153
from .client import AsyncZep, Zep
5254
from .environment import ZepEnvironment
5355
from .thread import ThreadGetUserContextRequestMode
@@ -90,6 +92,8 @@
9092
"ModelsFactRatingExamples",
9193
"ModelsFactRatingInstruction",
9294
"NotFoundError",
95+
"ProjectInfo",
96+
"ProjectInfoResponse",
9397
"Reranker",
9498
"RoleType",
9599
"SearchFilters",
@@ -105,6 +109,7 @@
105109
"ZepEnvironment",
106110
"__version__",
107111
"graph",
112+
"project",
108113
"thread",
109114
"user",
110115
]

src/zep_cloud/base_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
99
from .environment import ZepEnvironment
1010
from .graph.client import AsyncGraphClient, GraphClient
11+
from .project.client import AsyncProjectClient, ProjectClient
1112
from .thread.client import AsyncThreadClient, ThreadClient
1213
from .user.client import AsyncUserClient, UserClient
1314

@@ -80,6 +81,7 @@ def __init__(
8081
timeout=_defaulted_timeout,
8182
)
8283
self.graph = GraphClient(client_wrapper=self._client_wrapper)
84+
self.project = ProjectClient(client_wrapper=self._client_wrapper)
8385
self.thread = ThreadClient(client_wrapper=self._client_wrapper)
8486
self.user = UserClient(client_wrapper=self._client_wrapper)
8587

@@ -152,6 +154,7 @@ def __init__(
152154
timeout=_defaulted_timeout,
153155
)
154156
self.graph = AsyncGraphClient(client_wrapper=self._client_wrapper)
157+
self.project = AsyncProjectClient(client_wrapper=self._client_wrapper)
155158
self.thread = AsyncThreadClient(client_wrapper=self._client_wrapper)
156159
self.user = AsyncUserClient(client_wrapper=self._client_wrapper)
157160

src/zep_cloud/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def __init__(
2222

2323
def get_headers(self) -> typing.Dict[str, str]:
2424
headers: typing.Dict[str, str] = {
25-
"User-Agent": "zep-cloud/3.7.0",
25+
"User-Agent": "zep-cloud/3.8.0",
2626
"X-Fern-Language": "Python",
2727
"X-Fern-SDK-Name": "zep-cloud",
28-
"X-Fern-SDK-Version": "3.7.0",
28+
"X-Fern-SDK-Version": "3.8.0",
2929
**(self.get_custom_headers() or {}),
3030
}
3131
headers["Authorization"] = f"Api-Key {self.api_key}"

src/zep_cloud/project/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
# isort: skip_file
4+

src/zep_cloud/project/client.py

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6+
from ..core.request_options import RequestOptions
7+
from ..types.project_info_response import ProjectInfoResponse
8+
from .raw_client import AsyncRawProjectClient, RawProjectClient
9+
10+
11+
class ProjectClient:
12+
def __init__(self, *, client_wrapper: SyncClientWrapper):
13+
self._raw_client = RawProjectClient(client_wrapper=client_wrapper)
14+
15+
@property
16+
def with_raw_response(self) -> RawProjectClient:
17+
"""
18+
Retrieves a raw implementation of this client that returns raw responses.
19+
20+
Returns
21+
-------
22+
RawProjectClient
23+
"""
24+
return self._raw_client
25+
26+
def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> ProjectInfoResponse:
27+
"""
28+
Retrieve project info based on the provided api key.
29+
30+
Parameters
31+
----------
32+
request_options : typing.Optional[RequestOptions]
33+
Request-specific configuration.
34+
35+
Returns
36+
-------
37+
ProjectInfoResponse
38+
Retrieved
39+
40+
Examples
41+
--------
42+
from zep_cloud import Zep
43+
44+
client = Zep(
45+
api_key="YOUR_API_KEY",
46+
)
47+
client.project.get()
48+
"""
49+
_response = self._raw_client.get(request_options=request_options)
50+
return _response.data
51+
52+
53+
class AsyncProjectClient:
54+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
55+
self._raw_client = AsyncRawProjectClient(client_wrapper=client_wrapper)
56+
57+
@property
58+
def with_raw_response(self) -> AsyncRawProjectClient:
59+
"""
60+
Retrieves a raw implementation of this client that returns raw responses.
61+
62+
Returns
63+
-------
64+
AsyncRawProjectClient
65+
"""
66+
return self._raw_client
67+
68+
async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> ProjectInfoResponse:
69+
"""
70+
Retrieve project info based on the provided api key.
71+
72+
Parameters
73+
----------
74+
request_options : typing.Optional[RequestOptions]
75+
Request-specific configuration.
76+
77+
Returns
78+
-------
79+
ProjectInfoResponse
80+
Retrieved
81+
82+
Examples
83+
--------
84+
import asyncio
85+
86+
from zep_cloud import AsyncZep
87+
88+
client = AsyncZep(
89+
api_key="YOUR_API_KEY",
90+
)
91+
92+
93+
async def main() -> None:
94+
await client.project.get()
95+
96+
97+
asyncio.run(main())
98+
"""
99+
_response = await self._raw_client.get(request_options=request_options)
100+
return _response.data

0 commit comments

Comments
 (0)