Skip to content

Commit

Permalink
Function Calling Support for Gemini - Part 2 (#3726)
Browse files Browse the repository at this point in the history
* Added function calling support to GeminiClient

* Appending a continue message from model to alternate between user and model

* Fixed cost calculation to include <128K costing and new 1.5-flash model. Added test case for function_call.

* Add notebook with samples for Gemini

* Updated test case

* Fix to handle not dict response in function call

* Handle non dict function results and append dummy model message between function response and user message

* Fixing message order in gemini

* Append text as multiple parts instead of test concatenation

* Raising error for Union data types in function parameter

* Delete default key

* Update gemini.py for multiple tool calls + pre-commit formatting

* no function role

* start adding function calling config

* do not serialize tool_config

* improve tool config parsing

* add hint

* improve function calling config

* removunnecessary comments

* try removing allowed function names in tool config conversion

* fix tool config parsing with empty tools list

* improve logging and case handling with vertexai tool config parsing

* reset file

* check if text is in part

* fix empty part checking case

* fix bug with attribute handling

* skip test if gemini deps are not installed

---------

Co-authored-by: Arjun G <arjun@arjun-g.com>
Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Mark Sze <66362098+marklysze@users.noreply.github.com>
  • Loading branch information
5 people authored Oct 10, 2024
1 parent 3ebd7ae commit 32022b2
Show file tree
Hide file tree
Showing 4 changed files with 1,290 additions and 94 deletions.
Loading

0 comments on commit 32022b2

Please sign in to comment.