Why am I getting this issue: Error in _pipeline_r...
# ask-ai
l
Why am I getting this issue: Error in _pipeline_reply_task {"pid": 298291, "job_id": Traceback (most recent call "AJ_fVRyxzZSXaQo", "room_id": last): "RM_fRWZYyaYApdg"} File "/home/rohitgarud/legosapien_ag ents/venv/lib/python3.12/site-p ackages/livekit/agents/utils/lo g.py", line 16, in async_fn_logs return await fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^ ^^^^^ File "/home/rohitgarud/legosapien_ag ents/venv/lib/python3.12/site-p ackages/livekit/agents/voice/ag ent_activity.py", line 1976, in _pipeline_reply_task await exe_task File "/home/rohitgarud/legosapien_ag ents/venv/lib/python3.12/site-p ackages/livekit/agents/utils/lo g.py", line 16, in async_fn_logs return await fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^ ^^^^^ File "/home/rohitgarud/legosapien_ag ents/venv/lib/python3.12/site-p ackages/livekit/agents/voice/ge neration.py", line 490, in _execute_tools_task fnc_args, fnc_kwargs = llm_utils.prepare_function_argu ments( ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ File "/home/rohitgarud/legosapien_ag ents/venv/lib/python3.12/site-p ackages/livekit/agents/llm/util s.py", line 401, in prepare_function_arguments bound = signature.bind(**{**raw_fields, **context_dict}) ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/rohitgarud/.pyenv/versio ns/3.12.3/lib/python3.12/inspec t.py", line 3242, in bind return self._bind(args, kwargs) ^^^^^^^^^^^^^^^^^^^^ ^^^^ File "/home/rohitgarud/.pyenv/versio ns/3.12.3/lib/python3.12/inspec t.py", line 3231, in _bind raise TypeError( TypeError: got an unexpected keyword argument 'raw_arguments'
t
Thanks for reaching out, ROHIT. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — that traceback shows the problem clearly. Cause • A tool was defined using
raw_schema
so LiveKit passes inputs as a single
raw_arguments
dict. • Your function’s signature does not include
raw_arguments
, so Python raises: TypeError: got an unexpected keyword argument 'raw_arguments'. What to do 1. Find functions decorated with
@function_tool(raw_schema=...)
. 2. Change their signatures to accept
raw_arguments: dict[str, object]
. Example:
Copy code
@function_tool(raw_schema={...})
async def my_tool(raw_arguments: dict[str, object]):
    value = raw_arguments["some_field"]
    ...
1. Alternatively, remove
raw_schema
and use normal annotated parameters (e.g.,
def fn(location: str)
) if you prefer per-argument binding. If you’d like, paste the tool decorator + function signature that’s failing and I’ll point out the exact change. Sources: Tool definition and use | LiveKit docs