Hey guys, I have a very simple requirement I have ...
# server-api
e
Hey guys, I have a very simple requirement I have a S-T-S worker running, in my frontend, sometimes, instead of my user saying anything, I want to send a prompt to the agent and I want it to reply, in my client side, I did await room.localParticipant.publishData( encodedData, { reliable: true } ); But agent never replied, my server code looks like this
Copy code
class Assistant(Agent):
    def __init__(self) -> None:
        self._agent_session = None
        
        super().__init__(instructions="hello")
    
    async def on_user_turn_completed(self, turn_ctx: agents.ChatContext, new_message: agents.ChatMessage) -> None:
        return await super().on_user_turn_completed(turn_ctx, new_message)

async def entrypoint(ctx: agents.JobContext):
    print(f"Room value: {ctx.room}")
    session = AgentSession(
        stt=openai.STT(model="gpt-4o-transcribe"),
        llm=openai.LLM(model="gpt-4o-mini"),
        tts=openai.TTS(
                model="gpt-4o-mini-tts",
                voice="alloy",
                instructions="Speak in a friendly and conversational tone.",
            ),
        vad=silero.VAD.load(),
        turn_detection=MultilingualModel(),
    )

    agent = Assistant()

    await session.start(
        room=ctx.room,
        agent=agent,
        room_input_options=RoomInputOptions(
            # LiveKit Cloud enhanced noise cancellation
            # - If self-hosting, omit this parameter
            # - For telephony applications, use `BVCTelephony` for best results
            noise_cancellation=noise_cancellation.BVC(), 
        ),
    )

    await ctx.connect()

    # greeting_instructions = "Greet the user and offer your assistance."

    # await session.generate_reply(
    #     instructions=greeting_instructions
    # )


if __name__ == "__main__":
    agents.cli.run_app(agents.WorkerOptions(entrypoint_fnc=entrypoint))
Do I need to do something on the server side, for it to reply to my message??