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

Allow for a simpler way to set system instructions #149

Merged
merged 1 commit into from Apr 29, 2024

Conversation

peterfriese
Copy link
Collaborator

This change allows developers to write

model = GenerativeModel(name: "gemini-1.0-pro", apiKey: APIKey.default, systemInstruction: "Talk like a pirate")

instead of

model = GenerativeModel(name: "gemini-1.0-pro", apiKey: APIKey.default, systemInstruction: ModelContent(role: "system", parts: "Talk like a pirate"))

Signed-off-by: Peter Friese <peter@peterfriese.de>
@github-actions github-actions bot added component:swift sdk Issue/PR related to Swift SDK status:awaiting review PR awaiting review from a maintainer labels Apr 29, 2024
Copy link
Collaborator

@andrewheard andrewheard left a comment

Choose a reason for hiding this comment

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

Thanks, Peter!

@andrewheard
Copy link
Collaborator

Since this isn't a breaking change, I think it would be reasonable to do a quick 0.5.1 patch to make sure our new docs will match the latest release. So I wouldn't forget, I updated the version in #150.

@andrewheard andrewheard merged commit e195730 into main Apr 29, 2024
9 checks passed
@andrewheard andrewheard deleted the peterfriese/systeminstructions-simplify branch April 29, 2024 19:04
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:swift sdk Issue/PR related to Swift SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants