-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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] Make GenerativeModel
and Chat
into Swift actors
#13545
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andrewheard
force-pushed
the
ah/generative-model-actor
branch
from
September 3, 2024 19:07
82f98d1
to
d0db73c
Compare
paulb777
approved these changes
Sep 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement!
FirebaseVertexAI/Sample/FunctionCallingSample/ViewModels/FunctionCallingViewModel.swift
Outdated
Show resolved
Hide resolved
paulb777
approved these changes
Sep 3, 2024
mergify bot
referenced
this pull request
in cgrindel/rules_swift_package_manager
Sep 16, 2024
….2.0" (#1228) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [firebase/firebase-ios-sdk](https://redirect.github.com/firebase/firebase-ios-sdk) | minor | `from: "11.1.0"` -> `from: "11.2.0"` | --- ### Release Notes <details> <summary>firebase/firebase-ios-sdk (firebase/firebase-ios-sdk)</summary> ### [`v11.2.0`](https://redirect.github.com/firebase/firebase-ios-sdk/releases/tag/11.2.0): Firebase Apple 11.2.0 [Compare Source](https://redirect.github.com/firebase/firebase-ios-sdk/compare/11.1.0...11.2.0) The Firebase Apple SDK (11.2.0) is now available. For more details, see the [Firebase Apple SDK release notes.](https://firebase.google.com/support/release-notes/ios#11.2.0) To install this SDK, see [Add Firebase to your project](https://firebase.google.com/docs/ios/setup). #### What's Changed - \[Auth] Phone Auth – Fallback to reCATCHA flow when "invalid app credential" error is thrown by [@​ncooke3](https://redirect.github.com/ncooke3) in [https://github.com/firebase/firebase-ios-sdk/pull/13519](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13519) - \[Auth] Fix Xcode 16 continuation crashes by [@​paulb777](https://redirect.github.com/paulb777) in [https://github.com/firebase/firebase-ios-sdk/pull/13521](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13521) - \[Auth] Fix Phone Auth via APNS for Sandbox Tokens and update Sample's Firebase app by [@​paulb777](https://redirect.github.com/paulb777) in [https://github.com/firebase/firebase-ios-sdk/pull/13539](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13539) - \[Auth] Add background modes capability to plist by [@​ncooke3](https://redirect.github.com/ncooke3) in [https://github.com/firebase/firebase-ios-sdk/pull/13548](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13548) - \[Auth] When swizzling is disabled, open URLs via SceneDelegate by [@​ncooke3](https://redirect.github.com/ncooke3) in [https://github.com/firebase/firebase-ios-sdk/pull/13557](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13557) - \[Auth] Fix unexpected nil in fetchSignInMethods success case by [@​ncooke3](https://redirect.github.com/ncooke3) in [https://github.com/firebase/firebase-ios-sdk/pull/13561](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13561) - \[Auth] Fix user session persistence in multi tenant projects by [@​paulb777](https://redirect.github.com/paulb777) in [https://github.com/firebase/firebase-ios-sdk/pull/13567](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13567) - \[Crashlytics] Fix Firebase/Crashlytics min iOS version by [@​paulb777](https://redirect.github.com/paulb777) in [https://github.com/firebase/firebase-ios-sdk/pull/13580](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13580) - \[Database] Fix temporary disconnect when app goes inactive by [@​paulb777](https://redirect.github.com/paulb777) in [https://github.com/firebase/firebase-ios-sdk/pull/13564](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13564) - \[Firestore] Mark readonly public classes as Sendable by [@​paulb777](https://redirect.github.com/paulb777) in [https://github.com/firebase/firebase-ios-sdk/pull/13453](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13453) - \[Firestore] Support hex strings to prevent broken log lines by [@​ls-todd-lunter](https://redirect.github.com/ls-todd-lunter) in [https://github.com/firebase/firebase-ios-sdk/pull/13128](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13128) - \[Functions] `FunctionsContext` Updates by [@​yakovmanshin](https://redirect.github.com/yakovmanshin) in [https://github.com/firebase/firebase-ios-sdk/pull/13531](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13531) - \[Functions] Updated Functions Errors by [@​yakovmanshin](https://redirect.github.com/yakovmanshin) in [https://github.com/firebase/firebase-ios-sdk/pull/13535](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13535) - \[Testing] Update OCMock dependency to v3.9.4 by [@​andrewheard](https://redirect.github.com/andrewheard) in [https://github.com/firebase/firebase-ios-sdk/pull/13536](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13536) - \[Vertex AI] Make `uri` optional in `Citation` and add `title` field by [@​andrewheard](https://redirect.github.com/andrewheard) in [https://github.com/firebase/firebase-ios-sdk/pull/13520](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13520) - \[Vertex AI] Add `Sendable` conformance to types by [@​andrewheard](https://redirect.github.com/andrewheard) in [https://github.com/firebase/firebase-ios-sdk/pull/13560](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13560) - \[Vertex AI] Make `Logger` properties constants by [@​andrewheard](https://redirect.github.com/andrewheard) in [https://github.com/firebase/firebase-ios-sdk/pull/13570](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13570) - \[Vertex AI] Make `GenerativeModel` and `Chat` into Swift actors by [@​andrewheard](https://redirect.github.com/andrewheard) in [https://github.com/firebase/firebase-ios-sdk/pull/13545](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13545) - \[Vertex AI] Make generateContentStream/sendMessageStream throws by [@​andrewheard](https://redirect.github.com/andrewheard) in [https://github.com/firebase/firebase-ios-sdk/pull/13573](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13573) - \[Vertex AI] Add `SourceImage` enum to `ImageConversionError` by [@​andrewheard](https://redirect.github.com/andrewheard) in [https://github.com/firebase/firebase-ios-sdk/pull/13575](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13575) - \[Vertex AI] Add `responseSchema` to `GenerationConfig` by [@​andrewheard](https://redirect.github.com/andrewheard) in [https://github.com/firebase/firebase-ios-sdk/pull/13576](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13576) #### New Contributors - [@​ls-todd-lunter](https://redirect.github.com/ls-todd-lunter) made their first contribution in [https://github.com/firebase/firebase-ios-sdk/pull/13128](https://redirect.github.com/firebase/firebase-ios-sdk/pull/13128) **Full Changelog**: firebase/firebase-ios-sdk@11.1.0...11.2.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://redirect.github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Co-authored-by: cgrindel-self-hosted-renovate[bot] <139595543+cgrindel-self-hosted-renovate[bot]@users.noreply.github.com> Co-authored-by: Chuck Grindel <chuck.grindel@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
andrewheard
added a commit
that referenced
this pull request
Sep 24, 2024
…rs (#13545)" This reverts commit 20ec9a3. # Conflicts: # FirebaseVertexAI/CHANGELOG.md # FirebaseVertexAI/Sample/ChatSample/ViewModels/ConversationViewModel.swift # FirebaseVertexAI/Sample/FunctionCallingSample/ViewModels/FunctionCallingViewModel.swift # FirebaseVertexAI/Sample/GenerativeAIMultimodalSample/ViewModels/PhotoReasoningViewModel.swift # FirebaseVertexAI/Sample/GenerativeAITextSample/ViewModels/SummarizeViewModel.swift # FirebaseVertexAI/Sources/Chat.swift # FirebaseVertexAI/Tests/Unit/ChatTests.swift # FirebaseVertexAI/Tests/Unit/GenerativeModelTests.swift
andrewheard
added a commit
that referenced
this pull request
Sep 24, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Turned
GenerativeModel
andChat
into Swift actors in preparation for supporting concurrency-safe history in the two classes (history may migrate fromChat
toGenerativeModel
).Note: This does not address Swift 6 Strict Concurrency warnings but compiles without warnings in Xcode 15.2 and 16.1 Beta 1 with the default settings.