googleapis / googleapis/google-cloud-java

Support Custom Endpoint from Vertex AI Model Garden

Offen
#11,722 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
priority: p3 type: feature request
Vorherrschende Sprache
Java
Sterne
2.1k
Forks
1.2k
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
154

Beschreibung

I am trying to build a sample app that use Gemma3 custom model deployed on Vertex AI Model Garden.
The SDK seems does not provide a way to define custom endpoints like :
https://{endpointId}.{location}-{projectId}.prediction.vertexai.goog/v1/projects/{projectId}/locations/{location}/models/endpoints/{endpointId}:generateContent

When I try to use endpoint , the SDK will always include publishers/google in the URL which cause the app to fail with 404 UNIMPLEMENTED error.
wrong URL : https://{endpointId}.{location}-{projectId}.prediction.vertexai.goog/v1/projects/{projectId}/locations/{location}/**publishers/google/**models/endpoints/{endpointId}:generateContent

here is my code.
same issue occurs when using PredictionServiceClient.
`String endpoint = String.format("%s.%s-%s.prediction.vertexai.goog:443", endpointId, location,projectId);

VertexAI vertexAi = new VertexAI.Builder()
.setProjectId(projectId)
.setLocation(location)
.setTransport(Transport.REST)
.setApiEndpoint(endpoint)
.build();

GenerativeModel model = new GenerativeModel("endpoints/7871795169387872256", vertexAi);`

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.