mirror of
https://github.com/sqlchat/sqlchat.git
synced 2025-09-27 18:15:49 +08:00
chore: update usage message
This commit is contained in:
@ -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 (
|
||||
|
Reference in New Issue
Block a user