Skip to content

Commit df891ff

Browse files
committed
fix tool call part
1 parent 34e7fa6 commit df891ff

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/inferencesh/models/llm.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,10 @@ def build_messages(
217217
def render_message(msg: ContextMessage, allow_multipart: bool) -> str | List[dict]:
218218
parts = []
219219
text = transform_user_message(msg.text) if transform_user_message and msg.role == ContextMessageRole.USER else msg.text
220-
if msg.tool_calls:
221-
for tool_call in msg.tool_calls:
222-
tool_call_string = json.dumps(tool_call)
223-
text += f"\n\nTool call: {tool_call_string}"
224220
if text:
225221
parts.append({"type": "text", "text": text})
222+
else:
223+
parts.append({"type": "text", "text": ""})
226224
if msg.image:
227225
if msg.image.path:
228226
image_data_uri = image_to_base64_data_uri(msg.image.path)

0 commit comments

Comments
 (0)