msr2000 commited on
Commit
3fd2c2e
·
1 Parent(s): 6599f8e

Fix tool call description

Browse files
Files changed (2) hide show
  1. README.md +2 -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|>{{additional_tool_calls}}<|tool▁calls▁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.<span class="token yellow">&lt;|User|&gt;</span>&lt;uploaded_files&gt;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  /testbed
13
  &lt;/uploaded_files&gt;
14
  I&#x27;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 &quot;command&quot; parameter does NOT need to be XML-escaped.
19
+ * You don&#x27;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 &#x27;sed -n 10,25p /path/to/the/file&#x27;.
23
+ * Please avoid commands that may produce a very large amount of output.
24
+ * Please run long lived commands in the background, e.g. &#x27;sleep 10 &amp;&#x27; or start a server in the background.
25
+
26
+ Parameters: {&quot;title&quot;: &quot;BashInput&quot;, &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: {&quot;command&quot;: {&quot;title&quot;: &quot;Command&quot;, &quot;description&quot;: &quot;The bash command to run. Relative path is preferred in the command.&quot;, &quot;type&quot;: &quot;string&quot;}}, &quot;required&quot;: [&quot;command&quot;], &quot;additionalProperties&quot;: 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 `&lt;response clipped&gt;`
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: {&quot;title&quot;: &quot;SweEditorInput&quot;, &quot;type&quot;: &quot;object&quot;, &quot;properties&quot;: {&quot;command&quot;: {&quot;title&quot;: &quot;Command&quot;, &quot;description&quot;: &quot;The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`.&quot;, &quot;enum&quot;: [&quot;view&quot;, &quot;create&quot;, &quot;str_replace&quot;, &quot;insert&quot;], &quot;type&quot;: &quot;string&quot;}, &quot;path&quot;: {&quot;title&quot;: &quot;Path&quot;, &quot;description&quot;: &quot;Absolute path to file or directory, e.g. `/repo/file.py` or `/repo`.&quot;, &quot;type&quot;: &quot;string&quot;}, &quot;file_text&quot;: {&quot;title&quot;: &quot;File Text&quot;, &quot;description&quot;: &quot;Required parameter of `create` command, with the content of the file to be created.&quot;, &quot;type&quot;: &quot;string&quot;}, &quot;insert_line&quot;: {&quot;title&quot;: &quot;Insert Line&quot;, &quot;description&quot;: &quot;Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`.&quot;, &quot;type&quot;: &quot;integer&quot;}, &quot;new_str&quot;: {&quot;title&quot;: &quot;New Str&quot;, &quot;description&quot;: &quot;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.&quot;, &quot;type&quot;: &quot;string&quot;}, &quot;old_str&quot;: {&quot;title&quot;: &quot;Old Str&quot;, &quot;description&quot;: &quot;Required parameter of `str_replace` command containing the string in `path` to replace.&quot;, &quot;type&quot;: &quot;string&quot;}, &quot;view_range&quot;: {&quot;title&quot;: &quot;View Range&quot;, &quot;description&quot;: &quot;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.&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: {&quot;type&quot;: &quot;integer&quot;}}}, &quot;required&quot;: [&quot;command&quot;, &quot;path&quot;], &quot;additionalProperties&quot;: false}
41
+
42
+ IMPORTANT: ALWAYS adhere to this exact format for tool use:
43
+ <span class="token green">&lt;|tool▁calls▁begin|&gt;</span><span class="token green">&lt;|tool▁call▁begin|&gt;</span>tool_call_name<span class="token green">&lt;|tool▁sep|&gt;</span>tool_call_arguments<span class="token green">&lt;|tool▁call▁end|&gt;</span>{additional_tool_calls}<span class="token green">&lt;|tool▁calls▁end|&gt;</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&#x27;s Parameters Schema
48
+ - For multiple tool calls, chain them directly without separators or spaces<span class="token yellow">&lt;|User|&gt;</span>&lt;uploaded_files&gt;
49
  /testbed
50
  &lt;/uploaded_files&gt;
51
  I&#x27;ve uploaded a code repository in the directory /testbed (not in /tmp/inputs). Consider the following PR description: