[Update/Chore] UI: Compute Type: Rename and add endpoint '/run/'.

This commit is contained in:
Sakamoto Shiina
2025-09-27 07:55:45 +09:00
parent 6effedcce2
commit e9067c05c6
3 changed files with 10 additions and 8 deletions

View File

@@ -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) => {

View File

@@ -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) => {

View File

@@ -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" },