Package org.springframework.ai.util
Class PromptAssert
java.lang.Object
org.springframework.ai.util.PromptAssert
Assertion utility class that assists in validating arguments for prompt-related
operations.
- Since:
- 1.0.0
- Author:
- Thomas Vitale
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
templateHasRequiredPlaceholders
(PromptTemplate promptTemplate, String... placeholders) Assert that the given prompt template contains the required placeholders.
-
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 checkplaceholders
- the placeholders that must be present in the prompt template
-