Future at 0x7fdcc9442b40 state=finished raised ClientError [closed]

3 days ago 4
ARTICLE AD BOX

I can’t share all the code, I just want documentation about that error: Future at 0x7fdcc9442b40 state=finished raised ClientError

I get this error when I send 1 single image in base 64 and a prompt to the Gemini pro 2.5 AI, in total what I sent weighs 764288 bytes, before it worked but this week it stopped working. If I wait 5 minutes it works normally again, what would I watch?

I don’t know where the problem comes from, I don’t know if it’s the token, if it’s the structure I use to send it to the AI because it causes a Client error, if someone could give me some guidance that could be, I would appreciate it.

List<object> contentList = new List<object>(); // Añadimos el prompt de texto primero contentList.Add(new { type = "text", text = prompt }); // Añadimos cada imagen a la misma lista de contenido foreach (string imagePath in imagePaths) { if (File.Exists(imagePath)) { string base64Image = Convert.ToBase64String(File.ReadAllBytes(imagePath)); contentList.Add(new { type = "image_url", image_url = new { url = $"data:image/jpeg;base64,{base64Image}", detail = "high" } }); } } // === 4. Construir el Payload Único === // Definimos el objeto del mensaje object message = new { role = "user", content = contentList.ToArray() }; // Definimos el payload completo object payload = new { model = Model, messages = new object[] { message }, temperature = 0 }; string jsonPayload = JsonConvert.SerializeObject(payload);
Read Entire Article