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 Gemini Driver #16

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

yoavf
Copy link
Contributor

@yoavf yoavf commented Oct 9, 2024

This adds a Gemini driver with support for:

  • System messages
  • Function calling

Fixes #4

This adds the Gemini driver, including system message and tool support
This adds tests for the following cases:

- Simple text generation
- Generation with system prompt
- Generation with multiple tools and steps
Failures due to
- Invalid model
- Missing API Key
config/prism.php Outdated
@@ -15,6 +15,11 @@
'api_key' => env('ANTHROPIC_API_KEY'),
'version' => env('ANTHROPIC_API_VERSION', '2023-06-01'),
],
'gemini' => [
Copy link
Contributor

@pushpak1300 pushpak1300 Oct 10, 2024

Choose a reason for hiding this comment

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

Do you think driver should be called Google Driver as that's the same convention everywhere ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Google" felt a bit too generic to me, but I don't have a super strong opinion about this. I'll leave it to @sixlive to make the call.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm honestly a little torn, so far we've used organization names as driver names, e.x. Anthropic and OpenAI. This library takes heavy inspiration from the Vercel AI SDK and it looks like they also call their provider google.

I lets go with Google for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done :)

@sixlive
Copy link
Contributor

sixlive commented Oct 10, 2024

Give me a day or so to review this and let it simmer.

@petervandijck
Copy link

Is this still being worked on? I'm waiting to start using prism once it supports gemini (and streaming chat)

@sixlive
Copy link
Contributor

sixlive commented Oct 22, 2024

I churned a whole bunch with recent refactors. Worst case I'll make sure to get a Gemini provider knocked out this weekend.

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.

Gemini Support
4 participants