Skip to content

Commit

Permalink
dev: more mistral3fc
Browse files Browse the repository at this point in the history
  • Loading branch information
zhudotexe committed Oct 2, 2024
1 parent 3bd0a18 commit 4334758
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kani/prompts/impl/mistral.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,20 @@ def json_tool_call(tc: ToolCall):


def fmt_function_call_result(msg: ChatMessage):
result_json = {"call_id": msg.tool_call_id, "content": maybe_json(msg.text)}
result_json = {"content": maybe_json(msg.text), "call_id": msg.tool_call_id}
msg.content = json.dumps(result_json)
return msg


def _fmt_functions(functions: list[AIFunction]) -> str:
tools_json = [
tools_payload = [
{
"type": "function",
"function": {"name": f.name, "description": f.desc, "parameters": f.json_schema},
}
for f in functions
]
tools_json = json.dumps(tools_payload)
return f"[AVAILABLE_TOOLS] {tools_json}[/AVAILABLE_TOOLS]"


Expand Down

0 comments on commit 4334758

Please sign in to comment.