livekit / agents

Build real-time multimodal AI applications 🤖🎙️📹
https://docs.livekit.io/agents
Apache License 2.0
3.6k stars 352 forks source link

Function call issue: when using mistralai/Mixtral-8x7B-Instruct-v0.1 or mistralai/Mistral-7B-Instruct-v0.1 with together ai. #864

Open Test-isom opened 1 week ago

Test-isom commented 1 week ago

{"message": "Error in _stream_synthesis_task\nTraceback (most recent call last):\n File \"/root/pythonenv/enve/lib/python3.10/site-packages/livekit/agents/utils/log.py\", line 16, in async_fn_logs\n return await fn(*args, **kwargs)\n File \"/root/pythonenv/enve/lib/python3.10/site-packages/livekit/agents/pipeline/agent_output.py\", line 272, in _stream_synthesis_task\n async for seg in tts_source:\n File \"/root/pythonenv/enve/lib/python3.10/site-packages/livekit/agents/utils/aio/itertools.py\", line 47, in tee_peer\n item = await iterator.anext()\n File \"/root/pythonenv/enve/lib/python3.10/site-packages/livekit/agents/pipeline/pipeline_agent.py\", line 847, in _llm_stream_to_str_iterable\n async for chunk in stream:\n File \"/root/pythonenv/enve/lib/python3.10/site-packages/livekit/plugins/openai/llm.py\", line 482, in anext\n chat_chunk = self._parse_choice(choice)\n File \"/root/pythonenv/enve/lib/python3.10/site-packages/livekit/plugins/openai/llm.py\", line 511, in _parse_choice\n self._fnc_raw_arguments += tool.function.arguments # type: ignore\nTypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'", "level": "ERROR", "name": "livekit.agents.pipeline", "pid": 69585, "job_id": "AJ_yVsysoEsvYLs", "timestamp": "2024-10-08T13:00:23.301609+00:00"}

Test-isom commented 1 week ago

As per their docs, https://docs.together.ai/docs/function-calling, above 2 models supports function calling.