Skip to content

docs: clarify function tools executed event pairing#5701

Open
nightcityblade wants to merge 1 commit into
livekit:mainfrom
nightcityblade:fix/issue-5696
Open

docs: clarify function tools executed event pairing#5701
nightcityblade wants to merge 1 commit into
livekit:mainfrom
nightcityblade:fix/issue-5696

Conversation

@nightcityblade
Copy link
Copy Markdown

Summary

Clarify how FunctionToolsExecutedEvent pairs function calls with their outputs and what a None output represents.

Changes

  • Document that function_calls and function_call_outputs are parallel lists paired by index.
  • Note that non-None outputs share the paired call's call_id.
  • Document that None means no value should be sent back to the LLM, such as StopResponse or invalid tool output.
  • Add a short docstring to zipped().

Testing

  • uv run ruff check livekit-agents/livekit/agents/voice/events.py
  • uv run ruff format --check livekit-agents/livekit/agents/voice/events.py
  • uv run pytest tests/test_agent_session.py -q

Fixes #5696

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


nightcityblade seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

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

Successfully merging this pull request may close these issues.

Docs: clarify FunctionToolsExecutedEvent call/output pairing semantics

2 participants