-
Notifications
You must be signed in to change notification settings - Fork 1
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
Switch from google_generative_ai package to firebase_vertexai (and from BYO API key to BYO Firebase project) #53
Comments
This is the way! google-gemini/generative-ai-dart#70 (comment) |
…salign Firebase registrations, and also lead to build error: Execution failed for task ':app:processDevelopmentDebugGoogleServices'. No matching client found for package name dev.csaba.inspector_gadget.dev /android/app/google-services.json
Currently battling with [firebase_functions/internal] Response is not valid JSON object. errorCode: firebase_functions errorMessage: com.google.firebase.functions.FirebaseFunctionsException: Response is not valid JSON object.
Note that this is against the direction of off-device working, but Firestore now supports vector DB and vector search: https://cloud.google.com/firestore/docs/vector-search Also note that we perform a dimensionality reduction with folding (instead of truncation) which currently leads to non normalized vectors. This means that dot product (the potentially most cost effective distance) is not a valid distance any more https://cloud.google.com/firestore/docs/vector-search#choose-distance-measure |
… JSON content inside a 'data' field, and it also expects it back that way! #53
… JSON content inside a 'data' field, and it also expects it back that way! #53
TODO: enforce App Check on functions, convert them? https://firebase.google.com/docs/app-check/cloud-functions?hl=en |
Dealing with two errors right now:
So far many steps back compared to https://pub.dev/packages/google_generative_ai, many lost features! |
Not seeing what we are missing regarding Firebase storage permissions: https://firebase.google.com/docs/vertex-ai/solutions/cloud-storage?platform=flutter |
After temporarily granting all read access I got a different error: "Service agents are being provisioned (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). Service agents are needed to read the Cloud Storage file provided. So please try again in a few minutes." |
I also ran into "Unable to submit request because function parameters schema should be of type OBJECT. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling" but I refactored to eliminate the two Local Tool: Location and HRM which were the only one not having |
Even after I manually provide Go to the GCP Storage page related to the Firebase Storage: https://console.cloud.google.com/storage/browser/{PROJECT_NAME}.appspot.com
So far I add read access to the public as a workaround. |
Finally Google released |
I switched over to the The new model is very specific and picky, it doesn't think anything implied. It asks if I'll stay at my current location tomorrow (or next week) to answer the question, and it also doesn't seem to be aware of the current date / time, so that needs to be stuffed into the prompt. |
…ent optional #53 This removes ugly bubbling through the function calling facilities of latlon and HR
Different from the previous models!
The model was able to to reflect what's on an image (this time the image was passed with a storage gs URL after an upload instead of passing the payload over with the API call), but then right away it continued "I cannot process images yet". Extremely weird. This is the 002 new version. The Flash still does some reflection (saw it was a Ms Fields cookie), the Pro model flat out refuses to say anything about it. |
The reranking #39 is not in place yet but the other mechanism are converted |
We experimented with https://pub.dev/packages/firebase_vertexai/ regarding multilingual embedding #48. That didn't come to fruition (google-gemini/generative-ai-dart#209 and firebase/flutterfire#13269), however lately it also turned out that https://github.com/google-gemini/generative-ai-dart/ doesn't support file upload (google-gemini/generative-ai-dart#211 and google-gemini/generative-ai-dart#70). This is crucial because audio and video multi modalities (and possibly also PDF and others except image) need file upload instead of inline data (#38 and https://discuss.ai.google.dev/t/gemini-1-5-refuses-to-process-audio-files/39713/5?u=tocsa).
Firebase offers file upload unrelated to AI for a long time now, so we'll make the leap of faith and convert over. For someone to kickstart and replicate this project would need to establish two cloud functions anyway (for Chirp / STT and TTS), so they'd need to deal with more than just an AI Studio (ex MakerSuite) API Key. With multilingual embedding and reranking we'll have two more cloud functions and establishing this will be just simpler on Firebase then in the "big boy" vertex AI (you know someone needs to establish service accounts, roles and all nine yards).
The text was updated successfully, but these errors were encountered: