Skip to content

Commit 6c23f6c

Browse files
Expose episode source argument when adding data (#247)
* SDK regeneration * SDK regeneration * chore: Version bump * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * SDK regeneration * chore: Version bump * poetry lock * chore: version bump * SDK regeneration * chore: Version bump * SDK regeneration * chore: version bump * SDK regeneration * SDK regeneration * SDK regeneration * feat: Customer provided entity types * fix * chore: version bump * SDK regeneration * fix * chore: Support entity class descriptor * SDK regeneration * fix: linter errors * chore: Version bump * SDK regeneration * SDK regeneration * SDK regeneration * chore: version bump * chore: revert unintended changes * chore: Version bump * SDK regeneration --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent cca3505 commit 6c23f6c

File tree

5 files changed

+52
-18
lines changed

5 files changed

+52
-18
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "zep-cloud"
3-
version = "2.10.0"
3+
version = "2.10.1"
44
description = ""
55
readme = "README.md"
66
authors = []

reference.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,10 @@ from zep_cloud.client import Zep
12451245
client = Zep(
12461246
api_key="YOUR_API_KEY",
12471247
)
1248-
client.graph.add()
1248+
client.graph.add(
1249+
data="data",
1250+
type="text",
1251+
)
12491252

12501253
```
12511254
</dd>
@@ -1261,7 +1264,15 @@ client.graph.add()
12611264
<dl>
12621265
<dd>
12631266

1264-
**data:** `typing.Optional[str]`
1267+
**data:** `str`
1268+
1269+
</dd>
1270+
</dl>
1271+
1272+
<dl>
1273+
<dd>
1274+
1275+
**type:** `GraphDataType`
12651276

12661277
</dd>
12671278
</dl>
@@ -1277,7 +1288,7 @@ client.graph.add()
12771288
<dl>
12781289
<dd>
12791290

1280-
**type:** `typing.Optional[GraphDataType]`
1291+
**source_description:** `typing.Optional[str]`
12811292

12821293
</dd>
12831294
</dl>

src/zep_cloud/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1717
headers: typing.Dict[str, str] = {
1818
"X-Fern-Language": "Python",
1919
"X-Fern-SDK-Name": "zep-cloud",
20-
"X-Fern-SDK-Version": "2.10.0",
20+
"X-Fern-SDK-Version": "2.10.1",
2121
}
2222
headers["Authorization"] = f"Api-Key {self.api_key}"
2323
return headers

src/zep_cloud/graph/client.py

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ def set_entity_types_internal(
139139
def add(
140140
self,
141141
*,
142-
data: typing.Optional[str] = OMIT,
142+
data: str,
143+
type: GraphDataType,
143144
group_id: typing.Optional[str] = OMIT,
144-
type: typing.Optional[GraphDataType] = OMIT,
145+
source_description: typing.Optional[str] = OMIT,
145146
user_id: typing.Optional[str] = OMIT,
146147
request_options: typing.Optional[RequestOptions] = None
147148
) -> Episode:
@@ -150,11 +151,13 @@ def add(
150151
151152
Parameters
152153
----------
153-
data : typing.Optional[str]
154+
data : str
155+
156+
type : GraphDataType
154157
155158
group_id : typing.Optional[str]
156159
157-
type : typing.Optional[GraphDataType]
160+
source_description : typing.Optional[str]
158161
159162
user_id : typing.Optional[str]
160163
@@ -173,12 +176,21 @@ def add(
173176
client = Zep(
174177
api_key="YOUR_API_KEY",
175178
)
176-
client.graph.add()
179+
client.graph.add(
180+
data="data",
181+
type="text",
182+
)
177183
"""
178184
_response = self._client_wrapper.httpx_client.request(
179185
"graph",
180186
method="POST",
181-
json={"data": data, "group_id": group_id, "type": type, "user_id": user_id},
187+
json={
188+
"data": data,
189+
"group_id": group_id,
190+
"source_description": source_description,
191+
"type": type,
192+
"user_id": user_id,
193+
},
182194
request_options=request_options,
183195
omit=OMIT,
184196
)
@@ -561,9 +573,10 @@ async def main() -> None:
561573
async def add(
562574
self,
563575
*,
564-
data: typing.Optional[str] = OMIT,
576+
data: str,
577+
type: GraphDataType,
565578
group_id: typing.Optional[str] = OMIT,
566-
type: typing.Optional[GraphDataType] = OMIT,
579+
source_description: typing.Optional[str] = OMIT,
567580
user_id: typing.Optional[str] = OMIT,
568581
request_options: typing.Optional[RequestOptions] = None
569582
) -> Episode:
@@ -572,11 +585,13 @@ async def add(
572585
573586
Parameters
574587
----------
575-
data : typing.Optional[str]
588+
data : str
589+
590+
type : GraphDataType
576591
577592
group_id : typing.Optional[str]
578593
579-
type : typing.Optional[GraphDataType]
594+
source_description : typing.Optional[str]
580595
581596
user_id : typing.Optional[str]
582597
@@ -600,15 +615,24 @@ async def add(
600615
601616
602617
async def main() -> None:
603-
await client.graph.add()
618+
await client.graph.add(
619+
data="data",
620+
type="text",
621+
)
604622
605623
606624
asyncio.run(main())
607625
"""
608626
_response = await self._client_wrapper.httpx_client.request(
609627
"graph",
610628
method="POST",
611-
json={"data": data, "group_id": group_id, "type": type, "user_id": user_id},
629+
json={
630+
"data": data,
631+
"group_id": group_id,
632+
"source_description": source_description,
633+
"type": type,
634+
"user_id": user_id,
635+
},
612636
request_options=request_options,
613637
omit=OMIT,
614638
)

src/zep_cloud/types/episode.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
class Episode(pydantic_v1.BaseModel):
1212
content: str
1313
created_at: str
14-
name: typing.Optional[str] = None
1514
processed: typing.Optional[bool] = None
1615
source: typing.Optional[GraphDataType] = None
1716
source_description: typing.Optional[str] = None

0 commit comments

Comments
 (0)