Skip to content

Conversation

foxy17
Copy link
Contributor

@foxy17 foxy17 commented Apr 23, 2025

Adds the initial implementation for the Google Generative AI provider (@voltagent/google-ai).

This includes:

  • GoogleGenAIProvider class implementing LLMProvider.
  • Integration with the @google/genai SDK.
  • Implementation of generateText.
  • Stubs for streamText, generateObject, and streamObject.
  • Configuration handling via GoogleGenAIProviderOptions.
  • Basic build (tsup.config.ts, tsconfig.json) and package (package.json) setup.
  • Test cases for generate and stream functions

Adds the initial implementation for the Google Generative AI provider (`@voltagent/google-ai`).

This includes:
- `GoogleGenAIProvider` class implementing `LLMProvider`.
- Integration with the `@google/genai` SDK.
- Implementation of `generateText`.
- Stubs for `streamText`, `generateObject`, and `streamObject`.
- Configuration handling via `GoogleGenAIProviderOptions`.
- Basic build (`tsup.config.ts`, `tsconfig.json`) and package (`package.json`) setup.
foxy17 added 9 commits April 23, 2025 22:20
…pes and improve error handling

- Changed constructor to accept GoogleGenAIOptions instead of GoogleGenAIProviderOptions.
- Introduced GoogleGenerateTextOptions and GoogleStreamTextOptions for better type safety.
- Enhanced error handling for API key and Vertex AI configuration.
- Refactored stream processing methods to utilize new state management and improve clarity.
@foxy17 foxy17 marked this pull request as ready for review April 24, 2025 17:40
@foxy17 foxy17 requested a review from omeraplak April 24, 2025 17:41
@omeraplak
Copy link
Member

Hey @foxy17 ,
Thanks so much for the PR! 🙌 I’ll review it shortly and get back to you soon. ⚡

@omeraplak
Copy link
Member

Hey! If you’d like to add a changeset, that would be awesome but no pressure at all.
I can also add it for you if you prefer, just let me know!

Here’s a quick guide on how to create one:
https://voltagent.dev/docs/community/contributing/#creating-a-changeset

Thanks again for the contribution ⚡

@foxy17
Copy link
Contributor Author

foxy17 commented Apr 25, 2025

Hey! If you’d like to add a changeset, that would be awesome but no pressure at all. I can also add it for you if you prefer, just let me know!

Here’s a quick guide on how to create one: https://voltagent.dev/docs/community/contributing/#creating-a-changeset

Thanks again for the contribution ⚡

@omeraplak Added the changeset, let me know if anything else is needed. Waiting for this to be merge so that I can start working on the Generate Object and Stream object part!

@omeraplak omeraplak merged commit 82e27c2 into VoltAgent:main Apr 25, 2025
2 of 4 checks passed
@omeraplak
Copy link
Member

Thanks so much for the contribution! 🙌 Just merged really appreciate the effort.
Excited to keep building together! ⚡

@omeraplak omeraplak linked an issue Apr 25, 2025 that may be closed by this pull request
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.

Google AI (Gemini) Provider Integration
2 participants