Skip to content

Commit 87651c9

Browse files
committed
tool description fix
1 parent 8a2e5ba commit 87651c9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/inferencesh/models/llm.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,14 @@ def build_tools(tools: Optional[List[Dict[str, Any]]]) -> Optional[List[Dict[str
453453
}
454454

455455
# Wrap in OpenAI format
456-
result.append({"type": "function", "function": func_def})
456+
tool_def = {
457+
"type": "function",
458+
"function": func_def
459+
}
460+
if "description" in tool_def:
461+
tool_def["description"] = tool_def["description"]
462+
463+
result.append(tool_def)
457464

458465
return result
459466

0 commit comments

Comments
 (0)