Skip to content
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

vertexai: add finish message when available to the response object from gemini … #595

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

nanodan
Copy link
Contributor

@nanodan nanodan commented Nov 8, 2024

PR Description

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.

@nanodan
Copy link
Contributor Author

nanodan commented Nov 11, 2024

I can't see the results of the build to see why this is failing, all my local tests complete successfully, and this is a very minor change.

@lkuligin lkuligin merged commit f199127 into langchain-ai:main Nov 14, 2024
14 of 15 checks passed
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.

2 participants