Class PromptAssert

java.lang.Object
org.springframework.ai.util.PromptAssert

public final class PromptAssert extends Object
Assertion utility class that assists in validating arguments for prompt-related operations.
Since:
1.0.0
Author:
Thomas Vitale
  • Method Details

    • templateHasRequiredPlaceholders

      public static void templateHasRequiredPlaceholders(PromptTemplate promptTemplate, String... placeholders)
      Assert that the given prompt template contains the required placeholders.
      Parameters:
      promptTemplate - the prompt template to check
      placeholders - the placeholders that must be present in the prompt template