Gemini
Installation
Usage
Usage with Vertex AI
To use Gemini via Vertex AI you can use GeminiVertexSession
.
GeminiVertexSession accepts the env variables: GOOGLE_VERTEX_LOCATION
and GOOGLE_VERTEX_PROJECT
To authenticate for local development:
To authenticate for production you'll have to use a service account. googleAuthOptions
has credentials
which might be useful for you.
Load and index documents
For this example, we will use a single document. In a real-world scenario, you would have multiple documents to index.
Query
Full Example
API Reference
Edit on GitHub
Last updated on