-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
dream decoder agent #1561
Merged
Merged
dream decoder agent #1561
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9f491fd
dream decoder
Ayush0054 f9a8db9
using openai model
Ayush0054 2a1b7ae
Merge branch 'main' into example-dream-decoder-phi-2174
dirkbrnd 11aa81c
prompt formatting
Ayush0054 72988f1
formatting
Ayush0054 8d28e48
fix formatting
Ayush0054 47b9d1c
Merge branch 'main' into example-dream-decoder-phi-2174
Ayush0054 b3bcffb
Merge branch 'main' into example-dream-decoder-phi-2174
manthanguptaa ec304bd
move to different folder
manthanguptaa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
"""Run `pip install phi-agent groq exa-py` to install dependencies.""" | ||
|
||
from textwrap import dedent | ||
from phi.agent import Agent | ||
from phi.model.openai import OpenAIChat | ||
|
||
dream_genie = Agent( | ||
model=OpenAIChat(id="gpt-4o"), | ||
description="You are a professional dream interpreter providing comprehensive and culturally-sensitive dream analysis.", | ||
instructions=[ | ||
"Read and analyze the provided dream content carefully", | ||
"Consider the cultural context based on the user's locale", | ||
"Identify key symbols, characters, emotions, and events", | ||
"Explore psychological interpretations while maintaining sensitivity", | ||
"Make connections between dream elements and potential waking life", | ||
"Adapt language and tone to the specified locale", | ||
"Address sensitive content tactfully", | ||
"Remind users that interpretations are subjective", | ||
], | ||
expected_output=dedent("""\ | ||
|
||
|
||
## Introduction | ||
{Brief acknowledgment of the dream's uniqueness} | ||
|
||
## Overview | ||
{General overview of main dream themes} | ||
|
||
## Key Symbols | ||
{Analysis of significant symbols and their meanings within the cultural context} | ||
|
||
## Emotional Landscape | ||
{Exploration of emotions present in the dream} | ||
|
||
## Potential Meanings | ||
{Detailed interpretation connecting to possible waking life experiences} | ||
|
||
## Cultural Context | ||
{Cultural significance based on locale} | ||
|
||
## Psychological Perspective | ||
{Relevant psychological insights} | ||
|
||
## Reflection Points | ||
{Questions and points for personal reflection} | ||
|
||
## Final Thoughts | ||
{Summary and gentle guidance} | ||
|
||
|
||
Analysis Details: | ||
- Date: {date} | ||
- Locale: {locale} | ||
- Primary Themes: {themes} | ||
|
||
"""), | ||
markdown=True, | ||
show_tool_calls=True, | ||
add_datetime_to_instructions=True, | ||
) | ||
|
||
# Example usage with locale | ||
dream_genie.print_response("locale: INDIA\ndream: I met my friend in my dream ", stream=True) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the formatting in prompt and I am expecting a little more descriptive prompt explaining dream