Skip to content

Allow specifying credentials to vertexai embeddings model #1387

Open
@johanhaleby

Description

@johanhaleby

In 1.0.0-M2, the documentation for vertexai says to do this as part of the prerequisites:

gcloud config set project <PROJECT_ID> &&
gcloud auth application-default login <ACCOUNT>

However, it would be really useful to be able to specify credentials by other means, for example using a GCP service account. The vertex AI google cloud SDK supports this by passing an instance of com.google.auth.Credentials to com.google.api.gax.rpc.ClientContext used in PredictionServiceSettings. Builder. But in org.springframework.ai.vertexai.embedding.VertexAiEmbeddigConnectionDetails the predictionServiceSettings is hardcoded to:

PredictionServiceSettings.newBuilder().setEndpoint(endpoint).build()

making it very difficult to use a service account with spring ai.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions