llm_tool_calling_firebase_ai 0.2.0
llm_tool_calling_firebase_ai: ^0.2.0 copied to clipboard
Use llm_tool_calling tools with Firebase AI Logic (firebase_ai). Turns generated tools into Gemini function declarations and runs the whole tool loop.
0.2.0 #
- Uses
ToolDefinition.invokefromllm_tool_calling0.6.0, so tools behave the same with every SDK.ToolConfirmationnow comes fromllm_tool_calling(still available through this package). - If a tool throws during firebase_ai's automatic function calling, Gemini
now gets a clear
error. - Requires
llm_tool_calling0.6.0.
0.1.1 #
- Works with
llm_tool_calling0.5.x (and still 0.3.x and 0.4.x). - Clearer package description: the adapter runs the whole tool loop.
0.1.0 #
- Initial release.
chat.sendMessageWithTools(message, allTools)runs the whole tool loop. Tested live withgemini-3.8-flash.toolResponses(results)sends tool results with the roleuser, because newer Gemini models reject thefunctionrole that firebase_ai'sContent.functionResponsesuses.allTools.toFirebaseAiTool()for firebase_ai's own automatic function calling (fails with newer models until firebase_ai releases flutterfire#18685; see the README).toFunctionDeclarations()andrespondTo(functionCall)for manual function calling.- Arguments are validated before anything runs; errors go back to Gemini.
- Tools with
requiresConfirmationonly run when aconfirmcallback approves them. - Tools with duplicate names are refused with an
ArgumentError, instead of firebase_ai silently keeping only one. - Re-exports
ToolDefinition,ToolArgumentExceptionand the other runtime types, so a model-setup file only needs firebase_ai and this package. toFirebaseJsonSchema()converts llm_tool_calling JSON schemas to firebase_aiJSONSchema, sent asparametersJsonSchema.