Root url seems wrong for Google::Apis::AiplatformV1::AiplatformService
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with Google::Apis::AiplatformV1::AiplatformService.new and the predict_project_location_publisher_model invocation shown in the issue. Compare the generated request hostname with the Vertex AI documentation and determine whether the regional root URL should be selected automatically or documented as a supported override. Done means the documented invocation reaches the expected regional endpoint without an unexplained manual setting.
Written by the indexing model from the issue text.
Description
When I do:
scope = 'https://www.googleapis.com/auth/cloud-platform'
Google::Auth.get_application_default([scope])
vertex_ai_service = Google::Apis::AiplatformV1::AiplatformService.new
vertex_ai_service.authorization = authorization
# Project and location details
project_id = "sul-ai-sandbox"
location = "us-central1" # Change as appropriate
# Resource name for the model
model_id = "text-embedding-004"
endpoint = "projects/#{project_id}/locations/#{location}/publishers/google/models/#{model_id}"
response = vertex_ai_service.predict_project_location_publisher_model(
endpoint,
request_body
)
This gives this output, and eventually a 503 error:
Sending HTTP post https://aiplatform.googleapis.com/v1/projects/sul-ai-sandbox/locations/us-central1/publishers/google/models/text-embedding-004:predict?
I noticed the hostname used in the log is not what is listed in https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings/get-text-embeddings#generative-ai-get-text-embedding-drest.
So, it seems to work if I do:
vertex_ai_service.root_url = "https://us-central1-aiplatform.googleapis.com/"
I didn't see this documented anywhere or if this is the supported way of doing this. In any case it's a challenge to find this invocation.
- Dominant language
- Ruby
- Stars
- 2.9k
- Forks
- 888
- Avg merge
- 8m
- Merged PRs (30d)
- 241
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/google-api-ruby-client
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
googleapis/google-api-ruby-client#28001 · 5 reactions ·
-
googleapis/google-api-ruby-client#27757 · 1 assignee ·
-
googleapis/google-api-ruby-client#27758 · 1 assignee ·
-
googleapis/google-api-ruby-client#27759 · 1 assignee ·
-
api: storage type: feature request
Difficulty 3/5 1-2 days Newbie friendliness 55/100
googleapis/google-api-ruby-client#27339 ·
All issues in googleapis/google-api-ruby-client
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
hanami/hanami-cli#449 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
resque/resque-scheduler#826 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100