public class PromptTemplate extends Object
| Modifier and Type | Method and Description |
|---|---|
Prompt |
apply(Map<String,Object> variables)
Applies multiple values to a template containing multiple variables.
|
Prompt |
apply(Object value)
Applies a value to a template containing a single variable.
|
static PromptTemplate |
from(String template) |
public Prompt apply(Object value)
value - The value that will be injected in place of the {{it}} placeholder in the template.public Prompt apply(Map<String,Object> variables)
variables - A map of variable names to values that will be injected in place of the corresponding placeholders in the template.public static PromptTemplate from(String template)
Copyright © 2023. All rights reserved.