Class RecordingSession

java.lang.Object
dev.langchain4j.test.service.internal.RecordingSession

public final class RecordingSession extends Object
The AI Service invocations captured by one call of the recorder.
  • Method Details

    • topLevelInvocations

      public List<InvocationRecord> topLevelInvocations()
      Returns the invocations that were not started by another captured invocation, in the order they started.
    • invocations

      public List<InvocationRecord> invocations()
      Returns all captured invocations, including those started by another captured invocation.
    • unfinishedInvocations

      public List<InvocationRecord> unfinishedInvocations()
    • anyCancelled

      public boolean anyCancelled()
    • awaitFinished

      public boolean awaitFinished(long timeoutMillis) throws InterruptedException
      Waits until all captured invocations are finished or the timeout elapses.
      Returns:
      true if all invocations are finished
      Throws:
      InterruptedException