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:
- (1) using a TextModel -
text-bison
- (2) using a Chat Model -
chat-bison
- (1) using a TextModel -