From e9067c05c641f41e463ce9c9c2f2047c1f39b90c Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Sat, 27 Sep 2025 07:55:45 +0900 Subject: [PATCH] [Update/Chore] UI: Compute Type: Rename and add endpoint '/run/'. --- .../logics/configs/transcription/useTranscription.js | 4 ++-- src-ui/logics/configs/translation/useTranslation.js | 4 ++-- src-ui/logics/useReceiveRoutes.js | 10 ++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src-ui/logics/configs/transcription/useTranscription.js b/src-ui/logics/configs/transcription/useTranscription.js index 1511d77a..008e4b10 100644 --- a/src-ui/logics/configs/transcription/useTranscription.js +++ b/src-ui/logics/configs/transcription/useTranscription.js @@ -256,12 +256,12 @@ export const useTranscription = () => { const getSelectedTranscriptionComputeType = () => { pendingSelectedTranscriptionComputeType(); - asyncStdoutToPython("/get/data/transcription_compute_type"); + asyncStdoutToPython("/get/data/selected_transcription_compute_type"); }; const setSelectedTranscriptionComputeType = (selected_transcription_compute_type) => { pendingSelectedTranscriptionComputeType(); - asyncStdoutToPython("/set/data/transcription_compute_type", selected_transcription_compute_type); + asyncStdoutToPython("/set/data/selected_transcription_compute_type", selected_transcription_compute_type); }; const setSuccessSelectedTranscriptionComputeType = (selected_transcription_compute_type) => { diff --git a/src-ui/logics/configs/translation/useTranslation.js b/src-ui/logics/configs/translation/useTranslation.js index 5c3bb83e..ea288a02 100644 --- a/src-ui/logics/configs/translation/useTranslation.js +++ b/src-ui/logics/configs/translation/useTranslation.js @@ -87,12 +87,12 @@ export const useTranslation = () => { const getSelectedTranslationComputeType = () => { pendingSelectedTranslationComputeType(); - asyncStdoutToPython("/get/data/translation_compute_type"); + asyncStdoutToPython("/get/data/selected_translation_compute_type"); }; const setSelectedTranslationComputeType = (selected_translation_compute_type) => { pendingSelectedTranslationComputeType(); - asyncStdoutToPython("/set/data/translation_compute_type", selected_translation_compute_type); + asyncStdoutToPython("/set/data/selected_translation_compute_type", selected_translation_compute_type); }; const setSuccessSelectedTranslationComputeType = (selected_translation_compute_type) => { diff --git a/src-ui/logics/useReceiveRoutes.js b/src-ui/logics/useReceiveRoutes.js index 049697a3..bb21acfd 100644 --- a/src-ui/logics/useReceiveRoutes.js +++ b/src-ui/logics/useReceiveRoutes.js @@ -172,8 +172,9 @@ export const ROUTE_META_LIST = [ { endpoint: "/get/data/ctranslate2_weight_type", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedCTranslate2WeightType" }, { endpoint: "/set/data/ctranslate2_weight_type", ns: configs, hook_name: "useTranslation", method_name: "setSuccessSelectedCTranslate2WeightType" }, - { endpoint: "/get/data/translation_compute_type", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedTranslationComputeType" }, - { endpoint: "/set/data/translation_compute_type", ns: configs, hook_name: "useTranslation", method_name: "setSuccessSelectedTranslationComputeType" }, + { endpoint: "/run/selected_translation_compute_type", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedTranslationComputeType" }, + { endpoint: "/get/data/selected_translation_compute_type", ns: configs, hook_name: "useTranslation", method_name: "updateSelectedTranslationComputeType" }, + { endpoint: "/set/data/selected_translation_compute_type", ns: configs, hook_name: "useTranslation", method_name: "setSuccessSelectedTranslationComputeType" }, { endpoint: "/run/downloaded_ctranslate2_weight", ns: configs, hook_name: "useTranslation", method_name: "downloadedCTranslate2WeightType" }, { endpoint: "/run/download_ctranslate2_weight", ns: null, hook_name: null, method_name: null }, @@ -217,8 +218,9 @@ export const ROUTE_META_LIST = [ { endpoint: "/get/data/whisper_weight_type", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedWhisperWeightType" }, { endpoint: "/set/data/whisper_weight_type", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSelectedWhisperWeightType" }, - { endpoint: "/get/data/transcription_compute_type", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedTranscriptionComputeType" }, - { endpoint: "/set/data/transcription_compute_type", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSelectedTranscriptionComputeType" }, + { endpoint: "/run/selected_transcription_compute_type", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedTranscriptionComputeType" }, + { endpoint: "/get/data/selected_transcription_compute_type", ns: configs, hook_name: "useTranscription", method_name: "updateSelectedTranscriptionComputeType" }, + { endpoint: "/set/data/selected_transcription_compute_type", ns: configs, hook_name: "useTranscription", method_name: "setSuccessSelectedTranscriptionComputeType" }, { endpoint: "/run/downloaded_whisper_weight", ns: configs, hook_name: "useTranscription", method_name: "downloadedWhisperWeightType" },