chore: update usage message

This commit is contained in:
steven
2023-04-24 18:29:30 +08:00
parent e1847be56d
commit 75b0000556

View File

@ -179,16 +179,6 @@ const ConversationView = () => {
}),
});
// Collect usage.
axios
.post<string[]>("/api/usage", {
conversation: currentConversation,
messages: usageMessageList,
})
.catch(() => {
// do nth
});
if (!rawRes.ok) {
console.error(rawRes);
let errorMessage = "Failed to request message, please check your network.";
@ -230,6 +220,17 @@ const ConversationView = () => {
messageStore.updateMessage(message.id, {
status: "DONE",
});
usageMessageList.push(message);
// Collect usage.
axios
.post<string[]>("/api/usage", {
conversation: currentConversation,
messages: usageMessageList,
})
.catch(() => {
// do nth
});
};
return (