-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Firebase AI] Add CodeExecution
tool support
#15280
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
Conversation
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.
Code Review
This pull request adds support for the CodeExecution
tool, enabling the model to generate and run Python code. The changes are well-implemented across the SDK, including updates to data models (Part
, ModelContent
, Tool
), addition of new log codes, and comprehensive unit and integration tests. The refactoring of the Tool
initializer is a nice improvement for future extensibility. I have one minor suggestion to improve consistency in parameter naming.
# Conflicts: # FirebaseAI/CHANGELOG.md # FirebaseAI/Sources/AILog.swift # FirebaseAI/Sources/ModelContent.swift
Generated by 🚫 Danger |
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.
LGTM pending todo's and optionally adding logging for unexpected fallbacks
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.
Code Review
This pull request adds support for the Code Execution tool, enabling the model to generate and run Python code. The changes are well-structured, introducing new types for executable code and its results, updating the Tool
configuration, and adding comprehensive unit and integration tests. The refactoring of the Tool
initializer is a good improvement. The implementation is robust, using safe unwrapping for optional values from the backend. Overall, this is a solid contribution.
Added support for the Code Execution tool that enables the model to generate and run Python code.