This commit is contained in:
Timothy Jaeryang Baek committed 2026-08-13 19:59:11 -06:00
1 parent b018feb741
commit 7d99b2716a
27 files changed
+1069 -111

No files matched your search

+40
View File
@@ -1369,6 +1369,46 @@ export const deleteChatMessageById = async (token: string, id: string, messageId
return res;
};
export const resolveChatMessageToolCall = async (
token: string,
id: string,
messageId: string,
callId: string,
action: 'approve' | 'reject' | 'answer',
options: { answers?: unknown; timed_out?: boolean } = {}
) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/chats/${id}/messages/${messageId}/resolve`, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
...(token && { authorization: `Bearer ${token}` })
},
body: JSON.stringify({
call_id: callId,
action,
...options
})
})
.then(async (res) => {
if (!res.ok) throw await res.json();
return res.json();
})
.catch((err) => {
error = getErrorDetail(err);
console.error(err);
return null;
});
if (error) {
throw error;
}
return res;
};
export const deleteChatById = async (token: string, id: string) => {
let error = null;