HackerTrans
トップ新着トレンドコメント過去質問紹介求人

djp2803

no profile record

投稿

Show HN: Rehearse – a pytest like testing library for voice agents

1 ポイント·投稿者 djp2803·5 か月前·3 コメント

コメント

djp2803
·5 か月前·議論
Thanks Pranay for sharing this!, how are you testing your agent deployments today? is it vibe testing or automated?
djp2803
·5 か月前·議論
Ideal UX:

    @pytest.mark.asyncio
    async def test_agent_handles_profanity():

        async with VAPICall(
            phone_number="+15551234567",
            api_key="your-bland-key",
            background_noise=BackgroundNoise.TRAFFIC,
            noise_level=0.4,
            speaking_style=SpeakingStyle(
                accent="american",
                speed=1.4,  # Speaking fast when angry
            ),
        ) as call:

            await call.listen()  # Greeting
    
            await call.say(
                "This is bullshit, I want to speak to a manager!",
                emotion="angry",
            )
            response = await call.listen()
    
            # Agent should remain professional and de-escalate
            await expect(response).to_satisfy(
                "remains calm and professional",
                "does not mirror the profanity",
                "offers to escalate or resolve the issue",
                llm=judge
            )
            expect(response.audio).to_not_have_emotion("angry")
            expect(response.latency).to_be_less_than(2.5)