Hey all, back again with more issues.
When running this code found in Gemini API docs:
while (file.state === FileState.PROCESSING) {
process.stdout.write(".")
// Sleep for 10 seconds
await new Promise((resolve) => setTimeout(resolve, 10_000));
// Fetch the file from the API again
file = await fileManager.getFile(name)
}
I get this error:
Error transferring file: GoogleGenerativeAIFetchError: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/files/awsvideo.mp4: [400 Bad Request] * GetFileRequest.name: File name may only contain lowercase
alphanumeric characters or dashes (-) and cannot begin or end with a dash.
The error its throwing makes me feel like it has something to do with the file extension. However, i tried removing it and ended up getting a different error:
Error transferring file: GoogleGenerativeAIFetchError: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/files/awsvideo: [403 Forbidden] You do not have
permission to access the File awsvideo or it may not exist.
The part sticking out here is
or it may not exist.
Could anyone help me figure out this error?