I suddenly started getting this error while trying to upload a file using the Files API and checking its status (to see if its active or not) before proceeding with generation.
file = client.files.upload(file=file_path)
file_status = client.files.get(name=file.name) ## error step
if file_status == "ACTIVE":
# GENERATE code here
please help, the Files API seems to be causing issues quite frequently
Hey @Jitesh_Jain , Could you please confirm, when initializing the client, Did you set vertexai=True
?
Hi @GUNAND_MAYANGLAMBAM, I did not. Am I supposed to? I am using the API key to init the client to use the generative language API and not vertex AI API.
No, you should not. File API is not supported in the Vertex AI SDK.
It seems there is an issue with the File API, I will check with the team about this.
Thanks.