Skip to content

Commit

Permalink
fix: starter pack live api async tool calls
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasecchig committed Jan 31, 2025
1 parent 2ad194b commit 526a7eb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def receive_from_client(self) -> None:
def _get_func(self, action_label: str) -> Optional[Callable]:
"""Get the tool function for a given action label."""
return None if action_label == "" else self.tool_functions.get(action_label)

async def _handle_tool_call(
self, session: Any, tool_call: LiveServerToolCall
) -> None:
Expand Down Expand Up @@ -121,7 +121,7 @@ async def receive_from_gemini(self) -> None:
message = types.LiveServerMessage.model_validate(json.loads(result))
except ValidationError:
continue

if message.tool_call:
tool_call = LiveServerToolCall.model_validate(message.tool_call)
# Create task for handling tool call
Expand Down

0 comments on commit 526a7eb

Please sign in to comment.