Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
2be3cd6
feat: add asr guarder
sunxilin Jul 21, 2025
85a6d59
chore: refine code
sunxilin Jul 21, 2025
88f24bc
feat: refine azure asr extension
sunxilin Jul 24, 2025
c33387f
feat: refine azure asr extension
sunxilin Jul 24, 2025
140f3c1
feat: add vscode settings
sunxilin Jul 24, 2025
76fb79b
feat: add configs for test
sunxilin Jul 24, 2025
6939a05
feat: refine azure asr extension
sunxilin Jul 24, 2025
f952e37
feat: refine azure asr extension
sunxilin Jul 24, 2025
a70f88a
feat: refine azure asr extension
sunxilin Jul 24, 2025
6a67109
feat:add azure_asr_python extension connect and reconnect guarder tes…
ZhangPengPaul Jul 24, 2025
4e65672
feat: refine azure asr extension
sunxilin Jul 24, 2025
c4c254b
feat: refine asr guarder
sunxilin Jul 24, 2025
69cb8ff
feat: refine asr guarder
sunxilin Jul 25, 2025
dbce2f2
feat: refine asr guarder workflow
sunxilin Jul 25, 2025
3bb4d00
fix: requirements
sunxilin Jul 25, 2025
945cb19
fix: workflow
sunxilin Jul 25, 2025
984510e
fix: workflow
sunxilin Jul 25, 2025
3afb330
feat: add comprehensive ASR vendor error validation (#1137)
ZhangPengPaul Jul 25, 2025
f5f7b58
fix: workflow
sunxilin Jul 25, 2025
abc6303
fix: asr guarder
sunxilin Jul 25, 2025
9a869d5
fix: asr guarder
sunxilin Jul 25, 2025
15f5b0e
feat: add comprehensive ASR testing suite with multi-language support…
ZhangPengPaul Jul 25, 2025
f8c0033
feat: add comprehensive ASR integration test suite (#1148)
ZhangPengPaul Jul 28, 2025
a11911f
fix: azure asr
sunxilin Jul 28, 2025
13d621e
feat: improve ASR test validation logicFeat/asr guarder (#1152)
ZhangPengPaul Jul 28, 2025
3c76813
fix: asr guarder task file
sunxilin Jul 28, 2025
08710ba
refactor: replace silence packet logic with finalize signal in ASR te…
ZhangPengPaul Jul 28, 2025
07ddb3d
feat: add tencent_asr_python extension (#1154)
ygcaicn Jul 29, 2025
ce73485
fix: move dump and dump_path from params to config root level in asr_…
ZhangPengPaul Jul 29, 2025
23e659f
feat: add new deepgram (#1151)
liaochenliang Jul 29, 2025
c7bacee
fix: asr guarder workflow
sunxilin Jul 31, 2025
a74589f
fix: asr guarder workflow
sunxilin Jul 31, 2025
89582ed
feat: add new aliyun bigmodel asr (#1166)
liaochenliang Jul 31, 2025
6e4e3fc
feat: add new bytedance asr (#1170)
ZhangPengPaul Jul 31, 2025
82af945
feat: update ten_ai_base version and image version
sunxilin Aug 1, 2025
d590c9c
fix: add words in asr result
sunxilin Aug 1, 2025
4d9bef9
Feat/asr guarder (#1179)
YiminW Aug 1, 2025
90f3231
fix: optimize audio timestamp test for multiple ASR providers compati…
ZhangPengPaul Aug 1, 2025
8ab262e
fix: update ten_ai_base version to 0.6
sunxilin Aug 1, 2025
7e64fb9
chore: azure asr version update
sunxilin Aug 1, 2025
e47f6e1
feat: add openai_asr_python extension (#1176)
ygcaicn Aug 1, 2025
b75d13f
chore: ten_ai_base version
sunxilin Aug 1, 2025
535f06c
fix: tencent asr version
sunxilin Aug 5, 2025
261a2fe
[feat]tts2 (#1183)
HugoChaan Aug 5, 2025
6f35adc
feat: add Tencent TTS Python extension (#1199)
sunshinexcode Aug 5, 2025
a167184
fix: azure asr
sunxilin Aug 6, 2025
70f1345
Merge branch 'main' into feat/asr_guarder
plutoless Aug 6, 2025
0d55505
feature: main pipeline (#1134)
plutoless Aug 6, 2025
5976131
fix: temp fix for task use error
zhangqianze Aug 7, 2025
7bab645
fix: remove unnecessary connections & fix transcript
zhangqianze Aug 7, 2025
e3c4f6c
fix: enable tts2 & fix llm tool
zhangqianze Aug 7, 2025
d3ac4a9
feat: add aws_asr_python extension (#1200)
ygcaicn Aug 7, 2025
c6ece45
feat: add soniox asr extension (#1201)
anexpn Aug 8, 2025
17df265
feat: add xfyun asr extension (#1202)
liaochenliang Aug 8, 2025
07a1fb0
fix: adapt with latest ten_ai_base
sunxilin Aug 8, 2025
d4ed0fe
fix: fix metadata
zhangqianze Aug 8, 2025
4452f4b
Feat/main plus (#1221)
plutoless Aug 8, 2025
10d028c
feat: place main into default folder
zhangqianze Aug 9, 2025
ba8e45e
feat: rename main_python & remove module selector/property editor in …
zhangqianze Aug 9, 2025
811aab3
feat: support mllm initial draft
zhangqianze Aug 9, 2025
4488e60
feat: support realtime conversation
zhangqianze Aug 10, 2025
01a5d7a
feat: support realtime api toolcall + fix web ui encoding issue
zhangqianze Aug 10, 2025
5af02bf
fix: remove tmp path
zhangqianze Aug 11, 2025
77d8d85
feat: add lint-extension task
sunxilin Aug 11, 2025
9e5f498
fix: azure asr lint
sunxilin Aug 11, 2025
dbd7963
feat: adjust openai mllm protocols
zhangqianze Aug 11, 2025
87b0ff8
test: guarder test for tts and fix bug in bydance_tts_duplex (#1187)
YiminW Aug 11, 2025
6d3b777
feat: upgrade ten_ai_base to 0.6 latest
zhangqianze Aug 11, 2025
508b7af
feat: support grouped names for connections
zhangqianze Aug 11, 2025
51d114c
fix: fix connections
zhangqianze Aug 11, 2025
8986823
fix: audio dumper in azure asr
sunxilin Aug 11, 2025
9de2acc
fix: xfyun asr lint (#1237)
liaochenliang Aug 11, 2025
b8b1f96
chore: lint code (#1235)
ygcaicn Aug 11, 2025
9280a2b
feat: add new dify/coze extensions
zhangqianze Aug 11, 2025
d8fee9c
feat: add new gemini v2v & stepfun v2v extensions
zhangqianze Aug 11, 2025
0723258
Update ai_agents.yaml
plutoless Aug 11, 2025
9253f8a
Update ai_agents.yaml
plutoless Aug 11, 2025
dde4611
feat: fix docker file
zhangqianze Aug 11, 2025
5b4360c
fix: refactor azure mllm
zhangqianze Aug 11, 2025
11cc4f4
Merge branch 'main' into feat/asr_guarder
plutoless Aug 12, 2025
14930e4
[feat]tts guarder test (#1240)
HugoChaan Aug 12, 2025
7a3a9d0
feat: add aws polly tts extension (#1233)
ygcaicn Aug 12, 2025
cd33c05
feat: bytedance_tts_duplex bump version to 0.1.1
wangyoucao577 Aug 12, 2025
0e6f6d5
feat: add JSON ADC credentials for Google ASR and streamline logs; fi…
ZhangPengPaul Aug 12, 2025
22c2ab8
fix: asr extension lint fix
sunxilin Aug 12, 2025
79ee54c
Feat/tts refactor-elvenlabs (#1220)
YiminW Aug 12, 2025
085df26
feat: add back glm mllm ext
zhangqianze Aug 12, 2025
369d9b3
feat: remove redundant extensions
zhangqianze Aug 12, 2025
68ba691
Merge branch 'main' into feat/asr_guarder
plutoless Aug 12, 2025
c1cb25c
fix: fix manifest.json
zhangqianze Aug 12, 2025
17938cd
feat: adjust examples
zhangqianze Aug 12, 2025
b10bd7f
fix: google asr
sunxilin Aug 13, 2025
06863d5
fix: format fix
zhangqianze Aug 13, 2025
d2fc709
fix: fix lint issues
zhangqianze Aug 13, 2025
f8b3014
fix: fix lint issues
zhangqianze Aug 13, 2025
b03359f
fix: adjust install script to take out llama deps
zhangqianze Aug 13, 2025
689c8b8
fix: aws_asr_python unitest (#1247)
ygcaicn Aug 13, 2025
4c20b1e
fix: add format for main
zhangqianze Aug 13, 2025
97375f8
chore: update version for aws openai and tencent asr
sunxilin Aug 13, 2025
3cf376d
fix: replace all base_uri with base_url
zhangqianze Aug 13, 2025
bc7dc68
feat: support multiple example local packages
zhangqianze Aug 13, 2025
a107eb9
feat: adjust demo structure
zhangqianze Aug 13, 2025
1c79cb7
fix: fix reasoning mode
zhangqianze Aug 13, 2025
64cff88
fix: tts manifest (#1251)
HugoChaan Aug 13, 2025
090ce99
fix: amazon-transcribe version (#1249)
ygcaicn Aug 13, 2025
b3f0bca
feat: adding demo cases..
zhangqianze Aug 13, 2025
13d4015
feat: google tts
YiminW Aug 13, 2025
3cfc12e
fix: add gemini live
zhangqianze Aug 13, 2025
3ddd78e
Merge branch 'main' into feat/asr_guarder
plutoless Aug 13, 2025
faaaf29
fix: fix lint issues
zhangqianze Aug 13, 2025
3381922
fix: fix gladia tests
zhangqianze Aug 13, 2025
b9e5c8b
fix: fix tests
zhangqianze Aug 13, 2025
be26764
feat: add rest demo graphs
zhangqianze Aug 14, 2025
195288b
feat: demo update
zhangqianze Aug 14, 2025
e576f89
Merge branch 'main' into feat/asr_guarder
plutoless Aug 14, 2025
aafc81e
fix: UT for aliyun gladia speechmatics
sunxilin Aug 14, 2025
8d9a86d
fix: format update
zhangqianze Aug 14, 2025
8cd7d9d
feat: add cosy TTS Python extension (#1252)
sunshinexcode Aug 14, 2025
80f84d5
fix: tts error (#1253)
HugoChaan Aug 14, 2025
e6f99d3
fix: 11labs ut use fark key instead of reading environment var
YiminW Aug 14, 2025
c030799
fix: fix google tts issue and update tencent tts version
YiminW Aug 14, 2025
741b97a
test: tts guarder test change
YiminW Aug 14, 2025
4e8a5a8
fix: fix google asr test
zhangqianze Aug 14, 2025
2998a36
fix: fix format
zhangqianze Aug 14, 2025
aef755a
fix: fix ut tests
zhangqianze Aug 14, 2025
b17d5be
fix: fix google tts ut issue
YiminW Aug 14, 2025
1410af8
feat: fix format
zhangqianze Aug 14, 2025
06f3f24
Merge branch 'main' into feat/asr_guarder
plutoless Aug 14, 2025
918a065
fix: remove dependency on pyaudio
zhangqianze Aug 14, 2025
9d8bcfd
fix: remove all sounddevice dependencies
zhangqianze Aug 14, 2025
cebf75c
fix: fix openai_asr_python tests
zhangqianze Aug 14, 2025
ba37da8
fix: fix tests
zhangqianze Aug 14, 2025
008fd73
fix: fix format
zhangqianze Aug 14, 2025
1d275b7
fix: avoid error racing condition
zhangqianze Aug 14, 2025
882cb94
fix: codeQL warning
sunxilin Aug 15, 2025
f9fd8e1
Merge branch 'main' into feat/asr_guarder
sunxilin Aug 15, 2025
a7bc7aa
fix: codeQL warning
sunxilin Aug 15, 2025
a0e1d29
fix: fix flush behavior
zhangqianze Aug 15, 2025
f621656
fix: fix format
zhangqianze Aug 15, 2025
e8af947
feat: update 11labs tts and google tts version
YiminW Aug 15, 2025
36cb9b8
fix:tts flush (#1260)
HugoChaan Aug 15, 2025
cbdf5fb
feat: speechmatics (#1261)
liaochenliang Aug 15, 2025
58dea8a
fix: add package include list for asr exts and upgrade
sunxilin Aug 15, 2025
d3f9ee2
feat: update package manifest
wangyoucao577 Aug 15, 2025
d24dcf5
Merge branch 'main' into feat/asr_guarder
plutoless Aug 16, 2025
afb5b59
fix: minimax flush (#1265)
HugoChaan Aug 16, 2025
328421b
fix: fix interrupt issues
plutoless Aug 16, 2025
a1868ea
feat: add Cartesia TTS、Openai TTS and Fish Audio TTS Extenions (#1268)
seymourtang Aug 16, 2025
cc0236c
feat: support spanish in speechmatics
sunxilin Aug 17, 2025
8c78576
feat: update package include for fish_audio openai and cartesia tts
YiminW Aug 17, 2025
3ebd83b
Fix property for minimax tts
HugoChaan Aug 17, 2025
c864a1b
Merge branch 'main' into feat/asr_guarder
plutoless Aug 18, 2025
4e18669
fix: fix lint issue
zhangqianze Aug 18, 2025
c9bcd68
fix: final (#1278)
liaochenliang Aug 18, 2025
14d4818
fix: fix main cascade
zhangqianze Aug 18, 2025
09df202
fix: fix cascade
zhangqianze Aug 18, 2025
5ec213b
feat: implement tts google bytdance 11labs (#1279)
YiminW Aug 18, 2025
34604bf
fix: fix integration test err err and unit test err (#1280)
seymourtang Aug 18, 2025
6bbfec3
fix: add polly_tts property.json (#1282)
ygcaicn Aug 18, 2025
2aa49c1
fix:self test bugs (#1283)
HugoChaan Aug 18, 2025
c590ecd
feat: support turn & reasoning
plutoless Aug 18, 2025
c10986f
fix: handling interrupt
plutoless Aug 18, 2025
5c3a100
fix: fix reasoning & adapt
plutoless Aug 18, 2025
da436a7
fix: fix formats
plutoless Aug 18, 2025
e3bcecc
feat: add ten vad use case
zhangqianze Aug 19, 2025
63df427
fix: bytedance reconnect (#1285)
HugoChaan Aug 19, 2025
d924379
fix: 11labs tts loop maintance websocket connection (#1289)
YiminW Aug 19, 2025
de10fca
fix: fix bytedance asr finalize (#1288)
ZhangPengPaul Aug 19, 2025
b0dbcdc
fix: xfyun timeout (#1286)
liaochenliang Aug 19, 2025
945a2d1
fix: ws_client cancel the receiver_task when ws disconnected (#1290)
ygcaicn Aug 19, 2025
5eaf2af
chore: update version of openai and tencent asr
sunxilin Aug 19, 2025
b5cdef7
Feat/tts2 improve bytedance (#1291)
HugoChaan Aug 19, 2025
144e208
feat: remove legacy tts
plutoless Aug 19, 2025
e3a180b
fix: language (#1293)
liaochenliang Aug 20, 2025
628a82e
fix: fix wrong dump file naming convention in OpenaiTTSExtension (#1297)
seymourtang Aug 20, 2025
aa0afcb
fix: fix 11labs tts no audio for short text and change websockt loop …
YiminW Aug 20, 2025
1764ca1
feat: azure tts python (#1294)
ygcaicn Aug 20, 2025
e618233
chore: update version for ten publish
YiminW Aug 20, 2025
46543cb
fix: mute_pkg (#1300)
liaochenliang Aug 20, 2025
33422ad
fix: update default vendors & fix fish audio issue
plutoless Aug 20, 2025
0b051bf
Merge branch 'main' into feat/asr_guarder
plutoless Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ten_framework",
"image": "docker.theten.ai/ten-framework/ten_agent_build:0.6.11",
"image": "ghcr.io/ten-framework/ten_agent_build:0.6.15",
"customizations": {
"vscode": {
"extensions": [
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ai_agents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ jobs:
ci:
runs-on: ubuntu-latest
container:
image: ghcr.io/ten-framework/ten_agent_build:0.6.11
image: ghcr.io/ten-framework/ten_agent_build:0.6.15
strategy:
matrix:
agent:
[
agents/examples/default,
agents/examples/demo,
agents/examples/experimental,
agents/examples/voice-assistant,
agents/examples/voice-assistant-realtime,
]
steps:
- uses: actions/checkout@v4
Expand Down
59 changes: 40 additions & 19 deletions .github/workflows/manual_publish_extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
extension:
description: 'Extension name (required)'
description: 'Extension name(s), use comma to separate multiple (required)'
required: true
type: string
branch:
Expand All @@ -20,7 +20,7 @@ jobs:
publish-extension:
runs-on: ubuntu-latest
container:
image: ghcr.io/ten-framework/ten_agent_build:0.6.11
image: ghcr.io/ten-framework/ten_agent_build:0.6.15

steps:
- name: Checkout code
Expand All @@ -43,33 +43,54 @@ jobs:
run: |
echo "==================== Publish Parameters ===================="
echo "Branch: ${{ github.event.inputs.branch || github.ref_name }}"
echo "Extension: ${{ github.event.inputs.extension }}"
echo "Extension(s): ${{ github.event.inputs.extension }}"
echo "========================================================"

- name: Install and build extension
- name: Install and build extension(s)
run: |
cd ai_agents/agents/ten_packages/extension/${{ github.event.inputs.extension }}
echo "Installing extension..."
tman install --standalone
extensions="${{ github.event.inputs.extension }}"
for raw in $(echo "$extensions" | tr ',' ' '); do
ext=$(echo "$raw" | xargs)
[ -z "$ext" ] && continue
echo "---- Processing: $ext ----"
if [ ! -d "ai_agents/agents/ten_packages/extension/$ext" ]; then
echo "Directory not found for extension: $ext" >&2
continue
fi
(
cd "ai_agents/agents/ten_packages/extension/$ext"
echo "Installing extension $ext..."
tman install --standalone
echo "Attempting to build extension $ext..."
tman run build || echo "Build step skipped or failed for $ext - continuing with publish"
)
done

echo "Attempting to build extension..."
tman run build || echo "Build step skipped or failed - continuing with publish"

- name: Publish extension
- name: Publish extension(s)
run: |
cd ai_agents/agents/ten_packages/extension/${{ github.event.inputs.extension }}
echo "Publishing extension to TEN store..."

identity=$(tman package --get-identity)
echo "Identity: $identity"

tman --verbose --user-token ${{ secrets.TEN_CLOUD_STORE }} publish
extensions="${{ github.event.inputs.extension }}"
for raw in $(echo "$extensions" | tr ',' ' '); do
ext=$(echo "$raw" | xargs)
[ -z "$ext" ] && continue
echo "---- Publishing: $ext ----"
if [ ! -d "ai_agents/agents/ten_packages/extension/$ext" ]; then
echo "Directory not found for extension: $ext" >&2
continue
fi
(
cd "ai_agents/agents/ten_packages/extension/$ext"
echo "Publishing extension $ext to TEN store..."
identity=$(tman package --get-identity)
echo "Identity: $identity"
tman --verbose --user-token ${{ secrets.TEN_CLOUD_STORE }} publish
)
done

- name: Show publish completion
if: always()
run: |
echo "==================== Publish Completed ===================="
echo "Branch: ${{ github.event.inputs.branch || github.ref_name }}"
echo "Extension: ${{ github.event.inputs.extension }}"
echo "Extension(s): ${{ github.event.inputs.extension }}"
echo "Check the logs above for detailed publish results."
echo "========================================================"
102 changes: 54 additions & 48 deletions .github/workflows/manual_test_asr_guarder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,25 @@
workflow_dispatch:
inputs:
extension:
description: 'Extension name (required)'
description: "Extension name (required)"
required: true
type: string
default: 'azure_asr_python'
default: "azure_asr_python"
config_dir:
description: 'Config directory (optional)'
description: "Config directory (optional)"
required: false
type: string
default: 'tests/configs'
default: "tests/configs"
branch:
description: 'Branch to test (optional, defaults to current branch)'
description: "Branch to test (optional, defaults to current branch)"
required: false
type: string
default: ''
default: ""
env_vars:
description: 'Environment variables (one per line, format: KEY=VALUE)'
description: 'Environment variable keys (use semicolon to separate multiple keys, format: KEY1;KEY2;KEY3). Values will be read from GitHub Secrets.'
required: false
type: string
default: |
# Example:
# AZURE_ASR_API_KEY=your_key
# AZURE_ASR_REGION=your_region
default: ''

permissions:
contents: read
Expand All @@ -34,7 +31,12 @@
asr-guarder-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/ten-framework/ten_agent_build:0.6.11
image: ghcr.io/ten-framework/ten_agent_build:0.6.15

env:
# Import all secrets as environment variables for dynamic access
# Users need to create GitHub Secrets with the same names as their env_vars keys
_ALL_SECRETS: ${{ toJSON(secrets) }}

Check warning

Code scanning / CodeQL

Excessive Secrets Exposure Medium

All organization and repository secrets are passed to the workflow runner in
toJSON(secrets)

Copilot Autofix

AI about 1 year ago

To fix the problem, we should remove the line that sets _ALL_SECRETS: ${{ toJSON(secrets) }} in the env section. Instead, we should only expose the specific secrets that are needed by the workflow. Since the workflow appears to support dynamic environment variable keys (via the env_vars input), the best practice is to require users to explicitly list the needed secrets in the workflow file, or to enumerate the possible secrets and set them individually in the env section. If dynamic access is absolutely required, the workflow should be refactored to use only the explicitly named secrets, possibly by using conditional steps or matrix strategies.

For this fix, since we cannot see the rest of the code, the minimal and safest change is to remove the line that sets _ALL_SECRETS: ${{ toJSON(secrets) }}. The user should then update the workflow to explicitly reference only the required secrets in the env section or in the steps that need them.

Suggested changeset 1
.github/workflows/manual_test_asr_guarder.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/manual_test_asr_guarder.yml b/.github/workflows/manual_test_asr_guarder.yml
--- a/.github/workflows/manual_test_asr_guarder.yml
+++ b/.github/workflows/manual_test_asr_guarder.yml
@@ -34,9 +34,7 @@
       image: ghcr.io/ten-framework/ten_agent_build:0.6.15
 
     env:
-      # Import all secrets as environment variables for dynamic access
       # Users need to create GitHub Secrets with the same names as their env_vars keys
-      _ALL_SECRETS: ${{ toJSON(secrets) }}
 
     steps:
       - name: Checkout code
EOF
@@ -34,9 +34,7 @@
image: ghcr.io/ten-framework/ten_agent_build:0.6.15

env:
# Import all secrets as environment variables for dynamic access
# Users need to create GitHub Secrets with the same names as their env_vars keys
_ALL_SECRETS: ${{ toJSON(secrets) }}

steps:
- name: Checkout code
Copilot is powered by AI and may make mistakes. Always verify output.

steps:
- name: Checkout code
Expand All @@ -55,43 +57,46 @@
echo "BRANCH=${{ github.event.inputs.branch || github.ref_name }}" >> $GITHUB_ENV

- name: Parse and set custom environment variables
shell: bash
run: |
echo "Setting up custom environment variables..."
echo "Setting up custom environment variables from GitHub Secrets..."

# Write user input environment variables to a temporary file
cat << 'EOF' > /tmp/user_env_vars.txt
${{ github.event.inputs.env_vars }}
EOF
# Get the input and process semicolon-separated variable keys
ENV_INPUT="${{ github.event.inputs.env_vars }}"

# Parse and set environment variables
echo "Custom environment variables:"
while IFS= read -r line || [[ -n "$line" ]]; do
# Skip empty lines and comment lines
if [[ -z "$line" ]] || [[ "$line" =~ ^[[:space:]]*# ]]; then
continue
fi

# Check if it is in KEY=VALUE format
if [[ "$line" =~ ^[A-Za-z_][A-Za-z0-9_]*=.* ]]; then
key=$(echo "$line" | cut -d'=' -f1 | xargs)
value=$(echo "$line" | cut -d'=' -f2- | xargs)

# Set environment variable
echo "${key}=${value}" >> $GITHUB_ENV

# Display in log (hide sensitive values)
if [[ "$key" =~ (KEY|TOKEN|SECRET|PASSWORD|PASS) ]]; then
echo " ✅ ${key}=*** (hidden for security)"
else
echo " ✅ ${key}=${value}"
if [ -n "$ENV_INPUT" ]; then
# Split by semicolon and process each variable key
IFS=';' read -ra ENV_ARRAY <<< "$ENV_INPUT"
for env_key in "${ENV_ARRAY[@]}"; do
# Remove leading/trailing whitespace
env_key=$(echo "$env_key" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')

# Skip empty entries
if [ -z "$env_key" ]; then
continue
fi
else
echo " ⚠️ Skipping invalid format: $line"
fi
done < /tmp/user_env_vars.txt

# Clean up temporary file
rm -f /tmp/user_env_vars.txt
# Check if it is a valid variable name (only letters, numbers, underscore, starting with letter or underscore)
if echo "$env_key" | grep -q '^[A-Za-z_][A-Za-z0-9_]*$'; then
# Extract the secret value from the JSON using jq
secret_value=$(echo "$_ALL_SECRETS" | jq -r --arg key "$env_key" '.[$key] // empty')

if [ -n "$secret_value" ] && [ "$secret_value" != "null" ]; then
# Set environment variable
echo "${env_key}=${secret_value}" >> $GITHUB_ENV
echo " ✅ ${env_key}=*** (value loaded from GitHub Secrets)"
else
echo " ❌ ${env_key}: GitHub Secret not found or empty"
echo " ℹ️ Please create a GitHub Secret named '${env_key}' in the repository settings"
fi
else
echo " ⚠️ Skipping invalid variable name: $env_key"
fi
done
else
echo " ℹ️ No environment variable keys provided"
fi

- name: Display test parameters
run: |
Expand All @@ -100,11 +105,12 @@
echo "Extension: ${{ github.event.inputs.extension }}"
echo "Config Directory: ${{ github.event.inputs.config_dir }}"
echo ""
echo "Custom Environment Variables:"
if [[ -n "${{ github.event.inputs.env_vars }}" ]]; then
echo "✅ Custom environment variables have been set (see above for details)"
echo "Custom Environment Variables Input:"
if [ -n "${{ github.event.inputs.env_vars }}" ]; then
echo "✅ Environment variable keys provided (semicolon-separated): ${{ github.event.inputs.env_vars }}"
echo "📝 Values loaded from GitHub Secrets (see environment parsing step above for details)"
else
echo "ℹ️ No custom environment variables provided"
echo "ℹ️ No custom environment variable keys provided"
fi
echo "========================================================"

Expand Down Expand Up @@ -134,4 +140,4 @@
echo "Extension tested: ${{ github.event.inputs.extension }}"
echo "Config directory used: ${{ github.event.inputs.config_dir }}"
echo "Check the logs above for detailed test results."
echo "========================================================"
echo "========================================================"
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,25 @@
"value": "-L${workspaceFolder}/ai_agents/agents/ten_packages/system/ten_runtime_go/lib -lten_runtime_go -Wl,-rpath,@loader_path/lib -Wl,-rpath,@loader_path/../lib"
}
]
},
{
"name": "(AI agents) debug asr guarder",
"type": "debugpy",
"request": "launch",
"python": "/usr/bin/python3",
"module": "pytest",
"args": [
"-s",
"${workspaceFolder}/ai_agents/agents/integration_tests/asr_guarder/tests/test_basic.py",
"--extension_name",
"azure_asr_python"
],
"env": {
"PYTHONPATH": "${workspaceFolder}/ai_agents/agents/integration_tests/asr_guarder:${workspaceFolder}/ai_agents/agents/integration_tests/asr_guarder/ten_packages/system/ten_runtime_python/lib:${workspaceFolder}/ai_agents/agents/integration_tests/asr_guarder/ten_packages/system/ten_runtime_python/interface:${workspaceFolder}/ai_agents/agents/integration_tests/asr_guarder/ten_packages/system/ten_ai_base/interface",
"TEN_ENABLE_BACKTRACE_DUMP": "true"
},
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
}
],
"compounds": [
Expand Down
12 changes: 9 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"editor.defaultFormatter": "ms-azuretools.vscode-containers"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "vscode.json-language-features"
},
"[markdown]": {
"editor.wordWrap": "bounded",
Expand All @@ -30,7 +30,8 @@
"cursorpyright.analysis.extraPaths": [
"./core/src/ten_runtime/binding/python/interface",
"./core/ten_gn/.gnfiles",
"./tests/ten_runtime/integration"
"./ai_agents/agents/ten_packages/system/ten_ai_base/interface",
"./ai_agents/agents/ten_packages/system/ten_ai_base/lib",
],
"cursorpyright.analysis.typeCheckingMode": "recommended",
"debug.allowBreakpointsEverywhere": true,
Expand Down Expand Up @@ -115,5 +116,10 @@
"**/node_modules/*/**": true,
"**/out/*/**": true,
"**/third_party/*/**": true
}
},
"[python]": {
"editor.defaultFormatter": "ms-python.python"
},
"cmake.sourceDirectory": "D:/dev/TEN-Agent/third_party/mbedtls",
"python.formatting.provider": "black"
}
9 changes: 8 additions & 1 deletion ai_agents/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,11 @@ AZURE_AI_FOUNDRY_API_KEY=
# Stepfun API Key
STEPFUN_API_KEY=

GLADIA_API_KEY=
GLADIA_API_KEY=

# Azure ASR
AZURE_ASR_API_KEY=
AZURE_ASR_REGION=
# bytedance_tts
BYTEDANCE_TTS_APPID=
BYTEDANCE_TTS_TOKEN=
4 changes: 2 additions & 2 deletions ai_agents/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ghcr.io/ten-framework/ten_agent_build:0.6.11 AS builder
FROM ghcr.io/ten-framework/ten_agent_build:0.6.15 AS builder

ARG SESSION_CONTROL_CONF=session_control.conf
# Add a new argument for USE_AGENT (defaulting to 'agents/examples/default')
ARG USE_AGENT=agents/examples/default
ARG USE_AGENT=agents/examples/voice-assistant

WORKDIR /app

Expand Down
Loading
Loading