-
Notifications
You must be signed in to change notification settings - Fork 3.1k
docs(examples), test: fix first-run docs and timing flake #5593
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
Open
shizhigu
wants to merge
5
commits into
livekit:main
Choose a base branch
from
shizhigu:codex/examples-first-run-audit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
afe8c29
docs(examples): fix stale README paths
shizhigu cf5251b
docs(examples): expand env template
shizhigu 94273c0
docs(examples): clarify env template scope
shizhigu 510b645
test(agents): stabilize agent session timing assertions
shizhigu 60a84ca
test(agents): keep wall-clock timing bounds explicit
shizhigu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,90 @@ | ||
| LIVEKIT_API_SECRET="<your livekit api secret>" | ||
| LIVEKIT_API_KEY="<your livekit api key>" | ||
| LIVEKIT_URL="<your livekit ws url>" | ||
| # LiveKit connection. Required for examples that connect to a LiveKit room. | ||
| # Everything below this first block is optional and only needed by specific examples. | ||
| LIVEKIT_URL="wss://your-project.livekit.cloud" | ||
| LIVEKIT_API_KEY="your_livekit_api_key" | ||
| LIVEKIT_API_SECRET="your_livekit_api_secret" | ||
|
|
||
| # Common model providers used by examples that instantiate provider plugins directly. | ||
| # LiveKit Inference routes through LiveKit Cloud, so those examples only need the | ||
| # LiveKit credentials above. | ||
| # OPENAI_API_KEY="sk-..." | ||
| # DEEPGRAM_API_KEY="..." | ||
| # CARTESIA_API_KEY="..." | ||
| # ELEVEN_API_KEY="..." | ||
| # GOOGLE_API_KEY="..." | ||
| # XAI_API_KEY="..." | ||
| # PHONIC_API_KEY="..." | ||
| # ULTRAVOX_API_KEY="..." | ||
| # NVIDIA_API_KEY="..." | ||
| # SPEECHMATICS_API_KEY="..." | ||
| # SPEECHMATICS_RT_URL="wss://eu2.rt.speechmatics.com/v2" | ||
| # RIME_API_KEY="..." | ||
| # NEUPHONIC_API_KEY="..." | ||
| # INWORLD_API_KEY="..." | ||
|
|
||
| # AWS examples use the standard AWS SDK credential chain. | ||
| # AWS_ACCESS_KEY_ID="..." | ||
| # AWS_SECRET_ACCESS_KEY="..." | ||
| # AWS_SESSION_TOKEN="..." | ||
| # AWS_REGION="us-east-1" | ||
|
|
||
| # Tracing and external tool integrations | ||
| # LANGFUSE_PUBLIC_KEY="..." | ||
| # LANGFUSE_SECRET_KEY="..." | ||
| # LANGFUSE_HOST="https://cloud.langfuse.com" | ||
| # ZAPIER_MCP_SERVER="..." | ||
|
|
||
| # Avatar provider examples | ||
| # ANAM_API_KEY="..." | ||
| # ANAM_AVATAR_ID="..." | ||
| # AVATARIO_API_KEY="..." | ||
| # AVATARIO_AVATAR_ID="..." | ||
| # AVATARTALK_API_KEY="..." | ||
| # AVATARTALK_API_URL="..." | ||
| # AVATARTALK_AVATAR="..." | ||
| # AVATARTALK_EMOTION="..." | ||
| # BEY_API_KEY="..." | ||
| # BEY_AVATAR_ID="..." | ||
| # BITHUMAN_API_SECRET="..." | ||
| # BITHUMAN_MODEL_PATH="/path/to/model.imx" | ||
| # DID_API_KEY="..." | ||
| # DID_AGENT_ID="..." | ||
| # KEYFRAME_API_KEY="..." | ||
| # KEYFRAME_PERSONA_ID="..." | ||
| # KEYFRAME_PERSONA_SLUG="public:luna" | ||
| # LEMONSLICE_API_KEY="..." | ||
| # LEMONSLICE_IMAGE_URL="https://example.com/avatar.png" | ||
| # LIVEAVATAR_API_KEY="..." | ||
| # LIVEAVATAR_AVATAR_ID="..." | ||
| # RUNWAYML_API_SECRET="..." | ||
| # RUNWAY_AVATAR_PRESET_ID="..." | ||
| # RUNWAY_AVATAR_ID="..." | ||
| # SIMLI_API_KEY="..." | ||
| # SIMLI_FACE_ID="..." | ||
| # TAVUS_API_KEY="..." | ||
| # TAVUS_PERSONA_ID="..." | ||
| # TAVUS_REPLICA_ID="..." | ||
| # TRUGEN_API_KEY="..." | ||
| # TRUGEN_AVATAR_ID="..." | ||
|
|
||
| # Audio wave avatar local runner | ||
| # AVATAR_DISPATCHER_URL="http://localhost:8089/launch" | ||
| # Room access token generated for a specific room by the LiveKit CLI or SDK. | ||
| # LIVEKIT_TOKEN="..." | ||
|
|
||
| # SIP and telephony examples | ||
| # LIVEKIT_SIP_OUTBOUND_TRUNK="ST_..." | ||
| # LIVEKIT_SUPERVISOR_PHONE_NUMBER="+12003004000" | ||
| # LIVEKIT_SIP_NUMBER="+15005006000" | ||
| # SIP_OUTBOUND_TRUNK_ID="ST_..." | ||
|
|
||
| # Optional dispatch-name overrides used by telephony examples | ||
| # DTMF_AGENT_DISPATCH_NAME="my-telephony-agent" | ||
| # BANK_IVR_DISPATCH_NAME="bank-ivr-agent" | ||
| # PHONE_TREE_AGENT_DISPATCH_NAME="my-telephony-agent" | ||
|
|
||
| # End-to-end encryption primitive example. Generate a strong shared value. | ||
| # LIVEKIT_E2EE_KEY="shared-secret" | ||
|
|
||
| # Front desk example | ||
| # CAL_API_KEY="..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Incomplete transformation: wall-clock timestamp check not converted in test_start_boundary_does_not_block_vad_interruption
The PR systematically converts all
check_timestamp(*.created_at - t_origin, ...)calls tocheck_wallclock_event_timestamp(...)to use asymmetric tolerance (tighter early, looser late) and stabilize CI flakiness. However, line 757 intest_start_boundary_does_not_block_vad_interruptionstill uses the oldcheck_timestampwith the symmetricmax_abs_diff=0.75for a wall-clockcreated_at - t_origincomparison. The new function's docstring attests/test_agent_session.py:1094explicitly states: "Use this for created_at event timestamps; keep check_timestamp for deterministic pipeline durations, playback positions, and same-turn deltas." This test remains susceptible to the same CI flakiness the PR aims to fix.(Refers to line 757)
Was this helpful? React with 👍 or 👎 to provide feedback.