Skip to content

Files

Latest commit

3d69a2e · Feb 8, 2025

History

History
This branch is 8 commits behind GoogleCloudPlatform/serverless-production-readiness-java-gcp:main.

GenAI Samples

Use-case - Image analysis and Text Augmentation using Vision API, Langchain4J and Vertex AI, as Jit and Native Java applications

In this use case:

  • Store a picture in a Google Cloud Storage bucket
  • File creation event is generated
  • EventArc triggers a service deployed in Cloud Run
  • Services calls Vision API to analyze the image for safety, extract image metadata and any text within the image
  • For any text identified in an image, the service builds a prompt for Vertex AI to retrieve more information about the text
  • Service uses Langchain4J for the interaction with Vertex AI
  • Two versions of the data augmentation calls are provided, as examples:

Vision-VisionAPI