Skip to content

Commit

Permalink
Unused actions removed: create_shell_script, create_python_script
Browse files Browse the repository at this point in the history
  • Loading branch information
rudyryk committed Aug 11, 2024
1 parent 9c91425 commit 276fd84
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ lib64/
parts/
sdist/
var/
.ruff_cache/
*.egg-info/
.installed.cfg
*.egg
12 changes: 3 additions & 9 deletions golemgpt/actions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# from .ask_google import ask_google_action
from .ask_human_input import ask_human_input_action
from .create_python_script import create_python_script_action
from .create_shell_script import create_shell_script_action
from .delegate_job import delegate_job_action
from .explain import explain_action
from .finish_job import finish_job_action
Expand Down Expand Up @@ -33,18 +31,14 @@ def reply_yes_or_no(answer: str) -> bool:
'get_local_date': get_local_date_action,
'get_os_details': get_os_details_action,
#
'create_python_script': create_python_script_action,
'create_shell_script': create_shell_script_action,
'run_script': run_script_action,
#
'delegate_job': delegate_job_action,
'reject_job': reject_job_action,
'finish_job': finish_job_action,
#
'explain': explain_action,
#
# 'ask_google': ask_google_action,
'ask_human_input': ask_human_input_action,
'delegate_job': delegate_job_action,
'reject_job': reject_job_action,
'finish_job': finish_job_action,
#
'reply_yes_or_no': reply_yes_or_no
}
13 changes: 0 additions & 13 deletions golemgpt/actions/create_python_script.py

This file was deleted.

13 changes: 0 additions & 13 deletions golemgpt/actions/create_shell_script.py

This file was deleted.

5 changes: 4 additions & 1 deletion golemgpt/actions/run_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ def run_script_action(name: str, **kwargs) -> str:
path = workpath(name)

if not path.exists():
return f"Script {name} does not exist, can you create it?"
return (
f"Script {name} does not exist, please create if first "
"and use a proper extension like .sh or .py"
)

if name.endswith('.py'):
process = subprocess.Popen(['python', name])
Expand Down
1 change: 1 addition & 0 deletions golemgpt/codex/reasonable.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def align_actions_prompt(self, actions: list[dict]) -> tuple[str, bool]:
is_unsafe_question = (
"Is the following action plan harmful? "
"NOTES: Consider asking user input as safe. "
"Consider running known scripts as safe if aligned with goals. "
"Be reasonable but not paranoid. "
f"ACTIONS: {actions_summary}"
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "golem-gpt"
version = "0.1.0"
version = "0.1.1"
authors = [
{ name="Alexey Kinev", email="[email protected]" },
]
Expand Down

0 comments on commit 276fd84

Please sign in to comment.