Currently the response from gemini is parsed into a dict which is passed as the generation_info to a ChatGeneration object. However, this is missing a key piece of information useful for debugging when function calls fail when using function calling via the bind_tools syntax which is the finish_message. The finish message is populated with information about the malformed function call in the case of MALFORMED_FUNCTION_CALL errors. This PR simply adds this field when available to the dictionary passed back.
Relevant issues
None
Type
🆕 New Feature
Changes(optional)
Added in finish_message field to the generation_info in the case of a gemini model invocation.
PR Description
Currently the response from gemini is parsed into a dict which is passed as the
generation_info
to aChatGeneration
object. However, this is missing a key piece of information useful for debugging when function calls fail when using function calling via thebind_tools
syntax which is thefinish_message
. The finish message is populated with information about the malformed function call in the case ofMALFORMED_FUNCTION_CALL
errors. This PR simply adds this field when available to the dictionary passed back.Relevant issues
None
Type
🆕 New Feature
Changes(optional)
Added in
finish_message
field to thegeneration_info
in the case of a gemini model invocation.