Using Firestore Genkit (Node.js) and GCP Vortex AI, Vortex AI Search, and GCP Cloud storage I am writing a agent that will process some files of code. The files get uploaded to cloud storage since they are unstructured data.
I want to use Vortex AI search as RAG for the agent I am building. I have the datastore created in the Vortex AI search dashaboard which I create manually. The datastore is pointed to my GCP bucket. The problem is, I do not really understand how to implement it in genkit and use it's client side apis. Using the npm package @google-cloud/discoveryengine .... I am not sure how to go about this.
- After I load the file to GCP bucket, do I need to sync the Vertex AI Search vector db with the GCP bucket?
- I see the discovery engine client side library (which is for Vertex AI Search vector db) has api's like createDocument, etc... but the documentation is very thin.
for (const file of files) {
const destination = path.basename(file);
const options = {
destination,
};
await bucket.upload(file, options);
// After file uploaded to GCP bucket here,
// How to sync or vectorize the data for Vertex AI search DB here?
}