Open arsian opened 6 months ago
I'm encountering the same 500 internal server error accessing private GCS assets in VertexAI. Tried the code with proper credentials, but still facing permission issues. Any insights or solutions?
Appreciate any help!
How would one go about using assets from their own private bucket (and not the public one in the case of generativeai-downloads/images/scones.jpg)?
Is your feature request related to a problem? Please describe.
I am facing errors (500 internal server) when attempting to access an image in my own GCS and there seems to be an access/permission issue even though I have tried to instantiate a
Storage
object with my application_default_credentials in order to access the files inside the bucket, and to then use the file to compose a fileUri (i.e.gs://bucket-name/filename.jpeg
).Describe the solution you'd like.
I would like to be able to provide private assets from GCS to VertexAI and get the same result as described here https://cloud.google.com/vertex-ai/docs/generative-ai/start/quickstarts/quickstart-multimodal#send-request
const PROJECT_ID = process.env.PROJECT_ID; const bucketName = 'arsia-toki-bucket-standard';
async function createNonStreamingMultipartContent( projectId = PROJECT_ID, location = 'us-central1', model = 'gemini-pro-vision', mimeType = 'image/jpeg' ) { const storage = new Storage({ projectId, keyFilename: './application_default_credentials.json' });
}
createNonStreamingMultipartContent(...process.argv.slice(2)).catch(err => { console.error(err.message); process.exitCode = 1; });
Additional context.
Thanks!