-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat: vertexAI package support #8236
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…sed issues for compile/jest
@mikehardy - just to give you an update. I was able to write e2e tests for fetch and fetch stream. I was able to mock vertexAI responses here: To make this work, I edited the I think this is fine but just wanted to see what you thought. I thought this would be better than just a stream/fetch request. The thing that really borked was when I updated the types to use RNFB types rather than firebase-js-sdk types which are bundled with app (and sneakily allowed it to build/compile TS): https://github.com/invertase/react-native-firebase/blob/fix-jest-tests/packages/app/package.json#L60 Here is the commit: I've basically reproduced the types from auth and app check package but only copied the relevant API we need to get a token from either package. This created an additional problem. I needed to add this config to vertexai But this broke our TS validation as it now couldn't find The last bits from my perspective are merging this: #8257
|
What do you think of this, @mikehardy? I update the types in this commit to use actual auth and app check types: I had a look initially at using relative paths to auth and app check, but in the
which, for example, now generates the following types in import { ReactNativeFirebase } from '@react-native-firebase/app';
import { VertexAI, VertexAIOptions } from './public-types';
import { FirebaseAuthTypes } from '@react-native-firebase/auth';
import { FirebaseAppCheckTypes } from '@react-native-firebase/app-check';
export declare class VertexAIService implements VertexAI {
app: ReactNativeFirebase.FirebaseApp;
options?: VertexAIOptions | undefined;
auth: FirebaseAuthTypes.Module | null;
appCheck: FirebaseAppCheckTypes.Module | null;
location: string;
constructor(app: ReactNativeFirebase.FirebaseApp, auth?: FirebaseAuthTypes.Module, appCheck?: FirebaseAppCheckTypes.Module, options?: VertexAIOptions | undefined);
}
//# sourceMappingURL=service.d.ts.map If the user does pass in auth instance, they will naturally install auth dependency, and therefore |
Description
Related issues
Release Summary
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter