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

大模型请求失败, 下面是具体报错信息: \n\n{traceback.format_exc()}") Exception: 大模型请求失败, 下面是具体报错信息: #45

Open
Rick-Duan opened this issue Oct 30, 2024 · 0 comments

Comments

@Rick-Duan
Copy link

生成过程中发生错误: 大模型请求失败, 下面是具体报错信息:

Traceback (most recent call last): File "/NarratoAI/app/services/llm.py", line 388, in _generate_response_video return response.text File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 464, in text parts = self.parts File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 442, in parts raise ValueError( ValueError: Invalid operation: The response.parts quick accessor requires a single candidate, but but response.candidates is empty. This appears to be caused by a blocked prompt, see response.prompt_feedback: block_reason: OTHER

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/NarratoAI/app/services/llm.py", line 514, in gemini_video_transcription response = _generate_response_video(prompt=prompt, llm_provider_video=llm_provider_video, video_file=gemini_video_file) File "/NarratoAI/app/services/llm.py", line 390, in _generate_response_video return handle_exception(err) File "/NarratoAI/app/services/llm.py", line 130, in handle_exception raise Exception(f"大模型请求失败, 下面是具体报错信息: \n\n{traceback.format_exc()}") Exception: 大模型请求失败, 下面是具体报错信息:

Traceback (most recent call last): File "/NarratoAI/app/services/llm.py", line 388, in _generate_response_video return response.text File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 464, in text parts = self.parts File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 442, in parts raise ValueError( ValueError: Invalid operation: The response.parts quick accessor requires a single candidate, but but response.candidates is empty. This appears to be caused by a blocked prompt, see response.prompt_feedback: block_reason: OTHER

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/NarratoAI/app/services/llm.py", line 438, in generate_script transcription = gemini_video_transcription( File "/NarratoAI/app/services/llm.py", line 520, in gemini_video_transcription return handle_exception(err) File "/NarratoAI/app/services/llm.py", line 130, in handle_exception raise Exception(f"大模型请求失败, 下面是具体报错信息: \n\n{traceback.format_exc()}") Exception: 大模型请求失败, 下面是具体报错信息:

Traceback (most recent call last): File "/NarratoAI/app/services/llm.py", line 388, in _generate_response_video return response.text File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 464, in text parts = self.parts File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 442, in parts raise ValueError( ValueError: Invalid operation: The response.parts quick accessor requires a single candidate, but but response.candidates is empty. This appears to be caused by a blocked prompt, see response.prompt_feedback: block_reason: OTHER

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/NarratoAI/app/services/llm.py", line 514, in gemini_video_transcription response = _generate_response_video(prompt=prompt, llm_provider_video=llm_provider_video, video_file=gemini_video_file) File "/NarratoAI/app/services/llm.py", line 390, in _generate_response_video return handle_exception(err) File "/NarratoAI/app/services/llm.py", line 130, in handle_exception raise Exception(f"大模型请求失败, 下面是具体报错信息: \n\n{traceback.format_exc()}") Exception: 大模型请求失败, 下面是具体报错信息:

Traceback (most recent call last): File "/NarratoAI/app/services/llm.py", line 388, in _generate_response_video return response.text File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 464, in text parts = self.parts File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 442, in parts raise ValueError( ValueError: Invalid operation: The response.parts quick accessor requires a single candidate, but but response.candidates is empty. This appears to be caused by a blocked prompt, see response.prompt_feedback: block_reason: OTHER

@linyqh linyqh mentioned this issue Nov 9, 2024
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

1 participant