Spaces:
Runtime error
Runtime error
tech-envision
commited on
Commit
·
7f10a78
1
Parent(s):
847b8b5
Update system prompt with python and /think guidance
Browse files- README.md +5 -2
- src/config.py +11 -8
README.md
CHANGED
@@ -13,7 +13,8 @@ conversations can be resumed with context. One example tool is included:
|
|
13 |
Execution happens asynchronously so the assistant can continue responding
|
14 |
while the command runs.
|
15 |
The VM is created when a chat session starts and reused for all subsequent
|
16 |
-
tool calls.
|
|
|
17 |
|
18 |
Sessions share state through an in-memory registry so that only one generation
|
19 |
can run at a time. Messages sent while a response is being produced are
|
@@ -26,7 +27,9 @@ verify results before replying. When the assistant is uncertain, it is directed
|
|
26 |
to search the internet with ``execute_terminal`` before giving a final answer.
|
27 |
The prompt is **not** stored in the chat history but is provided at runtime so
|
28 |
the assistant can orchestrate tool calls in sequence to fulfil the user's
|
29 |
-
request reliably.
|
|
|
|
|
30 |
|
31 |
## Usage
|
32 |
|
|
|
13 |
Execution happens asynchronously so the assistant can continue responding
|
14 |
while the command runs.
|
15 |
The VM is created when a chat session starts and reused for all subsequent
|
16 |
+
tool calls. The environment includes Python and ``pip`` so complex tasks can
|
17 |
+
be scripted using Python directly inside the terminal.
|
18 |
|
19 |
Sessions share state through an in-memory registry so that only one generation
|
20 |
can run at a time. Messages sent while a response is being produced are
|
|
|
27 |
to search the internet with ``execute_terminal`` before giving a final answer.
|
28 |
The prompt is **not** stored in the chat history but is provided at runtime so
|
29 |
the assistant can orchestrate tool calls in sequence to fulfil the user's
|
30 |
+
request reliably. If a user message ends with ``/think`` it simply selects an
|
31 |
+
internal reasoning mode and should be stripped from the prompt before
|
32 |
+
processing.
|
33 |
|
34 |
## Usage
|
35 |
|
src/config.py
CHANGED
@@ -14,14 +14,17 @@ VM_IMAGE: Final[str] = os.getenv("VM_IMAGE", "python:3.11")
|
|
14 |
SYSTEM_PROMPT: Final[str] = (
|
15 |
"You are Starlette, a professional AI assistant with advanced tool orchestration. "
|
16 |
"Always analyze the user's objective before responding. If tools are needed, "
|
17 |
-
"outline a step-by-step plan and invoke each tool sequentially.
|
18 |
-
"
|
19 |
-
"
|
|
|
|
|
20 |
"there. If the result arrives before your interim reply is complete, cancel the "
|
21 |
"reply and incorporate the tool output instead. Uploaded files live under /data "
|
22 |
-
"and are accessible via the execute_terminal tool. When
|
23 |
-
"
|
24 |
-
"
|
25 |
-
"
|
26 |
-
"response that fully
|
|
|
27 |
)
|
|
|
14 |
SYSTEM_PROMPT: Final[str] = (
|
15 |
"You are Starlette, a professional AI assistant with advanced tool orchestration. "
|
16 |
"Always analyze the user's objective before responding. If tools are needed, "
|
17 |
+
"outline a step-by-step plan and invoke each tool sequentially. Use "
|
18 |
+
"execute_terminal with its built-in Python whenever possible to perform "
|
19 |
+
"calculations, inspect files and search the web. Shell commands execute "
|
20 |
+
"asynchronously, so provide a brief interim reply while waiting. Once a tool "
|
21 |
+
"returns its result you will receive a tool message and must continue from "
|
22 |
"there. If the result arrives before your interim reply is complete, cancel the "
|
23 |
"reply and incorporate the tool output instead. Uploaded files live under /data "
|
24 |
+
"and are accessible via the execute_terminal tool. When a user prompt ends with "
|
25 |
+
"'/think', ignore that suffix. When you are unsure about any detail, use "
|
26 |
+
"execute_terminal to search the internet or inspect files before answering. "
|
27 |
+
"Continue using tools until you have gathered everything required to produce "
|
28 |
+
"an accurate answer, then craft a clear and precise final response that fully "
|
29 |
+
"addresses the request."
|
30 |
)
|