- Issue created by @tzura
- Merge request !22Creating a vertex_ai search service and a rest resource. β (Merged) created by tzura
This module integrates with the core Search Page functionality, providing a search plugin that manages authentication with Vertex AI Search on GCP and creates a search results page that queries a vertex ai search app. It would be useful in some cases (decoupled architecture) if this module could provide the authentication with GCP and return the search results in a JSON format.
Use the core REST functionality provided by Drupal to create a new REST resource to return search results in JSON format. Vertex configuration should be associated with a REST resource rather than with a custom search page.
To do this, create a Plugin class that extends ResourceBase. Then implement the get() method which will do the following:
- Create a Vertex AI Search Client
- Authenticate with GCP
- Perform a query against a vertex app
- Return Search results in a format specified by the _format query parameter. (_format=json for example).
Active
1.3
Code