Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing error while using a Video as an input #153

Open
sum20156 opened this issue May 25, 2024 · 3 comments
Open

Facing error while using a Video as an input #153

sum20156 opened this issue May 25, 2024 · 3 comments
Assignees
Labels
component:android sdk Issue/PR related to Android SDK status:awaiting user response Awaiting a response from the author type:bug Something isn't working

Comments

@sum20156
Copy link

Description of the bug:

Configuration:

private val config by lazy {
        generationConfig {
            temperature = 0.7f
        }
    }
    private val generativeModel by lazy {
        GenerativeModel(
            modelName = "gemini-1.5-pro-latest",
            apiKey = "",
            generationConfig = config
        )
    }

val input = content {
            blob(
                mimeType,
                file.readBytes())
            text(message)
        }
        val resp =generativeModel.generateContent(input)

mimeType is video/mp4
video link: drive

Actual vs expected behavior:

Getting error:

com.google.ai.client.generativeai.type.ServerException: An internal error has occurred. Please retry or report in https://developers.generativeai.google/guide/troubleshooting at com.google.ai.client.generativeai.type.GoogleGenerativeAIException$Companion.from(Exceptions.kt:43) at com.google.ai.client.generativeai.GenerativeModel.generateContent(GenerativeModel.kt:115) at com.google.ai.client.generativeai.GenerativeModel$generateContent$1.invokeSuspend(Unknown Source:15) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@a7848d2, Dispatchers.IO]

Any other information you'd like to share?

No response

@singhniraj08 singhniraj08 added type:bug Something isn't working component:android sdk Issue/PR related to Android SDK status:triaged Issue/PR triaged to the corresponding sub-team labels May 27, 2024
@singhniraj08
Copy link

@sum20156, Thank you reporting this issue. This looks like an intermittent error and should work now.
This repository is for issues related to Android SDK client bugs or improvements and the client doesn't control the service's responses. For issues related to Gemini API, we would suggest you to use "Send Feedback" option in Gemini docs. Ref: Screenshot below. You can also post this issue on Discourse forum.

image

@singhniraj08 singhniraj08 added status:awaiting user response Awaiting a response from the author and removed status:triaged Issue/PR triaged to the corresponding sub-team labels May 27, 2024
@sum20156
Copy link
Author

@meet2602
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:android sdk Issue/PR related to Android SDK status:awaiting user response Awaiting a response from the author type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants