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

Re-order the GenerativeModel convenience constructors in source #160

Merged
merged 1 commit into from
May 3, 2024

Conversation

andrewheard
Copy link
Collaborator

Moved the GenerativeModel convenience constructor accepting a systemInstruction: ModelContent? = nil above the one accepting systemInstruction: String... in GenerativeModel.swift. Xcode's autocomplete seems to order them based on the order they appear in the source file. Previously the first constructor listed appeared to require systemInstruction, which might mislead devs into thinking it is required.

Before:
Xcode Autocomplete Screenshot - Before

After:
Xcode Autocomplete Screenshot - After

Note: This is not a breaking change, only cosmetic, systemInstruction: nil has always been supported since being introduced in the https://github.com/google-gemini/generative-ai-swift/releases/tag/0.4.11.

@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 May 3, 2024
Copy link
Collaborator

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

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

LGTM on green

@andrewheard andrewheard merged commit fcc1084 into main May 3, 2024
9 checks passed
@andrewheard andrewheard deleted the ah/reorder-constructors branch May 3, 2024 16:14
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label May 3, 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

2 participants