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] Replace ModelContent.Part enum with protocol/structs #13767

Merged
merged 16 commits into from
Oct 7, 2024

Conversation

andrewheard
Copy link
Contributor

@andrewheard andrewheard commented Oct 1, 2024

Replaced the ModelContent.Part enum with a protocol named Part. Since switch statements over enums in Swift need to be exhaustive, this has been done to avoid future breaking changes as new types of parts are added for input to, or output from, the model.

The existing enum cases have been replaced with the following types:

  • TextPart
  • InlineDataPart
  • FileDataPart
  • FunctionCallPart
  • FunctionResponsePart

Note: TODOs and additional documentation will be addressed in follow-up PRs since they don't impact the public API.

@google-oss-bot
Copy link

google-oss-bot commented Oct 1, 2024

1 Warning
⚠️ New public headers were added, did you remember to add them to the umbrella header?

Generated by 🚫 Danger

@andrewheard andrewheard force-pushed the ah/vertex-part-struct branch from ec2001f to afda484 Compare October 3, 2024 17:09
@andrewheard andrewheard force-pushed the ah/vertex-part-struct branch from 011b13d to ba223a9 Compare October 4, 2024 22:46
@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 16:11
@andrewheard andrewheard requested a review from paulb777 October 7, 2024 16:33
@andrewheard andrewheard merged commit f27e34d into main Oct 7, 2024
50 checks passed
@andrewheard andrewheard deleted the ah/vertex-part-struct branch October 7, 2024 19:38
MojtabaHs pushed a commit to MojtabaHs/firebase-ios-sdk that referenced this pull request Oct 17, 2024
@firebase firebase locked and limited conversation to collaborators Nov 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants