Commit
·
ecd800e
1
Parent(s):
9617f6d
Upload with huggingface_hub
Browse files- README.md +34 -0
- prompt.json +1 -0
README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
tags:
|
| 4 |
+
- langchain
|
| 5 |
+
- prompt
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
# Description of LLM Bash
|
| 9 |
+
|
| 10 |
+
Prompt designed to convert natural language to bash command.
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
## Inputs
|
| 15 |
+
|
| 16 |
+
This is a description of the inputs that the prompt expects.
|
| 17 |
+
|
| 18 |
+
question: User question to be answered by writing a bash command.
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
## Usage
|
| 23 |
+
|
| 24 |
+
Below is a code snippet for how to use the prompt.
|
| 25 |
+
|
| 26 |
+
```
|
| 27 |
+
from langchain.prompts import load_prompt
|
| 28 |
+
from langchain.chains import LLMBashChain
|
| 29 |
+
|
| 30 |
+
llm = ...
|
| 31 |
+
prompt = load_prompt('lc://prompts/llm_bash/<file-name>')
|
| 32 |
+
chain = LLMBashChain(llm=llm, prompt=prompt)
|
| 33 |
+
```
|
| 34 |
+
|
prompt.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"input_variables": ["question"], "output_parser": null, "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:\\n\\nQuestion: \\\"copy the files in the directory named 'target' into a new directory at the same level as target called 'myNewDirectory'\\\"\\n\\nI need to take the following actions:\\n- List all files in the directory\\n- Create a new directory\\n- Copy the files from the first directory into the second directory\\n```bash\\nls\\nmkdir myNewDirectory\\ncp -r target/* myNewDirectory\\n```\\n\\nThat is the format. Begin!\\n\\nQuestion: {question}", "template_format": "f-string"}
|