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

[Vertex AI] Simplify ModelContent initializers #13832

Merged
merged 21 commits into from
Oct 7, 2024

Conversation

andrewheard
Copy link
Contributor

@andrewheard andrewheard commented Oct 7, 2024

The ModelContent initializer with some PartsRepresentable offers a strict subset of the calls possible with the variadic parameter version.

The array of PartsRepresentable doesn't gain anything over the variadic parameter version, and can actually lead to compiler confusion and require awkward casting.

andrewheard and others added 18 commits October 4, 2024 18:33
# Conflicts:
#	FirebaseVertexAI/Sources/GenerativeModel.swift
The initialzer with `some PartsRepresentable` offers a strict subset of
the calls possible with the variadic parameter version.

The array of PartsRepresentable doesn't gain anything over the
variadic parameter version, and can actually lead to compiler
confusion and require awkward casting.
…s-fixes

# Conflicts:
#	FirebaseVertexAI/Sample/FunctionCallingSample/ViewModels/FunctionCallingViewModel.swift
#	FirebaseVertexAI/Sources/GenerateContentResponse.swift
#	FirebaseVertexAI/Sources/ModelContent.swift
#	FirebaseVertexAI/Sources/Types/Internal/InternalPart.swift
#	FirebaseVertexAI/Sources/Types/Public/Part.swift
#	FirebaseVertexAI/Tests/Integration/IntegrationTests.swift
#	FirebaseVertexAI/Tests/Unit/GenerativeModelTests.swift
#	FirebaseVertexAI/Tests/Unit/VertexAIAPITests.swift
@andrewheard andrewheard added this to the 11.4.0 - M155 milestone Oct 7, 2024
@andrewheard andrewheard marked this pull request as ready for review October 7, 2024 20:31
@andrewheard
Copy link
Contributor Author

Thanks @ryanwilson for figuring this out!

@andrewheard andrewheard merged commit 3df0883 into main Oct 7, 2024
38 checks passed
@andrewheard andrewheard deleted the rw-vertex-initializers-fixes branch October 7, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants