Skip to content

feat: add state/tool context management to live api#49

Merged
Ruthvik-1411 merged 2 commits intomainfrom
gemini_live_custom
Sep 28, 2025
Merged

feat: add state/tool context management to live api#49
Ruthvik-1411 merged 2 commits intomainfrom
gemini_live_custom

Conversation

@Ruthvik-1411
Copy link
Owner

Resolves #48
Changelog:

  1. Add basic state management for the live api boilerplate.
  2. Added ToolContext a dict management class which handles setting, getting and clearing of the dict access to the high level functions in tool_context.py.
  3. Functions can now read and update the shared tool context which is created per websocket session.
    • If they accept a ToolContext we ignore this argument when creating the function declaration using @function_tool.
    • If a function needs to use the tool context, it should define the tool context as a Mandatory Argument, not Optional.
  4. Updated app.py to send the tool context each time when a function call is invoked.
    • Inside the call_function we check if the function being called uses the ToolContext by calling accepts_tool_context and then update the args accordingly to send the current context along with the existing args provided by the llm.

@Ruthvik-1411 Ruthvik-1411 merged commit 4d670ff into main Sep 28, 2025
2 checks passed
@Ruthvik-1411 Ruthvik-1411 deleted the gemini_live_custom branch September 28, 2025 17:47
@Ruthvik-1411 Ruthvik-1411 restored the gemini_live_custom branch September 28, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement basic state management for gemini live boilerplate

1 participant