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 Resource #96

Merged
merged 2 commits into from
Jan 15, 2025
Merged

Add Gemini Resource #96

merged 2 commits into from
Jan 15, 2025

Conversation

shimon-cherrypick
Copy link
Contributor

Summary & Motivation

  • This PR adds support for the GeminiResource. In addition to wrapping the Gemini client ("GenerativeModel"), the resource will also automatically log usage-metadata (calls and tokens) to the AssetMetadata.

How I Tested These Changes

  • Created mock-tests - testing both the get_model functionality, and the wrapping of the Gemini.generate_content call for metadata-logging (following as closely as possible the example of dagster-openai tests).
  • Tested the resource against the real Gemini API, making sure that the usage stats are logged to the AssetMetadata.

Changelog

Ensure that an entry has been created in CHANGELOG.md outlining additions, deletions, and/or modifications.

See: keepachangelog.com

@cmpadden cmpadden merged commit d173132 into dagster-io:main Jan 15, 2025
1 check passed
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