@millions-hair-24956 I get this error when trying to use Gemini APIs. I get the same error when I use the google cloud vertex or gemini APIs.
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.11/site-packages/livekit/agents/llm/llm.py", line 154, in _main_task
return await self._run()
^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.11/site-packages/livekit/plugins/google/llm.py", line 352, in _run
raise APIConnectionError(
livekit.agents._exceptions.APIConnectionError: gemini llm: error generating content
WARNINGlivekit.agentsfailed to generate LLM completion, retrying in 5.0s
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.11/site-packages/livekit/plugins/google/llm.py", line 281, in _run
async for response in self._client.aio.models.generate_content_stream(
File "/opt/anaconda3/lib/python3.11/site-packages/google/genai/models.py", line 4659, in generate_content_stream
request_dict = _GenerateContentParameters_to_vertex(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.11/site-packages/google/genai/models.py", line 1115, in _GenerateContentParameters_to_vertex
for item in t.t_contents(
^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.11/site-packages/google/genai/_transformers.py", line 278, in t_contents
raise ValueError('contents are required.')
ValueError: contents are required.