You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to ask a question about LiveKit: The result contains a link. When this function call is invoked, I want to send this link to the frontend and display it in the chat window of the agent-playground project or in a separately developed component. How can this be implemented?
@llm.ai_callable()
async def take_photo(self):
"""This function is called when the user requests to take a photo. It captures an image from the latest video frame and saves it."""
call_ctx = AgentCallContext.get_current()
message = "Okay, I'll take a photo for you."
speech_handle = await call_ctx.agent.say(message) # noqa: F841
call_ctx.chat_ctx.append(text=message, role="assistant")
logger.info("Capturing and saving the image")
# Access JobContext via self.job_context
latest_image = self.job_context.proc.userdata.get("latest_image", None)
if latest_image is None:
logger.error("No available image frame.")
return "No available image."
#result = await capture_image(latest_image, "photo")
result=await save_frame(latest_image)
# Return the path
return result
The text was updated successfully, but these errors were encountered:
I want to ask a question about LiveKit: The result contains a link. When this function call is invoked, I want to send this link to the frontend and display it in the chat window of the agent-playground project or in a separately developed component. How can this be implemented?
@llm.ai_callable()
async def take_photo(self):
"""This function is called when the user requests to take a photo. It captures an image from the latest video frame and saves it."""
call_ctx = AgentCallContext.get_current()
message = "Okay, I'll take a photo for you."
speech_handle = await call_ctx.agent.say(message) # noqa: F841
call_ctx.chat_ctx.append(text=message, role="assistant")
The text was updated successfully, but these errors were encountered: