clear消息后重启agent
This commit is contained in:
@@ -30,6 +30,7 @@ export default class EscortAgent {
|
|||||||
msgs.forEach(msg => {
|
msgs.forEach(msg => {
|
||||||
if (msg.type === "clear") {
|
if (msg.type === "clear") {
|
||||||
this.messages = [];
|
this.messages = [];
|
||||||
|
this.agent = null;
|
||||||
} else {
|
} else {
|
||||||
this.messages.push(new HumanMessage(`${msg.ts} - ${msg.content}`));
|
this.messages.push(new HumanMessage(`${msg.ts} - ${msg.content}`));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user