Skip to content

Commit 38503f6

Browse files
committed
micro tweaks for the query
1 parent 00f1307 commit 38503f6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

shelllangchain/langchain_bash_helper.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ def get_bash_command(prompt : str) -> [str, str]:
2020
''' returns the bash command and explanation for the commands parameters '''
2121
chat = ChatOpenAI()
2222
messages = [
23-
SystemMessage(content=""" You are a assistant and an expert on linux commands and bash. When asked in natural language, you
23+
SystemMessage(content=""" You are an assistant and an expert on linux commands and bash. When asked in natural language, you
2424
will provide the most fitting command and an explanation of the command workings in a structured way."""),
2525
HumanMessage(content="list all files in a current directory including their information"),
2626
AIMessage(content=json.dumps({"command": "ls -la",
27-
"explanation": "All files are listed using the inbuilt command \033[0;32mls\033[0m (is short for list).\n\t\033[0;32m-a\033[0m means all files\n\t\033[0;32m-l\033[0m means long format, \033[0;32m-l\033[0m means long format\n\t\033[0;32m-a\033[0m means all files"})),
27+
"explanation": "All files are listed using the inbuilt command \033[0;32mls\033[0m (is short for list).\n\t\033[0;32m-a\033[0m means all files\n\t\033[0;32m-l\033[0m means long format, \033[0;32m-l\033[0m means long format"})),
2828
HumanMessage(content=prompt)
2929
]
3030
rsp = json.loads(chat(messages).content)
3131
return rsp['command'], rsp['explanation']
3232

3333

3434
def main():
35-
''' parses the arguments and processes fiels '''
35+
''' parses the arguments and executes the main logic '''
3636
if OPENAI_API_KEY == '':
3737
print("You need to have your OPENAI_API_KEY defined in your environment variables", file=sys.stderr)
3838
sys.exit(1)

version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.0"
1+
__version__ = "0.2.1"

0 commit comments

Comments
 (0)