Skip to content

Commit c4b72d1

Browse files
v1.0.7 (#200)
* SDK regeneration * SDK regeneration * SDK regeneration * chore: Bump version * chore: Bump version * SDK regeneration * SDK regeneration * SDK regeneration * feat: Update memory example to include latest api * fix: Decrease sleep in example --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 4d34635 commit c4b72d1

File tree

12 files changed

+528
-9
lines changed

12 files changed

+528
-9
lines changed

examples/chat_history/memory.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ async def main() -> None:
5151
print(f"\n---Creating session: {session_id}")
5252

5353
await client.memory.add_session(
54-
session_id=session_id, user_id=user_id, metadata={"foo": "bar"}
54+
session_id=session_id,
55+
user_id=user_id,
56+
metadata={"foo": "bar"},
5557
)
5658

5759
# Update session metadata
@@ -92,6 +94,10 @@ async def main() -> None:
9294
)
9395
print(f"Classification: {classification}")
9496

97+
all_session_facts = await client.memory.get_session_facts(session_id)
98+
for f in all_session_facts.facts:
99+
print(f"{f.fact}\n")
100+
95101
# Get Memory for session
96102
print(f"\n---Get Perpetual Memory for Session: {session_id}")
97103
memory = await client.memory.get(session_id, memory_type="perpetual")
@@ -106,6 +112,13 @@ async def main() -> None:
106112
)
107113
print("summaryResult: ", summary_result)
108114

115+
query = "What are Jane's favorite shoe brands?"
116+
print(f"\n---Searching over facts for: '{query}'")
117+
facts_result = await client.memory.search_sessions(
118+
session_ids=[session_id], text=query, search_scope="facts"
119+
)
120+
print("facts_result: ", facts_result)
121+
109122
print("\n---Searching over summaries with MMR Reranking")
110123
summary_mmr_result = await client.memory.search_sessions(
111124
session_ids=[session_id], text=query, search_scope="summary", search_type="mmr"

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 = "1.0.6"
3+
version = "1.0.7"
44
description = ""
55
readme = "README.md"
66
authors = []

src/zep_cloud/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
EndSessionResponse,
1313
EndSessionsResponse,
1414
Fact,
15+
FactRatingExamples,
16+
FactRatingInstruction,
17+
FactResponse,
18+
FactsResponse,
1519
Memory,
1620
MemorySearchResult,
1721
MemoryType,
@@ -51,6 +55,10 @@
5155
"EndSessionResponse",
5256
"EndSessionsResponse",
5357
"Fact",
58+
"FactRatingExamples",
59+
"FactRatingInstruction",
60+
"FactResponse",
61+
"FactsResponse",
5462
"InternalServerError",
5563
"Memory",
5664
"MemorySearchResult",

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": "1.0.6",
20+
"X-Fern-SDK-Version": "1.0.7",
2121
}
2222
headers["Authorization"] = f"Api-Key {self.api_key}"
2323
return headers

0 commit comments

Comments
 (0)