Giter Club home page Giter Club logo

Comments (8)

rabilrbl avatar rabilrbl commented on June 19, 2024 1

@persianopencart

Please confirm if this is the same error you got
image

from gemini-pro-bot.

rabilrbl avatar rabilrbl commented on June 19, 2024 1

@persianopencart The index error is a known issue on Google AI SDK. There is already an issue filed in their repo.

google-gemini/generative-ai-python#113

from gemini-pro-bot.

rabilrbl avatar rabilrbl commented on June 19, 2024

Hey @persianopencart ,
I did test it with other languages and I found google-generativeai package (Google's SDK) at fault.
I will continously check, if they have solved the issue or for other workarounds.

I might be wrong, waiting for others to answer on this!

from gemini-pro-bot.

persianopencart avatar persianopencart commented on June 19, 2024

@rabilrbl I'm receiving an error in my bot's response: "Some index error occurred" when I input the following command to the bot:
arabic command sample: "طباعة مساحة المثلث"
I haven't reviewed the server logs yet; however, you may execute the command and examine the logs on your end.

from gemini-pro-bot.

persianopencart avatar persianopencart commented on June 19, 2024

@rabilrbl
for better test try this command: وصف خوارزمية فيبوناتشي باللغة العربية:

this is the server log: docker logs --tail 100 0118672bd849
No error handlers are registered, logging exception.
google.generativeai.types.generation_types.StopCandidateException: finish_reason : OTHER
index: 0
safety_ratings {
category: HARM_CATEGORY_SEXUALLY_EXPLICIT
probability: NEGLIGIBLE
}
safety_ratings {
category: HARM_CATEGORY_HATE_SPEECH
probability: NEGLIGIBLE
}
safety_ratings {
category: HARM_CATEGORY_HARASSMENT
probability: NEGLIGIBLE
}
safety_ratings {
category: HARM_CATEGORY_DANGEROUS_CONTENT
probability: NEGLIGIBLE
}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/telegram/ext/_application.py", l ine 1234, in process_update
await coroutine
File "/usr/local/lib/python3.11/site-packages/telegram/ext/_basehandler.py", l ine 157, in handle_update
return await self.callback(update, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/gemini_pro_bot/handlers.py", line 75, in handle_message
response = await chat.send_message_async(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/google/generativeai/generative_m odels.py", line 395, in send_message_async
history = self.history[:]
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/google/generativeai/generative_m odels.py", line 464, in history
raise generation_types.BrokenResponseError(
google.generativeai.types.generation_types.BrokenResponseError: Can not build a coherent char history after a broken streaming response (See the previous Except ion fro details). To inspect the last response object, use chat.last.To remove the last request/response Content objects from the chat call last_send, last _received = chat.rewind() and continue without it.

from gemini-pro-bot.

persianopencart avatar persianopencart commented on June 19, 2024

@persianopencart

Please confirm if this is the same error you got image

docker logs --tail 100 4cb6e74a63e6
No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/app/gemini_pro_bot/handlers.py", line 96, in handle_message
if chunk.text:
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/google/generativeai/types/generation_types.py", line 328, in text
raise ValueError(
ValueError: The response.text quick accessor only works for simple (single-Part) text responses. This response is not simple text.Use the result.parts accessor or the full result.candidates[index].content.parts lookup instead.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/telegram/ext/_application.py", line 1234, in process_update
await coroutine
File "/usr/local/lib/python3.11/site-packages/telegram/ext/_basehandler.py", line 157, in handle_update
return await self.callback(update, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/gemini_pro_bot/handlers.py", line 123, in handle_message
if chunk.text:
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/google/generativeai/types/generation_types.py", line 328, in text
raise ValueError(
ValueError: The response.text quick accessor only works for simple (single-Part) text responses. This response is not simple text.Use the result.parts accessor or the full result.candidates[index].content.parts lookup instead.

from gemini-pro-bot.

persianopencart avatar persianopencart commented on June 19, 2024

@rabilrbl Hello, I have been informed that the issue has been resolved.

from gemini-pro-bot.

rabilrbl avatar rabilrbl commented on June 19, 2024

@persianopencart Thanks for the info.

Waiting for their new release

from gemini-pro-bot.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.