Skip to content

Update Gemini examples to use 2.0 flash and set empty tool call param… #63

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

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 examples/dynamic/insurance_gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ async def main():

stt = DeepgramSTTService(api_key=os.getenv("DEEPGRAM_API_KEY"))
tts = DeepgramTTSService(api_key=os.getenv("DEEPGRAM_API_KEY"), voice="aura-helios-en")
llm = GoogleLLMService(api_key=os.getenv("GOOGLE_API_KEY"), model="gemini-1.5-flash-latest")
llm = GoogleLLMService(api_key=os.getenv("GOOGLE_API_KEY"), model="gemini-2.0-flash-exp")

# Create initial context
messages = [
Expand Down
27 changes: 6 additions & 21 deletions examples/static/movie_explorer_gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,20 +313,14 @@ async def get_similar_movies(args: FlowArgs) -> Union[SimilarMoviesResult, Error
"name": "get_current_movies",
"handler": get_movies,
"description": "Fetch movies currently playing in theaters",
"parameters": {
"type": "object",
"properties": {},
},
"parameters": None, # Specify None for no parameters
"transition_to": "explore_movie",
},
{
"name": "get_upcoming_movies",
"handler": get_upcoming_movies,
"description": "Fetch movies coming soon to theaters",
"parameters": {
"type": "object",
"properties": {},
},
"parameters": None, # Specify None for no parameters
"transition_to": "explore_movie",
},
]
Expand Down Expand Up @@ -378,27 +372,18 @@ async def get_similar_movies(args: FlowArgs) -> Union[SimilarMoviesResult, Error
"name": "get_current_movies",
"handler": get_movies,
"description": "Show current movies in theaters",
"parameters": {
"type": "object",
"properties": {},
},
"parameters": None, # Specify None for no parameters
},
{
"name": "get_upcoming_movies",
"handler": get_upcoming_movies,
"description": "Show movies coming soon",
"parameters": {
"type": "object",
"properties": {},
},
"parameters": None, # Specify None for no parameters,
},
{
"name": "end_conversation",
"description": "End the conversation",
"parameters": {
"type": "object",
"properties": {},
},
"parameters": None, # Specify None for no parameters,
"transition_to": "end",
},
]
Expand Down Expand Up @@ -442,7 +427,7 @@ async def main():
voice_id="c45bc5ec-dc68-4feb-8829-6e6b2748095d", # Movieman
text_filter=MarkdownTextFilter(),
)
llm = GoogleLLMService(api_key=os.getenv("GOOGLE_API_KEY"), model="gemini-1.5-flash-latest")
llm = GoogleLLMService(api_key=os.getenv("GOOGLE_API_KEY"), model="gemini-2.0-flash-exp")

# Get initial tools
initial_tools = [
Expand Down
Loading