ape-linux 0.3.3__tar.gz → 0.3.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ape_linux-0.3.3 → ape_linux-0.3.5}/LICENSE +1 -1
- {ape_linux-0.3.3 → ape_linux-0.3.5}/PKG-INFO +1 -1
- {ape_linux-0.3.3 → ape_linux-0.3.5}/ape_linux.py +16 -13
- {ape_linux-0.3.3 → ape_linux-0.3.5}/pyproject.toml +1 -1
- {ape_linux-0.3.3 → ape_linux-0.3.5}/uv.lock +1 -1
- {ape_linux-0.3.3 → ape_linux-0.3.5}/.github/workflows/publish.yaml +0 -0
- {ape_linux-0.3.3 → ape_linux-0.3.5}/.github/workflows/tests.yaml +0 -0
- {ape_linux-0.3.3 → ape_linux-0.3.5}/.gitignore +0 -0
- {ape_linux-0.3.3 → ape_linux-0.3.5}/.python-version +0 -0
- {ape_linux-0.3.3 → ape_linux-0.3.5}/README.md +0 -0
- {ape_linux-0.3.3 → ape_linux-0.3.5}/tests/test_app.py +0 -0
|
@@ -31,6 +31,7 @@ def call_llm(
|
|
|
31
31
|
{"role": "system", "content": system_prompt},
|
|
32
32
|
{"role": "user", "content": user_prompt},
|
|
33
33
|
],
|
|
34
|
+
temperature=0.2,
|
|
34
35
|
)
|
|
35
36
|
.choices[0]
|
|
36
37
|
.message.content
|
|
@@ -81,11 +82,25 @@ def main(
|
|
|
81
82
|
system_prompt = """\
|
|
82
83
|
You are a Linux command assistant. You will be asked a question about how to perform a task in Linux or Unix-like operating systems. You should only include in your answer the command or commands to perform the task. If you do not know how to perform the task, output "echo "Please try again."".
|
|
83
84
|
|
|
85
|
+
It is important that you do not output commands enclosed in ``` ``` Markdown blocks. For example, do not output:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
cd projects
|
|
89
|
+
ls
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Instead, your output should be a command that is to be entered directly into the command line. For the example above this is: cd projects && ls
|
|
93
|
+
|
|
94
|
+
You are also allowed to use \\ for command continuation.
|
|
95
|
+
|
|
84
96
|
Here are a few examples.
|
|
85
97
|
|
|
86
98
|
Question: List all the files and directories in projects in my home directory
|
|
87
99
|
Answer: ls ~/projects
|
|
88
100
|
|
|
101
|
+
Question: Navigate to projects and list its contents
|
|
102
|
+
Answer: cd projects && ls
|
|
103
|
+
|
|
89
104
|
Question: What is my username?
|
|
90
105
|
Answer: whoami
|
|
91
106
|
|
|
@@ -96,19 +111,7 @@ def main(
|
|
|
96
111
|
Answer: echo "Please try again."
|
|
97
112
|
|
|
98
113
|
Question: Tell me a story
|
|
99
|
-
Answer: echo "Please try again
|
|
100
|
-
|
|
101
|
-
It is important that you do not output commands enclosed in ``` ``` Markdown blocks. For example,
|
|
102
|
-
|
|
103
|
-
```sh
|
|
104
|
-
cd projects
|
|
105
|
-
ls
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
is not allowed. Instead, your output should be a command that is to be entered directly into the command line. For the example above: cd projects && ls
|
|
109
|
-
|
|
110
|
-
You are also allowed to use \\ for command continuation.
|
|
111
|
-
\"""" # noqa: E501
|
|
114
|
+
Answer: echo "Please try again.\"""" # noqa: E501
|
|
112
115
|
|
|
113
116
|
user_prompt = f"""\
|
|
114
117
|
Question: {query.strip()}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|