Assertion wrapper for message events.

Hierarchy (view full)

Constructors

Methods

  • Evaluate whether the message fulfills the given intent using an LLM.

    Parameters

    • llm: llm.LLM

      LLM instance for judgment

    • options: {
          intent: string;
      }

      Options containing the intent description

      • intent: string

    Returns Promise<MessageAssert>

    Self for chaining further assertions

    Example

    await result.expect
    .nextEvent()
    .isMessage({ role: 'assistant' })
    .judge(llm, { intent: 'should ask for the drink size' });