Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add license file #222

Merged
merged 60 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
efe616c
SDK regeneration
fern-api[bot] Jun 19, 2024
92bcc24
SDK regeneration
fern-api[bot] Jun 24, 2024
21a843d
SDK regeneration
fern-api[bot] Jul 2, 2024
2b4570f
chore: Bump version
paul-paliychuk Jul 2, 2024
a9d3121
Merge branch 'main' of github.com:getzep/zep-python into v2
paul-paliychuk Jul 15, 2024
46d49b3
chore: Bump version
paul-paliychuk Jul 15, 2024
2982f0f
SDK regeneration
fern-api[bot] Jul 15, 2024
20ae792
SDK regeneration
fern-api[bot] Jul 15, 2024
a1b05c6
SDK regeneration
fern-api[bot] Jul 15, 2024
b7ac992
feat: Update memory example to include latest api
paul-paliychuk Jul 18, 2024
b157c70
fix: Decrease sleep in example
paul-paliychuk Jul 18, 2024
5021730
SDK regeneration
fern-api[bot] Jul 22, 2024
5671a6f
Merge branch 'main' of github.com:getzep/zep-python into v2
paul-paliychuk Jul 22, 2024
2abca09
SDK regeneration
fern-api[bot] Jul 25, 2024
56273ca
Merge branch 'main' of github.com:getzep/zep-python into v2
paul-paliychuk Jul 25, 2024
4bb402a
chore: Bump version
paul-paliychuk Jul 25, 2024
8695157
SDK regeneration
fern-api[bot] Sep 20, 2024
85321a0
SDK regeneration
fern-api[bot] Sep 20, 2024
639a68b
SDK regeneration
fern-api[bot] Oct 15, 2024
23bcbd7
SDK regeneration
fern-api[bot] Oct 15, 2024
c57436a
SDK regeneration
fern-api[bot] Oct 15, 2024
ff03639
SDK regeneration
fern-api[bot] Oct 15, 2024
5d0fc8d
SDK regeneration
fern-api[bot] Oct 15, 2024
1a8d497
SDK regeneration
fern-api[bot] Oct 15, 2024
093d45d
chore: Add graph example
paul-paliychuk Oct 15, 2024
366a8f0
Merge branch 'v2' of github.com:getzep/zep-python into v2
paul-paliychuk Oct 15, 2024
e1dc9e4
SDK regeneration
fern-api[bot] Oct 15, 2024
76c9723
SDK regeneration
fern-api[bot] Oct 15, 2024
a9ccff7
SDK regeneration
fern-api[bot] Oct 15, 2024
e312f00
SDK regeneration
fern-api[bot] Oct 15, 2024
dd57c52
chore: Update graph examples
paul-paliychuk Oct 15, 2024
da7e07d
add get facts call
paul-paliychuk Oct 15, 2024
3166fc4
fix: examples
paul-paliychuk Oct 15, 2024
44e330b
chore: fix memory example
paul-paliychuk Oct 15, 2024
96b9691
SDK regeneration
fern-api[bot] Oct 15, 2024
4a278f3
SDK regeneration
fern-api[bot] Oct 15, 2024
668902a
update examples
paul-paliychuk Oct 15, 2024
1e5ba56
SDK regeneration
fern-api[bot] Oct 15, 2024
0a5a1ae
Merge branch 'v2' of github.com:getzep/zep-python into v2
paul-paliychuk Oct 15, 2024
b1953cd
SDK regeneration
fern-api[bot] Oct 15, 2024
f018faa
SDK regeneration
fern-api[bot] Oct 15, 2024
8b5ca14
SDK regeneration
fern-api[bot] Oct 15, 2024
0be7dab
SDK regeneration
fern-api[bot] Oct 15, 2024
251abdb
SDK regeneration
fern-api[bot] Oct 16, 2024
3c339d3
update sleep times
paul-paliychuk Oct 16, 2024
348fda6
SDK regeneration
fern-api[bot] Oct 16, 2024
361f93b
SDK regeneration
fern-api[bot] Oct 16, 2024
d071330
SDK regeneration
fern-api[bot] Oct 17, 2024
a5aeced
SDK regeneration
fern-api[bot] Oct 18, 2024
93603d0
chore: version bump
paul-paliychuk Oct 18, 2024
81533a3
chore: cleaup comments
paul-paliychuk Oct 18, 2024
f6979a8
remove langchain component
paul-paliychuk Oct 18, 2024
1adddfe
remove langchain example
paul-paliychuk Oct 18, 2024
bb78551
SDK regeneration
fern-api[bot] Oct 18, 2024
924799d
Merge branch 'main' of github.com:getzep/zep-python into v2
paul-paliychuk Oct 18, 2024
daa1d19
poetry lock
paul-paliychuk Oct 18, 2024
f62d1f1
SDK regeneration
fern-api[bot] Oct 18, 2024
5953525
chore: add back license file
paul-paliychuk Oct 18, 2024
2ea371d
Merge branch 'main' of github.com:getzep/zep-python into v2
paul-paliychuk Oct 18, 2024
3f8e6bc
chore: Add license file
paul-paliychuk Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ poetry.lock
README.md
.github
Makefile
LICENSE
.gitignore
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ dist/
.mypy_cache/
__pycache__/
poetry.toml
.idea/
.vscode/
*.env
.venv/
venv/
6 changes: 3 additions & 3 deletions examples/chat_history/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async def main() -> None:
await client.memory.add(session_id=session_id, messages=[Message(**m)])

