diff --git a/webui/components/chat/speech/speech-store.js b/webui/components/chat/speech/speech-store.js index 82b3bee98b..4ec5244814 100644 --- a/webui/components/chat/speech/speech-store.js +++ b/webui/components/chat/speech/speech-store.js @@ -3,6 +3,7 @@ import { updateChatInput, sendMessage } from "/index.js"; import { sleep } from "/js/sleep.js"; import { store as microphoneSettingStore } from "/components/settings/speech/microphone-setting-store.js"; import * as shortcuts from "/js/shortcuts.js"; +import * as API from "/js/api.js"; const Status = { INACTIVE: "inactive", @@ -109,9 +110,7 @@ const model = { // Load settings from server async loadSettings() { - try { - const response = await fetchApi("/settings_get", { method: "POST" }); - const data = await response.json(); + const data = await API.callJsonApi("settings_get", null); const settings = data?.settings || {}; if (settings) {