mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-08-27 09:21:30 -04:00
b7bef36ee1
Love the project, a ton of fun! I think the PR is pretty self-explanatory, happy to make any changes! I am working on using it in an `LLMBashChain` and may update as that progresses. Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
23 lines
818 B
Python
23 lines
818 B
Python
# flake8: noqa
|
|
from langchain.prompts.prompt import PromptTemplate
|
|
|
|
_PROMPT_TEMPLATE = """If someone asks you to perform a task, your job is to come up with a series of bash commands that will perform the task. There is no need to put "#!/bin/bash" in your answer. Make sure to reason step by step, using this format:
|
|
|
|
Question: "copy the files in the directory named 'target' into a new directory at the same level as target called 'myNewDirectory'"
|
|
|
|
I need to take the following actions:
|
|
- List all files in the directory
|
|
- Create a new directory
|
|
- Copy the files from the first directory into the second directory
|
|
```bash
|
|
ls
|
|
mkdir myNewDirectory
|
|
cp -r target/* myNewDirectory
|
|
```
|
|
|
|
That is the format. Begin!
|
|
|
|
Question: {question}"""
|
|
|
|
PROMPT = PromptTemplate(input_variables=["question"], template=_PROMPT_TEMPLATE)
|