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 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 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
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