Fix tool call description
Browse files- README.md +2 -2
- assets/code_agent_trajectory.html +38 -1
README.md
CHANGED
@@ -108,7 +108,7 @@ The multi-turn template is the same with non-thinking multi-turn chat template.
|
|
108 |
### ToolCall
|
109 |
Toolcall is supported in non-thinking mode. The format is:
|
110 |
|
111 |
-
`<|begin▁of▁sentence|>{system prompt}{tool_description}<|User|>{query}<|Assistant|></think>` where the tool_description is
|
112 |
|
113 |
```
|
114 |
## Tools
|
@@ -120,7 +120,7 @@ Description: {description}
|
|
120 |
Parameters: {json.dumps(parameters)}
|
121 |
|
122 |
IMPORTANT: ALWAYS adhere to this exact format for tool use:
|
123 |
-
<|tool▁calls▁begin|><|tool▁call▁begin|>tool_call_name<|tool▁sep|>tool_call_arguments<|tool▁call▁end|>{
|
124 |
|
125 |
Where:
|
126 |
- `tool_call_name` must be an exact match to one of the available tools
|
|
|
108 |
### ToolCall
|
109 |
Toolcall is supported in non-thinking mode. The format is:
|
110 |
|
111 |
+
`<|begin▁of▁sentence|>{system prompt}\n\n{tool_description}<|User|>{query}<|Assistant|></think>` where the tool_description is
|
112 |
|
113 |
```
|
114 |
## Tools
|
|
|
120 |
Parameters: {json.dumps(parameters)}
|
121 |
|
122 |
IMPORTANT: ALWAYS adhere to this exact format for tool use:
|
123 |
+
<|tool▁calls▁begin|><|tool▁call▁begin|>tool_call_name<|tool▁sep|>tool_call_arguments<|tool▁call▁end|>{additional_tool_calls}<|tool▁calls▁end|>
|
124 |
|
125 |
Where:
|
126 |
- `tool_call_name` must be an exact match to one of the available tools
|
assets/code_agent_trajectory.html
CHANGED
@@ -8,7 +8,44 @@
|
|
8 |
.red { background:#FFCDD2; }
|
9 |
.blue { background:#BBDEFB; }
|
10 |
</style>
|
11 |
-
<div>You are a helpful software engineer assistant
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
/testbed
|
13 |
</uploaded_files>
|
14 |
I've uploaded a code repository in the directory /testbed (not in /tmp/inputs). Consider the following PR description:
|
|
|
8 |
.red { background:#FFCDD2; }
|
9 |
.blue { background:#BBDEFB; }
|
10 |
</style>
|
11 |
+
<div>You are a helpful software engineer assistant.
|
12 |
+
|
13 |
+
## Tools
|
14 |
+
You have access to the following tools:
|
15 |
+
|
16 |
+
### bash
|
17 |
+
Description: Run commands in a bash shell
|
18 |
+
* When invoking this tool, the contents of the "command" parameter does NOT need to be XML-escaped.
|
19 |
+
* You don't have access to the internet via this tool.
|
20 |
+
* You do have access to a mirror of common linux and python packages via apt and pip.
|
21 |
+
* State is persistent across command calls and discussions with the user.
|
22 |
+
* To inspect a particular line range of a file, e.g. lines 10-25, try 'sed -n 10,25p /path/to/the/file'.
|
23 |
+
* Please avoid commands that may produce a very large amount of output.
|
24 |
+
* Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.
|
25 |
+
|
26 |
+
Parameters: {"title": "BashInput", "type": "object", "properties": {"command": {"title": "Command", "description": "The bash command to run. Relative path is preferred in the command.", "type": "string"}}, "required": ["command"], "additionalProperties": false}
|
27 |
+
|
28 |
+
### str_replace_editor
|
29 |
+
Description: Custom editing tool for viewing, creating and editing files
|
30 |
+
* State is persistent across command calls and discussions with the user
|
31 |
+
* If `path` is a file, `view` displays the result of applying `cat -n`. If `path` is a directory, `view` lists non-hidden files and directories up to 2 levels deep
|
32 |
+
* The `create` command cannot be used if the specified `path` already exists as a file
|
33 |
+
* If a `command` generates a long output, it will be truncated and marked with `<response clipped>`
|
34 |
+
|
35 |
+
Notes for using the `str_replace` command:
|
36 |
+
* The `old_str` parameter should match EXACTLY one or more consecutive lines from the original file. Be mindful of whitespaces!
|
37 |
+
* If the `old_str` parameter is not unique in the file, the replacement will not be performed. Make sure to include enough context in `old_str` to make it unique
|
38 |
+
* The `new_str` parameter should contain the edited lines that should replace the `old_str`
|
39 |
+
|
40 |
+
Parameters: {"title": "SweEditorInput", "type": "object", "properties": {"command": {"title": "Command", "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`.", "enum": ["view", "create", "str_replace", "insert"], "type": "string"}, "path": {"title": "Path", "description": "Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`.", "type": "string"}, "file_text": {"title": "File Text", "description": "Required parameter of `create` command, with the content of the file to be created.", "type": "string"}, "insert_line": {"title": "Insert Line", "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`.", "type": "integer"}, "new_str": {"title": "New Str", "description": "Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert.", "type": "string"}, "old_str": {"title": "Old Str", "description": "Required parameter of `str_replace` command containing the string in `path` to replace.", "type": "string"}, "view_range": {"title": "View Range", "description": "Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file.", "type": "array", "items": {"type": "integer"}}}, "required": ["command", "path"], "additionalProperties": false}
|
41 |
+
|
42 |
+
IMPORTANT: ALWAYS adhere to this exact format for tool use:
|
43 |
+
<span class="token green"><|tool▁calls▁begin|></span><span class="token green"><|tool▁call▁begin|></span>tool_call_name<span class="token green"><|tool▁sep|></span>tool_call_arguments<span class="token green"><|tool▁call▁end|></span>{additional_tool_calls}<span class="token green"><|tool▁calls▁end|></span>
|
44 |
+
|
45 |
+
Where:
|
46 |
+
- `tool_call_name` must be an exact match to one of the available tools
|
47 |
+
- `tool_call_arguments` must be valid JSON that strictly follows the tool's Parameters Schema
|
48 |
+
- For multiple tool calls, chain them directly without separators or spaces<span class="token yellow"><|User|></span><uploaded_files>
|
49 |
/testbed
|
50 |
</uploaded_files>
|
51 |
I've uploaded a code repository in the directory /testbed (not in /tmp/inputs). Consider the following PR description:
|