@langwatch/scenario
    Preparing search index...

    Type Alias UserSimulatorAgentWithVoice

    A UserSimulatorAgent narrowed to one that has a concrete voice set.

    The public UserSimulatorAgent.voice getter is typed string | undefined (optional voice). This intersection narrows it to string (non-optional), so the executor can use the return value of findVoiceUserSim without additional null-guards on the voice field.

    Usage: callers that need the narrowed type should use isVoiceUserSim as a type guard — it already enforces voice.length > 0.

    type UserSimulatorAgentWithVoice = {
        voice: string;
        voiceifyText(
            text: string,
            cfg?: { tts?: { voice?: string } },
        ): Promise<ModelMessage>;
    }
    Index

    Properties

    Methods

    Properties

    voice: string

    Methods