# Wait for the messages to be processed
await asyncio.sleep(5)
await asyncio.sleep(20)

# Synthesize a question from most recent messages.
# Useful for RAG apps. This is faster than using an LLM chain.
Expand Down Expand Up @@ -100,7 +100,7 @@ async def main() -> None:

# Get Memory for session
print(f"\n---Get Perpetual Memory for Session: {session_id}")
memory = await client.memory.get(session_id, memory_type="perpetual")
memory = await client.memory.get(session_id)
print(f"Memory: {memory}")
print("\n---End of Memory")

Expand All @@ -115,7 +115,7 @@ async def main() -> None:
query = "What are Jane's favorite shoe brands?"
print(f"\n---Searching over facts for: '{query}'")
facts_result = await client.memory.search_sessions(
session_ids=[session_id], text=query, search_scope="facts"
user_id=user_id, text=query, search_scope="facts"
)
print("facts_result: ", facts_result)

Expand Down
289 changes: 289 additions & 0 deletions examples/graph_example/conversations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
history = [
# Conversation 1: Japan
[
{
"role": "Paul",
"role_type": "user",
"content": "Hi, I'm planning a vacation to Japan. Can you give me some advice?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Of course! Japan is a fascinating destination. Are you more interested in modern cities like Tokyo, or historical sites like Kyoto?",
},
{
"role": "Paul",
"role_type": "user",
"content": "I think I'd like to experience both. Can you suggest an itinerary?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Certainly! You could start with 3 days in Tokyo, then take the bullet train to Kyoto for 3 days. This way, you'll experience both the modern and traditional aspects of Japan.",
},
{
"role": "Paul",
"role_type": "user",
"content": "That sounds perfect! What are some must-visit places in Tokyo?",
},
],
# Conversation 2: Italy
[
{
"role": "Paul",
"role_type": "user",
"content": "I'm thinking about visiting Italy next summer. Any recommendations?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Italy is a wonderful choice! Are you more interested in art and history, or would you prefer to focus on food and wine experiences?",
},
{
"role": "Paul",
"role_type": "user",
"content": "I love both, but I think I'm leaning towards the food and wine experiences.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Great! In that case, you might want to consider regions like Tuscany or Emilia-Romagna. Would you like more information about these areas?",
},
{
"role": "Paul",
"role_type": "user",
"content": "Yes, please tell me more about Tuscany. What are some must-try dishes and wines there?",
},
],
[
{
"role": "Paul",
"role_type": "user",
"content": "Apples are my favorite fruit",
},
{
"role": "Paul",
"role_type": "user",
"content": "now bananas are my favorite fruit",
},
{
"role": "Paul",
"role_type": "user",
"content": "I went to Eric Clapton's concert last night",
},
],
[
{
"role": "Paul",
"role_type": "user",
"content": "I'm thinking about taking a road trip across the United States. Any suggestions?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "That sounds exciting! A cross-country road trip can be an amazing experience. Do you have any specific regions or landmarks you'd like to see?",
},
{
"role": "Paul",
"role_type": "user",
"content": "I'd love to see some national parks and maybe hit a few major cities. I'm starting from New York.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Great! How about a route that takes you through some major cities and national parks? We could plan a route from New York to California, hitting spots like Chicago, Yellowstone, and the Grand Canyon along the way.",
},
{
"role": "Paul",
"role_type": "user",
"content": "That sounds perfect! How long do you think a trip like that would take?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "A trip like that could take anywhere from 2-4 weeks, depending on how much time you want to spend at each location. Would you prefer a faster-paced trip or a more leisurely one?",
},
{
"role": "Paul",
"role_type": "user",
"content": "I think I'd prefer a more leisurely pace. Let's aim for about 3 weeks. Can you break down a potential itinerary?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Certainly! Here's a rough 3-week itinerary: Days 1-2: New York to Chicago, Days 3-4: Chicago, Days 5-7: Drive to and explore Yellowstone, Days 8-10: Drive to and explore Grand Canyon, Days 11-13: Las Vegas and Death Valley, Days 14-16: Drive to and explore Yosemite, Days 17-19: San Francisco, Days 20-21: Drive down the Pacific Coast Highway to Los Angeles.",
},
{
"role": "Paul",
"role_type": "user",
"content": "That sounds amazing! What kind of vehicle would you recommend for a trip like this?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "For a long road trip like this, comfort and reliability are key. A mid-size SUV could be a good choice. It offers space for luggage, comfort for long drives, and can handle various road conditions you might encounter in national parks.",
},
{
"role": "Paul",
"role_type": "user",
"content": "Good idea. Are there any specific preparations I should make for the national parks?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Absolutely! For national parks, it's a good idea to get an America the Beautiful Pass, which covers entrance fees to all national parks for a year. Also, make reservations for campsites or lodges well in advance, especially for popular parks like Yellowstone and Yosemite.",
},
{
"role": "Paul",
"role_type": "user",
"content": "Great tip about the pass! What about food? Should I plan to cook or eat out mostly?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "A mix of both can be good. In cities, you'll want to try local cuisines. For national parks, having some cooking equipment can save money and be convenient. Maybe plan to cook simple meals while camping and eat out in cities or when you want to treat yourself.",
},
{
"role": "Paul",
"role_type": "user",
"content": "That makes sense. Are there any must-try foods in the cities we'll be visiting?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Absolutely! In Chicago, try deep-dish pizza and a Chicago-style hot dog. In San Francisco, don't miss the clam chowder in a sourdough bread bowl at Fisherman's Wharf. Las Vegas has world-class restaurants from celebrity chefs. And in Los Angeles, try some authentic tacos or Korean BBQ.",
},
{
"role": "Paul",
"role_type": "user",
"content": "Yum! Now, what about budgeting? How much should I expect to spend on a trip like this?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Budget can vary widely, but for a 3-week trip, you might budget around $4000-$6000 for one person. This would cover gas, accommodations, food, and some activities. You can save by camping in national parks and cooking some meals, or spend more for hotels and restaurants.",
},
{
"role": "Paul",
"role_type": "user",
"content": "That's helpful, thanks. Last question: what are some essential items I shouldn't forget to pack?",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Great question! Don't forget: a good map or GPS, first-aid kit, flashlight, multi-tool, reusable water bottles, sunscreen, insect repellent, comfortable hiking shoes, and layers of clothing for various climates. Also, a camera to capture memories, and portable chargers for your devices.",
},
{
"role": "Paul",
"role_type": "user",
"content": "Perfect, I think I'm all set to start planning in detail. Thanks for all your help!",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "You're welcome, Paul! Enjoy your epic road trip across the US. Don't hesitate to ask if you need any more advice as you plan. Safe travels!",
},
],
[
{
"role": "Alex",
"role_type": "user",
"content": "Hi there! I thought I'd share some facts about myself today.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "That's great, Alex! I'd love to learn more about you. Please, go ahead and share whatever you're comfortable with.",
},
{
"role": "Alex",
"role_type": "user",
"content": "Well, I'm 28 years old and I work as a software engineer at a tech startup.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "That's interesting! Software engineering is a dynamic field. How long have you been working in this role?",
},
{
"role": "Alex",
"role_type": "user",
"content": "I've been in this role for about 3 years now. Before that, I studied Computer Science at UCLA.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "UCLA is a great school! Do you have any hobbies or interests outside of work?",
},
{
"role": "Alex",
"role_type": "user",
"content": "Yes, I'm really into rock climbing. I try to go to the climbing gym at least twice a week, and I love outdoor climbing trips when I can manage them.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Rock climbing sounds exciting! It's a great way to stay active and challenge yourself. Have you been on any memorable climbing trips recently?",
},
{
"role": "Alex",
"role_type": "user",
"content": "Actually, yes! I just got back from a trip to Joshua Tree National Park. The rock formations there are amazing for bouldering.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Joshua Tree is beautiful! It's wonderful that you can combine your love for the outdoors with your hobby. Do you have any other interests or things you're passionate about?",
},
{
"role": "Alex",
"role_type": "user",
"content": "I'm also really into cooking. I love trying out new recipes, especially dishes from different cultures. Last week, I attempted to make sushi for the first time!",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Cooking is a great skill to have! How did your sushi-making attempt go? It can be quite challenging for beginners.",
},
{
"role": "Alex",
"role_type": "user",
"content": "It was definitely a learning experience! The rolls weren't as tight as I'd like, but the flavor was good. I'm determined to keep practicing.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "That's a great attitude! Practice makes perfect. Is there anything else you'd like to share about yourself?",
},
{
"role": "Alex",
"role_type": "user",
"content": "Well, I'm originally from Boston, but I moved to San Francisco for work about 5 years ago. I love the tech scene here, but I do miss the changing seasons back east.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Moving across the country is a big change! San Francisco and Boston are quite different. Do you get to visit your hometown often?",
},
{
"role": "Alex",
"role_type": "user",
"content": "I try to go back for the holidays each year. Oh, and I should mention, I have a rescue dog named Pixel. She's a mix of who-knows-what, but she's the best companion I could ask for.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "Pixel sounds lovely! Rescue dogs often make the most loyal companions. Does she join you on any of your outdoor adventures?",
},
{
"role": "Alex",
"role_type": "user",
"content": "She does! Pixel loves hiking, and she's even been camping with me a few times. She's not much for rock climbing though - she prefers to watch from the ground.",
},
{
"role": "assistant",
"role_type": "assistant",
"content": "It's great that you and Pixel can share outdoor experiences together. Thank you for sharing all these interesting facts about yourself, Alex. You seem to lead a rich and varied life!",
},
],
]
Loading