Skip to content

Conversation

cabljac
Copy link
Contributor

@cabljac cabljac commented Sep 11, 2024

This is a workaround for an issue with the Google AI Gemini API - aiming to resolve #703

In this PR we disable explicit json mode (adding responseMimeType to the request) if tools are specified.

This stops the error, but Gemini doesn't seem to call declared functions if Genkit provides a schema.

Checklist (if applicable):

  • Tested (manually, unit tested, etc.)
  • Changelog updated
  • Docs updated

@cabljac cabljac marked this pull request as ready for review September 12, 2024 08:35
@cabljac cabljac mentioned this pull request Sep 12, 2024
3 tasks
@cabljac cabljac force-pushed the @invertase/function-calling-json-mode branch from 9ef96ae to 92deeb7 Compare September 12, 2024 17:34
@cabljac cabljac requested a review from pavelgj September 12, 2024 17:40
@cabljac cabljac merged commit 8865e7d into main Sep 17, 2024
4 checks passed
@cabljac cabljac deleted the @invertase/function-calling-json-mode branch September 17, 2024 07:05
@cabljac cabljac restored the @invertase/function-calling-json-mode branch September 23, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug] gemini-1.5-pro-latest returns error when combining tools and output schema
2 participants