Class StructuredPrompt.Util

java.lang.Object
dev.langchain4j.model.input.structured.StructuredPrompt.Util
Enclosing class:
StructuredPrompt

public static class StructuredPrompt.Util extends Object
Utility class for StructuredPrompt.
  • Method Details

    • validateStructuredPrompt

      public static StructuredPrompt validateStructuredPrompt(Object structuredPrompt)
      Validates that the given object is annotated with StructuredPrompt.
      Parameters:
      structuredPrompt - the object to validate.
      Returns:
      the annotation.
    • join

      public static String join(StructuredPrompt structuredPrompt)
      Joins the lines of the prompt template.
      Parameters:
      structuredPrompt - the structured prompt.
      Returns:
      the joined prompt template.