Spaces:
Running on Zero
Running on Zero
fix: align minicpm tool prompt with lora data
Browse files
hackathon_advisor/model_runtime.py
CHANGED
|
@@ -133,7 +133,6 @@ class MiniCPMTransformersPlanner:
|
|
| 133 |
]
|
| 134 |
inputs = self._tokenizer.apply_chat_template(
|
| 135 |
messages,
|
| 136 |
-
tools=tool_schemas(),
|
| 137 |
add_generation_prompt=True,
|
| 138 |
enable_thinking=False,
|
| 139 |
tokenize=True,
|
|
@@ -189,6 +188,7 @@ def render_context(message: str, state: dict[str, Any]) -> str:
|
|
| 189 |
[
|
| 190 |
"Choose exactly one tool call for the next advisor action.",
|
| 191 |
"Return only <function name=\"tool_name\">{...json...}</function>.",
|
|
|
|
| 192 |
f"User message: {message}",
|
| 193 |
"Idea board:",
|
| 194 |
*(idea_lines or ["- empty"]),
|
|
|
|
| 133 |
]
|
| 134 |
inputs = self._tokenizer.apply_chat_template(
|
| 135 |
messages,
|
|
|
|
| 136 |
add_generation_prompt=True,
|
| 137 |
enable_thinking=False,
|
| 138 |
tokenize=True,
|
|
|
|
| 188 |
[
|
| 189 |
"Choose exactly one tool call for the next advisor action.",
|
| 190 |
"Return only <function name=\"tool_name\">{...json...}</function>.",
|
| 191 |
+
f"Available tools: {', '.join(spec['function']['name'] for spec in tool_schemas())}.",
|
| 192 |
f"User message: {message}",
|
| 193 |
"Idea board:",
|
| 194 |
*(idea_lines or ["- empty"]),
|