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

feat: add support for parameters in gemini models #137

Merged
merged 14 commits into from
Apr 22, 2024

Conversation

KaustubhKumar05
Copy link
Contributor

@KaustubhKumar05 KaustubhKumar05 commented Apr 16, 2024

  • use startChat conditionally since it is not supported by gemini-1.5-pro
image

Copy link

changeset-bot bot commented Apr 16, 2024

🦋 Changeset detected

Latest commit: b858f80

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@empiricalrun/ai Minor
@empiricalrun/core Patch
@empiricalrun/scorer Patch
@empiricalrun/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@KaustubhKumar05 KaustubhKumar05 marked this pull request as draft April 16, 2024 04:48
@KaustubhKumar05 KaustubhKumar05 marked this pull request as ready for review April 16, 2024 05:04
packages/ai/src/providers/google/index.ts Outdated Show resolved Hide resolved
packages/ai/src/providers/google/index.ts Outdated Show resolved Hide resolved
packages/ai/src/providers/google/index.ts Show resolved Hide resolved
.changeset/big-files-allow.md Outdated Show resolved Hide resolved
});
return (
isBetaModel
? modelInstance.generateContent({ contents })
Copy link
Member

Choose a reason for hiding this comment

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

should we do a spread on model parameters for the generateContent call as well?

given the code is a bit hairy, this could use a test that just ensures we never regress on scenarios. setting up the test is easy (since we have a few examples now). but will need additional config on the CI to set the environment variable for GOOGLE_API_KEY. will leave it up to you whether you want to add the test - not a blocker

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would be better to have the test. Will update this today. Missed the notifications earlier

Copy link
Member

Choose a reason for hiding this comment

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

cool, call me if you need help in setting up test + CI

Copy link
Contributor Author

@KaustubhKumar05 KaustubhKumar05 Apr 20, 2024

Choose a reason for hiding this comment

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

Added the tests, will need help adding the API key

Co-authored-by: Arjun Attam <arjunattam@gmail.com>
Copy link
Contributor

github-actions bot commented Apr 20, 2024

Empirical Run Summary

Stats Run #0d56: gpt-3.5-turbo Run #713d: gpt-4-turbo-preview
outputs 100% 100%
is-json 100% 100%

Total dataset samples: 2

@saikatmitra91 saikatmitra91 changed the title feat: use startChat API for google LLMs feat: add support for parameters in gemini models Apr 22, 2024
@saikatmitra91 saikatmitra91 merged commit 66cddb3 into main Apr 22, 2024
3 checks passed
@saikatmitra91 saikatmitra91 deleted the feat/google-start-chat-api branch April 22, 2024 10:39
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