minichain / math.py~
srush's picture
srush HF staff
Upload with huggingface_hub
d2c6ae0
raw
history blame
385 Bytes
from typing import List
from minichain import Backend, JinjaPrompt, Prompt, start_chain
# Prompt that asks LLM to produce a bash command.
class CLIPrompt(JinjaPrompt[List[str]]):
template_file = "bash.pmpt.tpl"
def parse(self, result: str) -> str:
return result
CLIPrompt().show(
{"question": "list the files in the directory"},
"""```bash\nls\n```""")