SimpleChatTC: Saner/Robust AssistantResponse content_equiv
Previously if content was empty, it would have always sent the toolcall info related version even if there was no toolcall info in it. Fixed now to return empty string, if both content and toolname are empty.
This commit is contained in:
parent
383c19c99b
commit
6d43011003
|
|
@ -71,8 +71,10 @@ class AssistantResponse {
|
|||
content_equiv() {
|
||||
if (this.response.content !== "") {
|
||||
return this.response.content;
|
||||
} else {
|
||||
} else if (this.response.toolname !== "") {
|
||||
return `ToolCall:${this.response.toolname}:${this.response.toolargs}`;
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue