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

Add function_call on Google provider #144

Open
wants to merge 7 commits into
base: rcp/ToolCalling-P1
Choose a base branch
from

Conversation

vargacypher
Copy link

Fixes #141

@guilherme-vargas
Copy link

guilherme-vargas commented Dec 13, 2024

Just realize that when the tool_call history is passed in the second call to the model we have an error raised.
-->examples/~/aisuite/aisuite/providers/google_provider.py:116) if role := openai_roles_to_google_roles.get(message["role"], None): [117]examples/~/aisuite/aisuite/providers/google_provider.py:117) message.role = role [118]examples/~/aisuite/aisuite/providers/google_provider.py:118) return messages

I`m working to fix it.

@themrzmaster
Copy link

nice! any update on that?

@vargacypher
Copy link
Author

vargacypher commented Dec 17, 2024

I have solved the problem @themrzmaster , i just need to fix the tests and i'll commit the changes.

I pretend to do it today !!

@vargacypher vargacypher force-pushed the vargacypher/add-google-function-calling branch from 6e2d78d to 1e2533e Compare December 17, 2024 12:14
history.append(Content(role=role, parts=parts))

return history

def transform_roles(self, messages):
"""Transform the roles in the messages based on the provided transformations."""
openai_roles_to_google_roles = {
"system": "user",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It make sense map system message as user content ?

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.

3 participants