Bumps the maven group with 1 update in the /examples/java/demos/patent-search-agent/src/main/java/tools/CloudRunFunction directory: [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc). Updates `org.postgresql:postgresql` from 42.7.11 to 42.7.12 - [Release notes](https://github.com/pgjdbc/pgjdbc/releases) - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md) - [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.7.11...REL42.7.12) --- updated-dependencies: - dependency-name: org.postgresql:postgresql dependency-version: 42.7.12 dependency-type: direct:production dependency-group: maven ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Patent Search Agent
Using ADK Java SDK to perform the popular Patent Search (Contextual Search) use case.
-
Get API KEY from Google AI Studio for your active GCP project
-
Set env variables:
export GOOGLE_GENAI_USE_ENTERPRISE=FALSE
export GOOGLE_API_KEY="<your-api-key>"
-
Update the placeholders in the code with values from your project (like PROJECT_ID etc.)
-
Set up AlloyDB for Patents Data by following the codelab below: https://codelabs.developers.google.com/patent-search-java-adk
-
Create Cloud Run Function (CRF) to access AlloyDB for patents data (code in this repo) Follow codelab for this step: https://codelabs.developers.google.com/patent-search-java-adk
-
Deploy and get the CRF endpoint
-
In cloud Shell Terminal, navigate into the project folder
-
Run the following command to kickoff agent interaction:
mvn compile exec:java -Dexec.mainClass="agents.App"
- Deploy in Cloud Run: Navigate to your root folder & run the following command:
gcloud run deploy --source . --set-env-vars GOOGLE_API_KEY=<<YOUR_API_KEY>>
- Navigate to the deployed CR Endpoint for your agent so you can see the web UI.
TEST:
Start interacting with the agent with inputs like:
Hi.
>>
I want to search about NLP related patents.
>>
Can you give more details about this patent #*****