Unverified Commit a1162eea authored by wang jiahao's avatar wang jiahao Committed by GitHub
Browse files

Merge pull request #1158 from Creeper-MZ/function_call

Update Function call
parents 34c19940 133ba746
......@@ -24,7 +24,7 @@ class Message(BaseModel):
content: Optional[str] = None
role: Role
name: Optional[str] = None
tool_calls: Optional[List[Dict[str, Any]]] = None
tool_calls: Optional[List[Dict[str, Any]]] = {}
tool_call_id: Optional[str] = None
def to_tokenizer_message(self):
......@@ -33,7 +33,7 @@ class Message(BaseModel):
message['content'] = self.content
if self.name is not None:
message['name'] = self.name
if self.tool_calls is not None:
if self.tool_calls is not {}:
message['tool_calls'] = self.tool_calls
if self.tool_call_id is not None:
message['tool_call_id'] = self.tool_call_id
......
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