-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix not working with Gemini models #2021
base: main
Are you sure you want to change the base?
Conversation
@Dev-Khant Gemini will not be available for now, I hope you consider and merge it soon if possible. |
@spike-spiegel-21 @Dev-Khant While working on the library I resolved some related bugs so that Gemini could work with |
elif self.llm_provider == "gemini": | ||
# The `noop` function n should be removed because it is unnecessary | ||
# and causes the error: "should be non-empty for OBJECT type" | ||
_tools = [UPDATE_MEMORY_TOOL_GRAPH, ADD_MEMORY_TOOL_GRAPH] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to add a noop
function here seems unnecessary, and will return an error that the value in the object cannot be empty (from the Gemini related library).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @lh0x00 we want to keep the noop
operation as it is present for all the llms, so is there a workaround for this? Because removing this would be inconsistent.
@Dev-Khant I updated to resolve test fails. |
Is this PR still under consideration my friends? @Dev-Khant @spike-spiegel-21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lh0x00 Why is there a need for removing code block from the generated response? Can you please elaborate more on this?
Description
This PR's did the following:
gemini
in LLM's provider check.noop
, updated function to parse function calls returning Gemini (based on their source code/docs).All tested by my app working properly again.
Type of change
Please delete options that are not relevant.