Class Prompt

java.lang.Object
edu.tufts.hrilab.llm.Prompt

public class Prompt extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • getText

      public String getText()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • apply

      public String apply(Map<String,String> data)
      Applies a map of keys and values to a prompt template. Will replace strings matching the map key with the value.
      Parameters:
      data - Map of keys and values to replace in template
      Returns:
      Template string with replaced values