Skip to content
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

TEN #218

Merged
merged 26 commits into from
Aug 19, 2024
Merged

TEN #218

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
830a780
fix: ext path and manifest for upgrading ten
wangyoucao577 Aug 18, 2024
d8761ab
feat: use ten build image
wangyoucao577 Aug 18, 2024
e92d65c
fix: cxx build
wangyoucao577 Aug 18, 2024
1a3a2f6
fix:
wangyoucao577 Aug 18, 2024
a4c8570
chore: ignore ten
wangyoucao577 Aug 18, 2024
55e3280
feat: upgrade python ext to ten
wangyoucao577 Aug 18, 2024
4980918
feat: upgrade agora_rtc
wangyoucao577 Aug 18, 2024
fc669d0
feat: upgrade property
wangyoucao577 Aug 18, 2024
7c4472f
chore: ignore
wangyoucao577 Aug 18, 2024
8e27670
chore: clean
wangyoucao577 Aug 18, 2024
9a1b2a7
chore: vscode
wangyoucao577 Aug 18, 2024
d740577
fix: nltk version to avoid "Resource wordnet not found" error
wangyoucao577 Aug 18, 2024
fa6d8f9
fix: remove wrong import
wangyoucao577 Aug 18, 2024
15f75ca
fix: l
wangyoucao577 Aug 18, 2024
0b0abda
Merge remote-tracking branch 'origin/main' into feature/ten
wangyoucao577 Aug 18, 2024
d8ce075
fix: for ten
wangyoucao577 Aug 18, 2024
bca50e8
fix: lock
wangyoucao577 Aug 18, 2024
0ffb552
fix: package
wangyoucao577 Aug 18, 2024
1daa122
feat: use start script
wangyoucao577 Aug 18, 2024
f1c7bab
fix: build image for compose
wangyoucao577 Aug 18, 2024
d095b15
fix: lock
wangyoucao577 Aug 18, 2024
381697a
fix: start gd server
wangyoucao577 Aug 18, 2024
18147c5
fix: better error log
wangyoucao577 Aug 18, 2024
ff23f52
chore: also clean property.json and .env
wangyoucao577 Aug 18, 2024
10e4f83
fix: lock
wangyoucao577 Aug 18, 2024
dc3430e
Revert "chore: also clean property.json and .env"
wangyoucao577 Aug 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "astra",
"image": "ghcr.io/rte-design/astra_agents_build:0.3.6",
"image": "ghcr.io/rte-design/astra_agents_build:0.4.0",
"customizations": {
"vscode": {
"extensions": [
Expand Down
11 changes: 6 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"python.analysis.extraPaths": [
"./agents/interface",
],
"editor.formatOnSave": true,
}
"python.analysis.extraPaths": [
"./agents/ten_packages/system/ten_runtime_python/interface",
],
"C_Cpp.intelliSenseEngine": "disabled",
"editor.formatOnSave": true,
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/rte-design/astra_agents_build:0.3.6 AS builder
FROM ghcr.io/rte-design/astra_agents_build:0.4.0 AS builder

ARG SESSION_CONTROL_CONF=session_control.conf

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ clean: clean-agents

clean-agents:
@echo ">> clean agents"
rm -rf agents/bin agents/out agents/interface agents/include agents/lib agents/lib64 agents/addon/system agents/addon/extension_group agents/.release
rm -rf agents/bin agents/out agents/interface agents/include agents/lib agents/lib64 agents/ten_packages/system agents/ten_packages/extension_group agents/.release
@echo ">> done"

docker-build-playground:
Expand All @@ -40,7 +40,7 @@ docker-build-server:

run-gd-server:
@echo ">> run graph designer server"
cd agents && arpm dev-server
cd agents && tman dev-server
@echo ">> done"

run-server:
Expand Down
11 changes: 6 additions & 5 deletions agents/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
*.log
addon/extension_group/
addon/extension/agora_rtc
addon/extension/py_init_extension_cpp
addon/system
.rte
ten_packages/extension_group/
ten_packages/extension/agora_rtc
ten_packages/extension/py_init_extension_cpp
ten_packages/system
.ten
agoradns.dat
agorareport.dat
bin/
Expand All @@ -26,4 +26,5 @@ session_control.conf.agora
xdump_config
.vscode
*.pyc
*.pyc.*
/property.json
75 changes: 0 additions & 75 deletions agents/addon/extension/azure_tts/BUILD.gn

This file was deleted.

10 changes: 0 additions & 10 deletions agents/addon/extension/chat_transcriber/go.mod

This file was deleted.

10 changes: 0 additions & 10 deletions agents/addon/extension/elevenlabs_tts/go.mod

This file was deleted.

7 changes: 0 additions & 7 deletions agents/addon/extension/interrupt_detector/go.mod

This file was deleted.

9 changes: 9 additions & 0 deletions agents/bin/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

cd "$(dirname "${BASH_SOURCE[0]}")/.."

export LD_LIBRARY_PATH=$(pwd)/ten_packages/system/agora_rtc_sdk/lib:$(pwd)/ten_packages/system/azure_speech_sdk/lib

exec bin/worker "$@"
4 changes: 2 additions & 2 deletions agents/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module app

go 1.20

replace agora.io/rte => ./interface
replace ten_framework => ./ten_packages/system/ten_runtime_go/interface

require agora.io/rte v0.0.0-00010101000000-000000000000
require ten_framework v0.0.0-00010101000000-000000000000
22 changes: 13 additions & 9 deletions agents/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,38 @@ package main
import (
"flag"
"log"
"os"

"agora.io/rte/rte"
"ten_framework/ten"
)

type appConfig struct {
PropertyFilePath string
}

type defaultApp struct {
rte.DefaultApp
ten.DefaultApp

cfg *appConfig
}

func (p *defaultApp) OnInit(
rteEnv rte.RteEnv,
property rte.MetadataInfo,
tenEnv ten.TenEnv,
) {
// Using the default property.json if not specified.
if len(p.cfg.PropertyFilePath) > 0 {
property.Set(rte.MetadataTypeJSONFileName, p.cfg.PropertyFilePath)
if b, err := os.ReadFile(p.cfg.PropertyFilePath); err != nil {
log.Fatalf("Failed to read property file %s, err %v\n", p.cfg.PropertyFilePath, err)
}else{
tenEnv.InitPropertyFromJSONBytes(b)
}
}

rteEnv.OnInitDone(property)
tenEnv.OnInitDone()
}

func startAppBlocking(cfg *appConfig) {
appInstance, err := rte.NewApp(&defaultApp{
appInstance, err := ten.NewApp(&defaultApp{
cfg: cfg,
})
if err != nil {
Expand All @@ -46,9 +50,9 @@ func startAppBlocking(cfg *appConfig) {

appInstance.Run(true)
appInstance.Wait()
rte.UnloadAllAddons()
ten.UnloadAllAddons()

rte.EnsureCleanupWhenProcessExit()
ten.EnsureCleanupWhenProcessExit()
}

func setDefaultLog() {
Expand Down
68 changes: 0 additions & 68 deletions agents/main.py

This file was deleted.

Loading