-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab3ead2
commit a1e9065
Showing
3 changed files
with
7 additions
and
3 deletions.
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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
from phi.agent import Agent | ||
from phi.model.google import Gemini | ||
from google.generativeai import upload_file | ||
|
||
agent = Agent( | ||
model=Gemini(id="gemini-2.0-flash-exp"), | ||
markdown=True, | ||
) | ||
|
||
# Please upload the audio file using | ||
audio_file = upload_file("sample_audio.mp3") | ||
print(f"Uploaded audio: {audio_file}") | ||
|
||
# Please download a sample audio file to test this Agent | ||
agent.print_response( | ||
"Tell me about this audio", | ||
audio={"data": "cookbook/providers/google/sample_audio.mp3"}, | ||
audio=[audio_file], | ||
stream=True, | ||
) |
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
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