This commit is contained in:
Ben Cherry
2025-07-17 15:34:57 -04:00
parent 2420b92dc7
commit 748443b987
3 changed files with 7 additions and 39 deletions
-17
View File
@@ -13,7 +13,6 @@ from livekit.agents import (
WorkerOptions,
cli,
metrics,
workflows,
)
from livekit.agents.llm import function_tool
from livekit.agents.voice import MetricsCollectedEvent
@@ -50,22 +49,6 @@ class Assistant(Agent):
return "sunny with a temperature of 70 degrees."
@function_tool
async def send_email(self, context: RunContext, subject: str, body: str):
"""Use this tool to send an email on behalf of the user.
Args:
subject: The subject of the email
body: The body of the email
"""
email_result = await workflows.GetEmailAgent(chat_ctx=self.chat_ctx)
send_to_email_address = email_result.email_address
await asyncio.sleep(1) # simulate sending the email
return "Email sent to " + send_to_email_address
def prewarm(proc: JobProcess):
proc.userdata["vad"] = silero.VAD.load()