Skip to content

Commit be6b1b7

Browse files
Merge branch 'main' of github.com:getzep/zep-python
# Conflicts: # examples/chat_history/memory.py
2 parents 791352a + 66df59a commit be6b1b7

File tree

5 files changed

+9
-54
lines changed

5 files changed

+9
-54
lines changed

examples/chat_history/memory.py

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ async def main() -> None:
5252
last_name="Smith",
5353
metadata={"vip": "true"},
5454
)
55-
55+
5656
# await asyncio.sleep(1)
5757
print(f"User added: {user_id}")
58-
return
5958
session_id = uuid.uuid4().hex # unique session id. can be any alphanum string
6059

6160
# Create session associated with the above user
@@ -115,50 +114,6 @@ async def main() -> None:
115114

116115
print(f"Memory context: {memory.context}")
117116

118-
# Search Memory for session
119-
query = "What are Jane's favorite shoe brands?"
120-
print(f"\n---Searching over summaries for: '{query}'")
121-
summary_result = await client.memory.search_sessions(
122-
session_ids=[session_id], text=query, search_scope="summary"
123-
)
124-
print("summaryResult: ", summary_result)
125-
126-
query = "What are Jane's favorite shoe brands?"
127-
print(f"\n---Searching over facts for: '{query}'")
128-
facts_result = await client.memory.search_sessions(
129-
user_id=user_id, text=query, search_scope="facts"
130-
)
131-
print("facts_result: ", facts_result)
132-
133-
print("\n---Searching over summaries with MMR Reranking")
134-
summary_mmr_result = await client.memory.search_sessions(
135-
session_ids=[session_id], text=query, search_scope="summary", search_type="mmr"
136-
)
137-
print("summary_mmr_result: ", summary_mmr_result)
138-
139-
print("\n---Searching over messages using a metadata filter")
140-
141-
messages_result = await client.memory.search_sessions(
142-
session_ids=[session_id],
143-
text=query,
144-
search_scope="messages",
145-
record_filter={"where": {"jsonpath": '$[*] ? (@.bar == "foo")'}},
146-
)
147-
print("messages_result: ", messages_result)
148-
149-
user_messages_result = await client.memory.search_sessions(
150-
limit=3,
151-
user_id=user_id,
152-
text=query,
153-
search_scope="messages",
154-
)
155-
print("user_messages_result: ", user_messages_result)
156-
157-
# End session - this will trigger summarization and other background tasks on the completed session
158-
# Uncomment to run
159-
# print(f"\n5---end_session for Session: {session_id}")
160-
# await client.memory.end_session(session_id)
161-
162117
# Delete Memory for session
163118
# Uncomment to run
164119
# print(f"\n6---deleteMemory for Session: {session_id}")

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

reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ client.graph.set_entity_types_internal()
12171217
<dl>
12181218
<dd>
12191219

1220-
Add data to the graph. Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
1220+
Add data to the graph.
12211221
</dd>
12221222
</dl>
12231223
</dd>
@@ -1328,7 +1328,7 @@ client.graph.add(
13281328
<dl>
13291329
<dd>
13301330

1331-
Add data to the graph in batch mode (each episode processed concurrently). Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
1331+
Add data to the graph in batch mode, processing episodes concurrently. Use only for data that is insensitive to processing order.
13321332
</dd>
13331333
</dl>
13341334
</dd>

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

src/zep_cloud/graph/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def add(
144144
request_options: typing.Optional[RequestOptions] = None
145145
) -> Episode:
146146
"""
147-
Add data to the graph. Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
147+
Add data to the graph.
148148
149149
Parameters
150150
----------
@@ -219,7 +219,7 @@ def add_batch(
219219
request_options: typing.Optional[RequestOptions] = None
220220
) -> typing.List[Episode]:
221221
"""
222-
Add data to the graph in batch mode (each episode processed concurrently). Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
222+
Add data to the graph in batch mode, processing episodes concurrently. Use only for data that is insensitive to processing order.
223223
224224
Parameters
225225
----------
@@ -644,7 +644,7 @@ async def add(
644644
request_options: typing.Optional[RequestOptions] = None
645645
) -> Episode:
646646
"""
647-
Add data to the graph. Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
647+
Add data to the graph.
648648
649649
Parameters
650650
----------
@@ -727,7 +727,7 @@ async def add_batch(
727727
request_options: typing.Optional[RequestOptions] = None
728728
) -> typing.List[Episode]:
729729
"""
730-
Add data to the graph in batch mode (each episode processed concurrently). Note: each subscription tier has different limits on the amount of data that can be added to the graph please refer to the pricing page for more information.
730+
Add data to the graph in batch mode, processing episodes concurrently. Use only for data that is insensitive to processing order.
731731
732732
Parameters
733733
----------

0 commit comments

Comments
 (0)