File size: 385 Bytes
d2c6ae0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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```""")
|