Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
jakethekoenig committed Feb 15, 2024
1 parent 8ea5da3 commit e7b8106
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
15 changes: 6 additions & 9 deletions src/rawdog/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def rawdog(prompt: str, config, llm_client):
if double_check:
print(script)
print(
"The leash model thought the script was unsafe for the following reason:"
"The leash model thought the script was unsafe for the"
" following reason:"
)
print(double_check)
if input("Execute anyway? (y/N): ").strip().lower() != "y":
Expand Down Expand Up @@ -68,22 +69,18 @@ def rawdog(prompt: str, config, llm_client):

def banner(config):
if config.get("dry_run") or config.get("leash"):
print(
f""" / \__
print(f""" / \__
_ ( @\___ ┳┓┏┓┏ ┓┳┓┏┓┏┓
\ / O ┣┫┣┫┃┃┃┃┃┃┃┃┓
\ / (_____/ ┛┗┛┗┗┻┛┻┛┗┛┗┛
\/\/\/\/ U Rawdog v{__version__}
OO"""
)
OO""")
else:
print(
f""" / \__
print(f""" / \__
( @\___ ┳┓┏┓┏ ┓┳┓┏┓┏┓
/ O ┣┫┣┫┃┃┃┃┃┃┃┃┓
/ (_____/ ┛┗┛┗┗┻┛┻┛┗┛┗┛
/_____/ U Rawdog v{__version__}"""
)
/_____/ U Rawdog v{__version__}""")


def main():
Expand Down
6 changes: 2 additions & 4 deletions src/rawdog/llm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,13 @@ def get_python_package(self, import_name: str):
messages = [
{
"role": "system",
"content": dedent(
f"""\
"content": dedent(f"""\
The following python import failed: import {import_name}. \
Respond with only one word which is the name of the package \
on pypi. For instance if the import is "import numpy", you \
should respond with "numpy". If the import is "import PIL" \
you should respond with "Pillow". If you are unsure respond \
with the original import name."""
),
with the original import name."""),
}
]

Expand Down

0 comments on commit e7b8106

Please sign in to comment.