Add tool_call_id field to Message model

- Add optional tool_call_id field to Message model
- Required for tool response messages (role:tool)
- Identifies which tool call the response is for
- Fixes 400 errors for missing tool_call_id in tool messages
parent 948f7b63
...@@ -30,6 +30,7 @@ class Message(BaseModel): ...@@ -30,6 +30,7 @@ class Message(BaseModel):
role: str role: str
content: Union[str, List[Dict], List, None] = None content: Union[str, List[Dict], List, None] = None
tool_calls: Optional[List[Dict]] = None tool_calls: Optional[List[Dict]] = None
tool_call_id: Optional[str] = None
class ChatCompletionRequest(BaseModel): class ChatCompletionRequest(BaseModel):
model: str model: str
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment