JacobLinCool commited on
Commit
7e18ca2
·
verified ·
1 Parent(s): 4c696f3

fix: align minicpm tool prompt with lora data

Browse files
Files changed (1) hide show
  1. hackathon_advisor/model_runtime.py +1 -1
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"]),