Skip to content

Commit

Permalink
feat: able to support greeting
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyoucao577 committed Oct 24, 2024
1 parent bbbdf76 commit 0217f90
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions agents/property.json
Original file line number Diff line number Diff line change
Expand Up @@ -3216,6 +3216,17 @@
}
]
}
],
"cmd": [
{
"name": "on_user_joined",
"dest": [
{
"extension_group": "llm",
"extension": "minimax_v2v_python"
}
]
}
]
},
{
Expand Down
7 changes: 7 additions & 0 deletions agents/ten_packages/extension/minimax_v2v_python/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import requests
import json
import httpx
import pathlib
import os

from queue import Queue
from typing import Iterator, Any, List
Expand Down Expand Up @@ -171,6 +173,11 @@ def on_cmd(self, ten_env: TenEnv, cmd: Cmd) -> None:
ten_env.send_cmd(
out_cmd, lambda ten, result: logger.info("send_cmd flush done"),
)
# elif cmd_name == "on_user_joined":
# hello_cn_file = pathlib.Path(__file__).parent.absolute().joinpath("hello_cn.pcm")
# with open(hello_cn_file, "rb") as f:
# content = f.read()
# self.queue.put((datetime.now(), content))

cmd_result = CmdResult.create(StatusCode.OK)
ten_env.return_result(cmd_result, cmd)
Expand Down

0 comments on commit 0217f90

Please sign in to comment.