shunxing1234 commited on
Commit
fb7b62e
·
verified ·
1 Parent(s): 18f5d1c

Upload inference.yaml

Browse files
Files changed (1) hide show
  1. inference.yaml +104 -0
inference.yaml ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ agent:
2
+ model:
3
+ api_base: http://127.0.0.1:61467/v1
4
+ api_key: sk-vllm-dummy-key
5
+ max_input_tokens: 85000
6
+ name: hosted_vllm/Qwen3-1.7B
7
+ per_instance_call_limit: 150
8
+ per_instance_cost_limit: 0
9
+ total_cost_limit: 0
10
+ temperature: 0.6
11
+
12
+ templates:
13
+ system_template: |-
14
+ You are a helpful assistant that can interact with a computer to solve tasks.
15
+ <IMPORTANT>
16
+ * If user provides a path, you should NOT assume it's relative to the current working directory. Instead, you should explore the file system to find the file before working on it.
17
+ </IMPORTANT>
18
+
19
+ # Tools
20
+
21
+ You may call one or more functions to assist with the user query.
22
+
23
+ You are provided with function signatures within <tools></tools> XML tags.
24
+
25
+ For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags.
26
+
27
+ You have access to the following functions:
28
+
29
+ <tools>
30
+ {"name": "bash", "description": "runs the given command directly in bash", "parameters": {"type": "object", "properties": {"command": {"type": "string", "description": "The bash command to execute."}}, "required": ["command"]}}
31
+ {"name": "str_replace_editor", "description": "Custom editing tool for viewing, creating and editing files * State is persistent across command calls and discussions with the user * 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 * The `create` command cannot be used if the specified `path` already exists as a file * If a `command` generates a long output, it will be truncated and marked with `<response clipped>` * The `undo_edit` command will revert the last edit made to the file at `path`\nNotes for using the `str_replace` command: * The `old_str` parameter should match EXACTLY one or more consecutive lines from the original file. Be mindful of whitespaces! * 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 * The `new_str` parameter should contain the edited lines that should replace the `old_str`\n", "parameters": {"type": "object", "properties": {"command": {"type": "string", "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`.", "enum": ["view", "create", "str_replace", "insert", "undo_edit"]}, "path": {"type": "string", "description": "Absolute path to file or directory, e.g. `/testbed/file.py` or `/testbed`."}, "file_text": {"type": "string", "description": "Required parameter of `create` command, with the content of the file to be created."}, "old_str": {"type": "string", "description": "Required parameter of `str_replace` command containing the string in `path` to replace."}, "new_str": {"type": "string", "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."}, "insert_line": {"type": "integer", "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`."}, "view_range": {"type": "array", "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.", "items": {"type": "integer"}}}, "required": ["command", "path"]}}
32
+ {"name": "submit", "description": "submits the current file", "parameters": {"type": "object", "properties": {}, "required": []}}
33
+ </tools>
34
+
35
+ If you choose to call a function ONLY reply in the following format with NO suffix:
36
+
37
+ <tool_call>
38
+ <function=example_function_name>
39
+ <parameter=example_parameter_1>
40
+ value_1
41
+ </parameter>
42
+ <parameter=example_parameter_2>
43
+ This is the value for the second parameter
44
+ that can span
45
+ multiple lines
46
+ </parameter>
47
+ </function>
48
+ </tool_call>
49
+
50
+ <IMPORTANT>
51
+ Reminder:
52
+ - Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags
53
+ - Required parameters MUST be specified
54
+ - You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after
55
+ - If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls
56
+ - Only call one function at a time
57
+ - Always provide reasoning for your function call in natural language BEFORE the function call (not after)
58
+ </IMPORTANT>
59
+ instance_template: |-
60
+ <uploaded_files>
61
+ {{working_dir}}
62
+ </uploaded_files>
63
+ I've uploaded a python code repository in the directory {{working_dir}}. Consider the following PR description:
64
+
65
+ <pr_description>
66
+ {{problem_statement}}
67
+ </pr_description>
68
+
69
+ Can you help me implement the necessary changes to the repository so that the requirements specified in the <pr_description> are met?
70
+ I've already taken care of all changes to any of the test files described in the <pr_description>. This means you DON'T have to modify the testing logic or any of the tests in any way!
71
+ Your task is to make the minimal changes to non-tests files in the {{working_dir}} directory to ensure the <pr_description> is satisfied.
72
+ Follow these steps to resolve the issue:
73
+ 1. As a first step, it might be a good idea to find and read code relevant to the <pr_description>
74
+ 2. Create a script to reproduce the error and execute it with `python <filename.py>` using the bash tool, to confirm the error
75
+ 3. Edit the source code of the repo to resolve the issue
76
+ 4. Rerun your reproduce script and confirm that the error is fixed!
77
+ 5. Think about edgecases and make sure your fix handles them as well
78
+ Your thinking should be thorough and so it's fine if it's very long.
79
+ next_step_template: |-
80
+ <tool_response>
81
+ {{observation}}
82
+ </tool_response>
83
+ next_step_no_output_template: |-
84
+ Your command ran successfully and did not produce any output.
85
+ max_observation_length: 85000
86
+ tools:
87
+ bundles:
88
+ - path: tools/registry
89
+ - path: tools/edit_anthropic
90
+ - path: tools/submit
91
+ env_variables:
92
+ USE_FILEMAP: 'true'
93
+ enable_bash_tool: true
94
+ parse_function:
95
+ type: xml_function_calling
96
+ str_replace_editor:
97
+ arguments:
98
+ - name: view_range
99
+ argument_format: "--view_range {{value}}"
100
+ execution_timeout: 400
101
+ history_processors:
102
+ - type: last_n_observations
103
+ n: 100
104
+