Skip to content

Commit d82b6b5

Browse files
committed
get closer to openai schema for llms
1 parent 2979243 commit d82b6b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/inferencesh/models/llm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ def merge_tool_calls(messages: List[ContextMessage]) -> List[Dict[str, Any]]:
271271
multipart = multipart or input_data.image is not None
272272

273273
input_role = input_data.role if hasattr(input_data, "role") else ContextMessageRole.USER
274-
user_msg = ContextMessage(role=input_role, text=user_input_text, image=user_input_image)
274+
input_tool_call_id = input_data.tool_call_id if hasattr(input_data, "tool_call_id") else None
275+
user_msg = ContextMessage(role=input_role, text=user_input_text, image=user_input_image, tool_call_id=input_tool_call_id)
275276

276277
input_data.context.append(user_msg)
277278

0 commit comments

Comments
 (0)