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

[Bug]: Error occurs when using google gemini #2065

Open
zhangykang opened this issue Dec 3, 2024 · 2 comments
Open

[Bug]: Error occurs when using google gemini #2065

zhangykang opened this issue Dec 3, 2024 · 2 comments

Comments

@zhangykang
Copy link

Installation Method | 安装方法与平台

Anaconda (I used latest requirements.txt)

Version | 版本

Latest | 最新版

OS | 操作系统

Mac

Describe the bug | 简述

I cannot submit any to talk with ai when using gemini, it occurs that "'str' object has no attribute 'extend'" and "Unable to submit request because it has a stopSequences value of 0 but the supported range is from 1 (inclusive) to 17 (exclusive). Update the value and try again.". There is no error when using chatgpt-4o

Screen Shot | 有帮助的截图

截屏2024-12-03 22 26 43

Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

Traceback (most recent call last):
File "/Users/yikang/miniconda3/envs/gptac_venv/lib/python3.11/site-packages/gradio/routes.py", line 422, in run_predict
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yikang/miniconda3/envs/gptac_venv/lib/python3.11/site-packages/gradio/blocks.py", line 1323, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yikang/miniconda3/envs/gptac_venv/lib/python3.11/site-packages/gradio/blocks.py", line 1067, in call_function
prediction = await utils.async_iteration(iterator)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yikang/miniconda3/envs/gptac_venv/lib/python3.11/site-packages/gradio/utils.py", line 336, in async_iteration
return await iterator.anext()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yikang/miniconda3/envs/gptac_venv/lib/python3.11/site-packages/gradio/utils.py", line 329, in anext
return await anyio.to_thread.run_sync(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yikang/miniconda3/envs/gptac_venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yikang/miniconda3/envs/gptac_venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2441, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/Users/yikang/miniconda3/envs/gptac_venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 943, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/yikang/miniconda3/envs/gptac_venv/lib/python3.11/site-packages/gradio/utils.py", line 312, in run_sync_iterator_async
return next(iterator)
^^^^^^^^^^^^^^
File "/Users/yikang/Downloads/gpt_academic-master/toolbox.py", line 134, in decorated
yield from f(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args)
File "/Users/yikang/Downloads/gpt_academic-master/request_llms/bridge_all.py", line 1305, in predict
yield from method(inputs, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, stream, additional_fn)
File "/Users/yikang/Downloads/gpt_academic-master/request_llms/bridge_google_gemini.py", line 118, in predict
raise RuntimeError('对话错误')
RuntimeError: 对话错误

@xxflzj
Copy link
Contributor

xxflzj commented Dec 24, 2024

I have fixed this bug on PR#2092. You may help write a review to approve merging.
#2092

@zhangykang
Copy link
Author

Thanks! It really makes sense. Could you add the supporting of gemini 2.0 and thinking model?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants