ICLPrompt
build_prompt
build_prompt(
self,
prompt: str,
in_context_examples: List[Dict] = None,
n_shots: int = 2
)from easyinstruct import ICLPrompt
prompts = ICLPrompt()
prompts.build_prompt(
"Identify the animals mentioned in the sentences.",
in_context_examples = [{"text": "The cat is on the mat.", "label": "cat"}, {"text": "The dog is on the rug.", "label": "dog"}],
n_shots = 2
)Last updated