xinference 1.10.0__py3-none-any.whl → 1.10.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xinference might be problematic. Click here for more details.
- xinference/_version.py +3 -3
- xinference/api/restful_api.py +11 -28
- xinference/client/restful/async_restful_client.py +20 -3
- xinference/client/restful/restful_client.py +20 -3
- xinference/core/supervisor.py +87 -53
- xinference/core/worker.py +10 -0
- xinference/deploy/cmdline.py +15 -0
- xinference/model/audio/core.py +21 -6
- xinference/model/audio/indextts2.py +166 -0
- xinference/model/audio/model_spec.json +38 -1
- xinference/model/image/model_spec.json +69 -0
- xinference/model/image/stable_diffusion/core.py +13 -4
- xinference/model/llm/__init__.py +4 -0
- xinference/model/llm/llm_family.json +464 -2
- xinference/model/llm/sglang/core.py +30 -11
- xinference/model/llm/tool_parsers/deepseek_r1_tool_parser.py +94 -32
- xinference/model/llm/transformers/multimodal/qwen2_vl.py +34 -8
- xinference/model/llm/utils.py +12 -9
- xinference/model/llm/vllm/core.py +93 -17
- xinference/thirdparty/audiotools/__init__.py +10 -0
- xinference/thirdparty/audiotools/core/__init__.py +4 -0
- xinference/thirdparty/audiotools/core/audio_signal.py +1682 -0
- xinference/thirdparty/audiotools/core/display.py +194 -0
- xinference/thirdparty/audiotools/core/dsp.py +390 -0
- xinference/thirdparty/audiotools/core/effects.py +647 -0
- xinference/thirdparty/audiotools/core/ffmpeg.py +211 -0
- xinference/thirdparty/audiotools/core/loudness.py +320 -0
- xinference/thirdparty/audiotools/core/playback.py +252 -0
- xinference/thirdparty/audiotools/core/templates/__init__.py +0 -0
- xinference/thirdparty/audiotools/core/templates/headers.html +322 -0
- xinference/thirdparty/audiotools/core/templates/pandoc.css +407 -0
- xinference/thirdparty/audiotools/core/templates/widget.html +52 -0
- xinference/thirdparty/audiotools/core/util.py +671 -0
- xinference/thirdparty/audiotools/core/whisper.py +97 -0
- xinference/thirdparty/audiotools/data/__init__.py +3 -0
- xinference/thirdparty/audiotools/data/datasets.py +517 -0
- xinference/thirdparty/audiotools/data/preprocess.py +81 -0
- xinference/thirdparty/audiotools/data/transforms.py +1592 -0
- xinference/thirdparty/audiotools/metrics/__init__.py +6 -0
- xinference/thirdparty/audiotools/metrics/distance.py +131 -0
- xinference/thirdparty/audiotools/metrics/quality.py +159 -0
- xinference/thirdparty/audiotools/metrics/spectral.py +247 -0
- xinference/thirdparty/audiotools/ml/__init__.py +5 -0
- xinference/thirdparty/audiotools/ml/accelerator.py +184 -0
- xinference/thirdparty/audiotools/ml/decorators.py +440 -0
- xinference/thirdparty/audiotools/ml/experiment.py +90 -0
- xinference/thirdparty/audiotools/ml/layers/__init__.py +2 -0
- xinference/thirdparty/audiotools/ml/layers/base.py +328 -0
- xinference/thirdparty/audiotools/ml/layers/spectral_gate.py +127 -0
- xinference/thirdparty/audiotools/post.py +140 -0
- xinference/thirdparty/audiotools/preference.py +600 -0
- xinference/thirdparty/indextts/BigVGAN/ECAPA_TDNN.py +656 -0
- xinference/thirdparty/indextts/BigVGAN/__init__.py +0 -0
- xinference/thirdparty/indextts/BigVGAN/activations.py +122 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/__init__.py +0 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/.gitignore +1 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/__init__.py +0 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/activation1d.py +76 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/anti_alias_activation.cpp +23 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/anti_alias_activation_cuda.cu +256 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/compat.h +29 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/load.py +121 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/cuda/type_shim.h +92 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/torch/__init__.py +6 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/torch/act.py +31 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/torch/filter.py +102 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_activation/torch/resample.py +58 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_torch/__init__.py +6 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_torch/act.py +29 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_torch/filter.py +96 -0
- xinference/thirdparty/indextts/BigVGAN/alias_free_torch/resample.py +49 -0
- xinference/thirdparty/indextts/BigVGAN/bigvgan.py +534 -0
- xinference/thirdparty/indextts/BigVGAN/models.py +451 -0
- xinference/thirdparty/indextts/BigVGAN/nnet/CNN.py +546 -0
- xinference/thirdparty/indextts/BigVGAN/nnet/__init__.py +0 -0
- xinference/thirdparty/indextts/BigVGAN/nnet/linear.py +89 -0
- xinference/thirdparty/indextts/BigVGAN/nnet/normalization.py +670 -0
- xinference/thirdparty/indextts/BigVGAN/utils.py +101 -0
- xinference/thirdparty/indextts/__init__.py +0 -0
- xinference/thirdparty/indextts/cli.py +65 -0
- xinference/thirdparty/indextts/gpt/__init__.py +0 -0
- xinference/thirdparty/indextts/gpt/conformer/__init__.py +0 -0
- xinference/thirdparty/indextts/gpt/conformer/attention.py +312 -0
- xinference/thirdparty/indextts/gpt/conformer/embedding.py +163 -0
- xinference/thirdparty/indextts/gpt/conformer/subsampling.py +348 -0
- xinference/thirdparty/indextts/gpt/conformer_encoder.py +520 -0
- xinference/thirdparty/indextts/gpt/model.py +713 -0
- xinference/thirdparty/indextts/gpt/model_v2.py +747 -0
- xinference/thirdparty/indextts/gpt/perceiver.py +317 -0
- xinference/thirdparty/indextts/gpt/transformers_beam_search.py +1013 -0
- xinference/thirdparty/indextts/gpt/transformers_generation_utils.py +4747 -0
- xinference/thirdparty/indextts/gpt/transformers_gpt2.py +1878 -0
- xinference/thirdparty/indextts/gpt/transformers_modeling_utils.py +5525 -0
- xinference/thirdparty/indextts/infer.py +690 -0
- xinference/thirdparty/indextts/infer_v2.py +739 -0
- xinference/thirdparty/indextts/s2mel/dac/__init__.py +16 -0
- xinference/thirdparty/indextts/s2mel/dac/__main__.py +36 -0
- xinference/thirdparty/indextts/s2mel/dac/model/__init__.py +4 -0
- xinference/thirdparty/indextts/s2mel/dac/model/base.py +294 -0
- xinference/thirdparty/indextts/s2mel/dac/model/dac.py +400 -0
- xinference/thirdparty/indextts/s2mel/dac/model/discriminator.py +228 -0
- xinference/thirdparty/indextts/s2mel/dac/model/encodec.py +320 -0
- xinference/thirdparty/indextts/s2mel/dac/nn/__init__.py +3 -0
- xinference/thirdparty/indextts/s2mel/dac/nn/layers.py +33 -0
- xinference/thirdparty/indextts/s2mel/dac/nn/loss.py +368 -0
- xinference/thirdparty/indextts/s2mel/dac/nn/quantize.py +339 -0
- xinference/thirdparty/indextts/s2mel/dac/utils/__init__.py +123 -0
- xinference/thirdparty/indextts/s2mel/dac/utils/decode.py +95 -0
- xinference/thirdparty/indextts/s2mel/dac/utils/encode.py +94 -0
- xinference/thirdparty/indextts/s2mel/hf_utils.py +12 -0
- xinference/thirdparty/indextts/s2mel/modules/alias_free_torch/__init__.py +5 -0
- xinference/thirdparty/indextts/s2mel/modules/alias_free_torch/act.py +29 -0
- xinference/thirdparty/indextts/s2mel/modules/alias_free_torch/filter.py +96 -0
- xinference/thirdparty/indextts/s2mel/modules/alias_free_torch/resample.py +57 -0
- xinference/thirdparty/indextts/s2mel/modules/audio.py +82 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/activations.py +120 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/__init__.py +0 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/activation1d.py +77 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/anti_alias_activation.cpp +23 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/anti_alias_activation_cuda.cu +246 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/compat.h +29 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/load.py +86 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/cuda/type_shim.h +92 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/torch/__init__.py +6 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/torch/act.py +30 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/torch/filter.py +101 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/alias_free_activation/torch/resample.py +58 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/bigvgan.py +492 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/config.json +63 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/env.py +18 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/meldataset.py +354 -0
- xinference/thirdparty/indextts/s2mel/modules/bigvgan/utils.py +99 -0
- xinference/thirdparty/indextts/s2mel/modules/campplus/DTDNN.py +115 -0
- xinference/thirdparty/indextts/s2mel/modules/campplus/classifier.py +70 -0
- xinference/thirdparty/indextts/s2mel/modules/campplus/layers.py +253 -0
- xinference/thirdparty/indextts/s2mel/modules/commons.py +632 -0
- xinference/thirdparty/indextts/s2mel/modules/diffusion_transformer.py +257 -0
- xinference/thirdparty/indextts/s2mel/modules/encodec.py +292 -0
- xinference/thirdparty/indextts/s2mel/modules/flow_matching.py +171 -0
- xinference/thirdparty/indextts/s2mel/modules/gpt_fast/generate.py +436 -0
- xinference/thirdparty/indextts/s2mel/modules/gpt_fast/model.py +360 -0
- xinference/thirdparty/indextts/s2mel/modules/gpt_fast/quantize.py +622 -0
- xinference/thirdparty/indextts/s2mel/modules/hifigan/f0_predictor.py +55 -0
- xinference/thirdparty/indextts/s2mel/modules/hifigan/generator.py +454 -0
- xinference/thirdparty/indextts/s2mel/modules/layers.py +354 -0
- xinference/thirdparty/indextts/s2mel/modules/length_regulator.py +141 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/__init__.py +0 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/api.py +186 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/attentions.py +465 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/checkpoints_v2/converter/config.json +57 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/commons.py +160 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/mel_processing.py +183 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/models.py +499 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/modules.py +598 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/openvoice_app.py +275 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/se_extractor.py +153 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/transforms.py +209 -0
- xinference/thirdparty/indextts/s2mel/modules/openvoice/utils.py +194 -0
- xinference/thirdparty/indextts/s2mel/modules/quantize.py +229 -0
- xinference/thirdparty/indextts/s2mel/modules/rmvpe.py +631 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/__init__.py +4 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/heads.py +164 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/helpers.py +71 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/loss.py +114 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/models.py +118 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/modules.py +213 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/pretrained.py +51 -0
- xinference/thirdparty/indextts/s2mel/modules/vocos/spectral_ops.py +192 -0
- xinference/thirdparty/indextts/s2mel/modules/wavenet.py +174 -0
- xinference/thirdparty/indextts/s2mel/optimizers.py +96 -0
- xinference/thirdparty/indextts/s2mel/wav2vecbert_extract.py +148 -0
- xinference/thirdparty/indextts/utils/__init__.py +0 -0
- xinference/thirdparty/indextts/utils/arch_util.py +120 -0
- xinference/thirdparty/indextts/utils/checkpoint.py +34 -0
- xinference/thirdparty/indextts/utils/common.py +121 -0
- xinference/thirdparty/indextts/utils/feature_extractors.py +50 -0
- xinference/thirdparty/indextts/utils/front.py +536 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/__init__.py +0 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/codec.py +427 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/quantize/__init__.py +11 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/quantize/factorized_vector_quantize.py +150 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/quantize/lookup_free_quantize.py +77 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/quantize/residual_vq.py +177 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/quantize/vector_quantize.py +401 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/amphion_codec/vocos.py +881 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/codec_dataset.py +264 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/codec_inference.py +515 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/codec_sampler.py +126 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/codec_trainer.py +166 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/__init__.py +0 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/alias_free_torch/__init__.py +5 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/alias_free_torch/act.py +29 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/alias_free_torch/filter.py +96 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/alias_free_torch/resample.py +57 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/facodec_dataset.py +98 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/facodec_inference.py +137 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/facodec_trainer.py +776 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/JDC/__init__.py +1 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/JDC/bst.t7 +0 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/JDC/model.py +219 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/attentions.py +437 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/commons.py +331 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/gradient_reversal.py +35 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/layers.py +460 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/quantize.py +741 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/style_encoder.py +110 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/modules/wavenet.py +224 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/facodec/optimizer.py +104 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/kmeans/repcodec_model.py +210 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/kmeans/vocos.py +850 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/melvqgan/melspec.py +108 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/README.md +216 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/__init__.py +6 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/alias_free_torch/__init__.py +5 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/alias_free_torch/act.py +29 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/alias_free_torch/filter.py +96 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/alias_free_torch/resample.py +57 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/facodec.py +1222 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/gradient_reversal.py +35 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/melspec.py +102 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/quantize/__init__.py +7 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/quantize/fvq.py +116 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/quantize/rvq.py +87 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/ns3_codec/transformer.py +234 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/model.py +184 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/__init__.py +27 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/conv.py +346 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/lstm.py +46 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/norm.py +37 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/quantization/__init__.py +14 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/quantization/ac.py +317 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/quantization/core_vq.py +388 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/quantization/distrib.py +135 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/quantization/vq.py +125 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/speechtokenizer/modules/seanet.py +414 -0
- xinference/thirdparty/indextts/utils/maskgct/models/codec/vevo/vevo_repcodec.py +592 -0
- xinference/thirdparty/indextts/utils/maskgct/models/tts/maskgct/ckpt/wav2vec2bert_stats.pt +0 -0
- xinference/thirdparty/indextts/utils/maskgct/models/tts/maskgct/llama_nar.py +650 -0
- xinference/thirdparty/indextts/utils/maskgct/models/tts/maskgct/maskgct_s2a.py +503 -0
- xinference/thirdparty/indextts/utils/maskgct_utils.py +259 -0
- xinference/thirdparty/indextts/utils/text_utils.py +41 -0
- xinference/thirdparty/indextts/utils/typical_sampling.py +30 -0
- xinference/thirdparty/indextts/utils/utils.py +93 -0
- xinference/thirdparty/indextts/utils/webui_utils.py +42 -0
- xinference/thirdparty/indextts/utils/xtransformers.py +1247 -0
- xinference/thirdparty/indextts/vqvae/__init__.py +0 -0
- xinference/thirdparty/indextts/vqvae/xtts_dvae.py +395 -0
- xinference/ui/gradio/media_interface.py +66 -8
- xinference/ui/web/ui/build/asset-manifest.json +6 -6
- xinference/ui/web/ui/build/index.html +1 -1
- xinference/ui/web/ui/build/static/css/main.5ea97072.css +2 -0
- xinference/ui/web/ui/build/static/css/main.5ea97072.css.map +1 -0
- xinference/ui/web/ui/build/static/js/main.d192c4f3.js +3 -0
- xinference/ui/web/ui/build/static/js/{main.1086c759.js.LICENSE.txt → main.d192c4f3.js.LICENSE.txt} +0 -7
- xinference/ui/web/ui/build/static/js/main.d192c4f3.js.map +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/089c38df5f52348d212ed868dda5c518a42e0c2762caed4175487c0405830c35.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/2b6e3a5b6eb2c5c5f2d007e68cd46c372721cd52bf63508adcdb21ecf79241d8.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/2d887825fd07a56f872eda4420da25fba0b5b62a23bdcc6c6da1a5281887f618.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/4001f9c3e64e73a4f2158826650c174a59d5e3f89ddecddf17cbb6bb688cc4ca.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/4a7018a69e6b7f90fc313248c2aa86f2a8f1eb1db120df586047a8023549b44b.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/64b12aaa1c1d1bf53820ada8a63769067c0ccc5aab46b32348eb1917ae7f2a11.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/7275b67c78ec76ce38a686bb8a576d8c9cecf54e1573614c84859d538efb9be5.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/a68b6ee3b31eadc051fb95ce8f8ccb9c2e8b52c60f290dbab545a1917e065282.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/ae8771cc37693feb160fa8727231312a0c54ef2d1d1ca893be568cd70016ca7e.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/bb4e8722d2d41d87f1fce3661bc8937bffe9448e231fc5f0462630849e851592.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/be6aada1ee4adc2bbf65dbe56d17db32bb3b5478be05d6b527805a8ba6cfb2b9.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/de91c352653c233cf0cb6674e6e04049a44fd0e1156560de65d5c4620521391e.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/e85f7002fc325c83b9c9cd8a1619e5b3ebc701d30e811afc284b88e6ae710cb5.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/e8b603c78944bf3d213639078bfe155ff5c0dfa4048a93cbb967cad6a4eb4ff3.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/f05535160a508b2a312de546a6de234776c613db276479ea4253c0b1bdeeb7d6.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/f09ba9e11106bd59a0de10cc85c55084097729dcab575f43dfcf07375961ed87.json +1 -0
- xinference/ui/web/ui/node_modules/.cache/babel-loader/f995a2425dfb0822fd07127f66ffe9b026883bc156b402eb8bd0b83d52460a93.json +1 -0
- xinference/ui/web/ui/node_modules/.package-lock.json +0 -33
- xinference/ui/web/ui/package-lock.json +0 -34
- xinference/ui/web/ui/package.json +0 -1
- xinference/ui/web/ui/src/locales/en.json +9 -3
- xinference/ui/web/ui/src/locales/ja.json +9 -3
- xinference/ui/web/ui/src/locales/ko.json +9 -3
- xinference/ui/web/ui/src/locales/zh.json +9 -3
- {xinference-1.10.0.dist-info → xinference-1.10.1.dist-info}/METADATA +18 -2
- {xinference-1.10.0.dist-info → xinference-1.10.1.dist-info}/RECORD +285 -67
- xinference/ui/web/ui/build/static/css/main.013f296b.css +0 -2
- xinference/ui/web/ui/build/static/css/main.013f296b.css.map +0 -1
- xinference/ui/web/ui/build/static/js/main.1086c759.js +0 -3
- xinference/ui/web/ui/build/static/js/main.1086c759.js.map +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/0b0f77000cc1b482ca091cfbcae511dfe02f08916971645fad21d0b1234d04a2.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/1c5f8ff423a7c9202bea60b15680f04b1e9964b445b0da3f86c6ff70cf24e797.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/44ce7993e344980e3ed4f13e8f69237d4a5dfc60e37ca6b54f51f8ee1357bd67.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/4aec1cc414ac3ebb3481d3d915e4db597d9127de813291346eacb8554ab170d4.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/644cfec52f3c57a6e222ce60f112237a1efefe9835efd9aad857a685f53d8eed.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/663436f72af53fe0d72394f56d003fa4e0bba489e5bb4e483fd34b00f84637f7.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/69db82ca9bfe27fe417cc6cf2b1716b09be9c6f0cd198530f12bfc60e801bbcf.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/85087e27618d740c236bf159f30e0219db443ab55f0997388eed5fde6f9e90cc.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/88b07838348864aa86c672be3bbca1e9f58f6f3a2881b32070ec27f4e7b449d1.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/8b8cd408ccfbe115acef27ccfa5b233da8597131a2a5712add13e1e4d5d4504b.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/a23824fe746b9c6ca5eee9159b5764d1ff1653c1d856288c0f75c742bbb0023b.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/a3eb18af328280b139693c9092dff2a0ef8c9a967e6c8956ceee0996611f1984.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/bc1aacc65a102db325ca61bcd2f681e1ae22c36a1f1d98a6ff5e4ad49dc7544f.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/c682fd521747c19dae437d83ce3235a306ce6b68e24a117bc57c27ebb8d1f1ca.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/d5c224be7081f18cba1678b7874a9782eba895df004874ff8f243f94ba79942a.json +0 -1
- xinference/ui/web/ui/node_modules/.cache/babel-loader/f7f18bfb539b036a6a342176dd98a85df5057a884a8da978d679f2a0264883d0.json +0 -1
- xinference/ui/web/ui/node_modules/clipboard/.babelrc.json +0 -11
- xinference/ui/web/ui/node_modules/clipboard/.eslintrc.json +0 -24
- xinference/ui/web/ui/node_modules/clipboard/.prettierrc.json +0 -9
- xinference/ui/web/ui/node_modules/clipboard/bower.json +0 -18
- xinference/ui/web/ui/node_modules/clipboard/composer.json +0 -25
- xinference/ui/web/ui/node_modules/clipboard/package.json +0 -63
- xinference/ui/web/ui/node_modules/delegate/package.json +0 -31
- xinference/ui/web/ui/node_modules/good-listener/bower.json +0 -11
- xinference/ui/web/ui/node_modules/good-listener/package.json +0 -35
- xinference/ui/web/ui/node_modules/select/bower.json +0 -13
- xinference/ui/web/ui/node_modules/select/package.json +0 -29
- xinference/ui/web/ui/node_modules/tiny-emitter/package.json +0 -53
- {xinference-1.10.0.dist-info → xinference-1.10.1.dist-info}/WHEEL +0 -0
- {xinference-1.10.0.dist-info → xinference-1.10.1.dist-info}/entry_points.txt +0 -0
- {xinference-1.10.0.dist-info → xinference-1.10.1.dist-info}/licenses/LICENSE +0 -0
- {xinference-1.10.0.dist-info → xinference-1.10.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"export var llmAllDataKey=['model_uid','model_name','model_type','model_engine','model_format','model_size_in_billions','quantization','n_worker','n_gpu','n_gpu_layers','replica','request_limits','worker_ip','gpu_idx','download_hub','model_path','reasoning_content','gguf_quantization','gguf_model_path','lightning_version','lightning_model_path','cpu_offload','peft_model_config','quantization_config','enable_thinking','multimodal_projector','enable_virtual_env','virtual_env_packages','envs'];export var additionalParameterTipList={'transformers':['torch_dtype','device','enable_flash_attn'],'llama.cpp':['n_ctx','use_mmap','use_mlock'],'vllm':['block_size','gpu_memory_utilization','max_num_seqs','max_model_len','guided_decoding_backend','scheduling_policy','tensor_parallel_size','pipeline_parallel_size','enable_prefix_caching','enable_chunked_prefill','enable_expert_parallel','enforce_eager','cpu_offload_gb','disable_custom_all_reduce','limit_mm_per_prompt','model_quantization','mm_processor_kwargs','min_pixels','max_pixels'],'sglang':['mem_fraction_static','attention_reduce_in_fp32','tp_size','dp_size','chunked_prefill_size','cpu_offload_gb','enable_dp_attention','enable_ep_moe'],'mlx':['cache_limit_gb','max_kv_size']};export var quantizationParametersTipList=['load_in_8bit','load_in_4bit','llm_int8_threshold','llm_int8_skip_modules','llm_int8_enable_fp32_cpu_offload','llm_int8_has_fp16_weight','bnb_4bit_compute_dtype','bnb_4bit_quant_type','bnb_4bit_use_double_quant','bnb_4bit_quant_storage'];export var featureModels=[{type:'llm',feature_models:['Deepseek-V3.1','gpt-oss','qwen3','Ernie4.5','deepseek-r1-0528','deepseek-r1-0528-qwen3','qwen2.5-vl-instruct','glm-4.5','QwQ-32B','gemma-3-it']},{type:'embedding',feature_models:['Qwen3-Embedding-0.6B','Qwen3-Embedding-4B','Qwen3-Embedding-8B','bge-large-zh-v1.5','bge-large-en-v1.5','bge-m3','gte-Qwen2','jina-embeddings-v3']},{type:'rerank',feature_models:[]},{type:'image',feature_models:['Qwen-Image','Qwen-Image-Edit-2509','FLUX.1-dev','FLUX.1-Kontext-dev','FLUX.1-schnell','sd3.5-large','HunyuanDiT-v1.2','cogview4','sd3.5-medium']},{type:'audio',feature_models:['IndexTTS2','CosyVoice2-0.5B','FishSpeech-1.5','F5-TTS','ChatTTS','SenseVoiceSmall','whisper-large-v3']},{type:'video',feature_models:[]}];","map":{"version":3,"names":["llmAllDataKey","additionalParameterTipList","quantizationParametersTipList","featureModels","type","feature_models"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/launch_model/data/data.js"],"sourcesContent":["export const llmAllDataKey = [\n 'model_uid',\n 'model_name',\n 'model_type',\n 'model_engine',\n 'model_format',\n 'model_size_in_billions',\n 'quantization',\n 'n_worker',\n 'n_gpu',\n 'n_gpu_layers',\n 'replica',\n 'request_limits',\n 'worker_ip',\n 'gpu_idx',\n 'download_hub',\n 'model_path',\n 'reasoning_content',\n 'gguf_quantization',\n 'gguf_model_path',\n 'lightning_version',\n 'lightning_model_path',\n 'cpu_offload',\n 'peft_model_config',\n 'quantization_config',\n 'enable_thinking',\n 'multimodal_projector',\n 'enable_virtual_env',\n 'virtual_env_packages',\n 'envs',\n]\n\nexport const additionalParameterTipList = {\n 'transformers': ['torch_dtype', 'device', 'enable_flash_attn'],\n 'llama.cpp': ['n_ctx', 'use_mmap', 'use_mlock'],\n 'vllm': [\n 'block_size',\n 'gpu_memory_utilization',\n 'max_num_seqs',\n 'max_model_len',\n 'guided_decoding_backend',\n 'scheduling_policy',\n 'tensor_parallel_size',\n 'pipeline_parallel_size',\n 'enable_prefix_caching',\n 'enable_chunked_prefill',\n 'enable_expert_parallel',\n 'enforce_eager',\n 'cpu_offload_gb',\n 'disable_custom_all_reduce',\n 'limit_mm_per_prompt',\n 'model_quantization',\n 'mm_processor_kwargs',\n 'min_pixels',\n 'max_pixels',\n ],\n 'sglang': [\n 'mem_fraction_static',\n 'attention_reduce_in_fp32',\n 'tp_size',\n 'dp_size',\n 'chunked_prefill_size',\n 'cpu_offload_gb',\n 'enable_dp_attention',\n 'enable_ep_moe',\n ],\n 'mlx': ['cache_limit_gb', 'max_kv_size'],\n}\n\nexport const quantizationParametersTipList = [\n 'load_in_8bit',\n 'load_in_4bit',\n 'llm_int8_threshold',\n 'llm_int8_skip_modules',\n 'llm_int8_enable_fp32_cpu_offload',\n 'llm_int8_has_fp16_weight',\n 'bnb_4bit_compute_dtype',\n 'bnb_4bit_quant_type',\n 'bnb_4bit_use_double_quant',\n 'bnb_4bit_quant_storage',\n]\n\nexport const featureModels = [\n {\n type: 'llm',\n feature_models: [\n 'Deepseek-V3.1',\n 'gpt-oss',\n 'qwen3',\n 'Ernie4.5',\n 'deepseek-r1-0528',\n 'deepseek-r1-0528-qwen3',\n 'qwen2.5-vl-instruct',\n 'glm-4.5',\n 'QwQ-32B',\n 'gemma-3-it',\n ],\n },\n {\n type: 'embedding',\n feature_models: [\n 'Qwen3-Embedding-0.6B',\n 'Qwen3-Embedding-4B',\n 'Qwen3-Embedding-8B',\n 'bge-large-zh-v1.5',\n 'bge-large-en-v1.5',\n 'bge-m3',\n 'gte-Qwen2',\n 'jina-embeddings-v3',\n ],\n },\n {\n type: 'rerank',\n feature_models: [],\n },\n {\n type: 'image',\n feature_models: [\n 'Qwen-Image',\n 'Qwen-Image-Edit-2509',\n 'FLUX.1-dev',\n 'FLUX.1-Kontext-dev',\n 'FLUX.1-schnell',\n 'sd3.5-large',\n 'HunyuanDiT-v1.2',\n 'cogview4',\n 'sd3.5-medium',\n ],\n },\n {\n type: 'audio',\n feature_models: [\n 'IndexTTS2',\n 'CosyVoice2-0.5B',\n 'FishSpeech-1.5',\n 'F5-TTS',\n 'ChatTTS',\n 'SenseVoiceSmall',\n 'whisper-large-v3',\n ],\n },\n {\n type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AA2B,CAC3B,wBAAwB,CACzB,CAED,MAAO,IAAM,CAAAC,aAAa,CAAG,CAC3B,CACEC,IAAI,CAAE,KAAK,CACXC,cAAc,CAAE,CACd,eAAe,CACf,SAAS,CACT,OAAO,CACP,UAAU,CACV,kBAAkB,CAClB,wBAAwB,CACxB,qBAAqB,CACrB,SAAS,CACT,SAAS,CACT,YAAY,CAEhB,CAAC,CACD,CACED,IAAI,CAAE,WAAW,CACjBC,cAAc,CAAE,CACd,sBAAsB,CACtB,oBAAoB,CACpB,oBAAoB,CACpB,mBAAmB,CACnB,mBAAmB,CACnB,QAAQ,CACR,WAAW,CACX,oBAAoB,CAExB,CAAC,CACD,CACED,IAAI,CAAE,QAAQ,CACdC,cAAc,CAAE,EAClB,CAAC,CACD,CACED,IAAI,CAAE,OAAO,CACbC,cAAc,CAAE,CACd,YAAY,CACZ,sBAAsB,CACtB,YAAY,CACZ,oBAAoB,CACpB,gBAAgB,CAChB,aAAa,CACb,iBAAiB,CACjB,UAAU,CACV,cAAc,CAElB,CAAC,CACD,CACED,IAAI,CAAE,OAAO,CACbC,cAAc,CAAE,CACd,WAAW,CACX,iBAAiB,CACjB,gBAAgB,CAChB,QAAQ,CACR,SAAS,CACT,iBAAiB,CACjB,kBAAkB,CAEtB,CAAC,CACD,CACED,IAAI,CAAE,OAAO,CACbC,cAAc,CAAE,EAClB,CAAC,CACF","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z\"\n}), 'AddCircle');\nexports.default = _default;","map":{"version":3,"names":["_interopRequireDefault","require","Object","defineProperty","exports","value","default","_createSvgIcon","_jsxRuntime","_default","jsx","d"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@mui/icons-material/AddCircle.js"],"sourcesContent":["\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z\"\n}), 'AddCircle');\nexports.default = _default;"],"mappings":"AAAA,YAAY;AACZ,YAAY;;AAEZ,IAAIA,sBAAsB,GAAGC,OAAO,CAAC,8CAA8C,CAAC;AACpFC,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAC3CC,KAAK,EAAE;AACT,CAAC,CAAC;AACFD,OAAO,CAACE,OAAO,GAAG,KAAK,CAAC;AACxB,IAAIC,cAAc,GAAGP,sBAAsB,CAACC,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAC7E,IAAIO,WAAW,GAAGP,OAAO,CAAC,mBAAmB,CAAC;AAC9C,IAAIQ,QAAQ,GAAG,CAAC,CAAC,EAAEF,cAAc,CAACD,OAAO,GAAG,aAAa,CAAC,CAAC,EAAEE,WAAW,CAACE,GAAG,EAAE,MAAM,EAAE;EACpFC,CAAC,EAAE;AACL,CAAC,CAAC,EAAE,WAAW,CAAC;AAChBP,OAAO,CAACE,OAAO,GAAGG,QAAQ","ignoreList":[]},"metadata":{},"sourceType":"script","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _regeneratorRuntime from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _asyncToGenerator from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{TabContext,TabList,TabPanel}from'@mui/lab';import{Box,FormControl,Tab}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{useTranslation}from'react-i18next';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import fetchWrapper from'../../components/fetchWrapper';import HotkeyFocusTextField from'../../components/hotkeyFocusTextField';import LaunchModelDrawer from'./components/launchModelDrawer';import ModelCard from'./modelCard';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var customType=['llm','embedding','rerank','image','audio','flexible'];var LaunchCustom=function LaunchCustom(_ref){var gpuAvailable=_ref.gpuAvailable;var endPoint=useContext(ApiContext).endPoint;var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;// States used for filtering\nvar _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useState5=useState(sessionStorage.getItem('subType')),_useState6=_slicedToArray(_useState5,2),value=_useState6[0],setValue=_useState6[1];var _useState7=useState(null),_useState8=_slicedToArray(_useState7,2),selectedModel=_useState8[0],setSelectedModel=_useState8[1];var _useState9=useState(false),_useState10=_slicedToArray(_useState9,2),isOpenLaunchModelDrawer=_useState10[0],setIsOpenLaunchModelDrawer=_useState10[1];var _useTranslation=useTranslation(),t=_useTranslation.t;var navigate=useNavigate();var handleTabChange=function handleTabChange(_,newValue){var type=newValue.split('/')[3]==='llm'?'LLM':newValue.split('/')[3];update(type);setValue(newValue);navigate(newValue);sessionStorage.setItem('subType',newValue);};var handleSearchChange=function handleSearchChange(event){setSearchTerm(event.target.value);};var filter=function filter(registration){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';return modelName.includes(searchTerm.toLowerCase());};useEffect(function(){var type=sessionStorage.getItem('subType').split('/')[3];update(type==='llm'?'LLM':type);},[]);var update=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(type){var data,customRegistrations,newData;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!(isCallingApi||isUpdatingModel)){_context2.next=2;break;}return _context2.abrupt(\"return\");case 2:_context2.prev=2;setIsCallingApi(true);_context2.next=6;return fetchWrapper.get(\"/v1/model_registrations/\".concat(type));case 6:data=_context2.sent;customRegistrations=data.filter(function(data){return!data.is_builtin;});_context2.next=10;return Promise.all(customRegistrations.map(/*#__PURE__*/function(){var _ref3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(registration){var desc;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return fetchWrapper.get(\"/v1/model_registrations/\".concat(type,\"/\").concat(registration.model_name));case 2:desc=_context.sent;return _context.abrupt(\"return\",_objectSpread(_objectSpread({},desc),{},{is_builtin:registration.is_builtin}));case 4:case\"end\":return _context.stop();}},_callee);}));return function(_x2){return _ref3.apply(this,arguments);};}()));case 10:newData=_context2.sent;setRegistrationData(newData);_context2.next=17;break;case 14:_context2.prev=14;_context2.t0=_context2[\"catch\"](2);console.error('Error:',_context2.t0);case 17:_context2.prev=17;setIsCallingApi(false);return _context2.finish(17);case 20:case\"end\":return _context2.stop();}},_callee2,null,[[2,14,17,20]]);}));return function update(_x){return _ref2.apply(this,arguments);};}();var style={display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',paddingBottom:'2rem',gridGap:'2rem 0rem'};return/*#__PURE__*/_jsx(Box,{m:\"20px\",children:/*#__PURE__*/_jsxs(TabContext,{value:value,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:value,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:t('model.languageModels'),value:\"/launch_model/custom/llm\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.embeddingModels'),value:\"/launch_model/custom/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.rerankModels'),value:\"/launch_model/custom/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.imageModels'),value:\"/launch_model/custom/image\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.audioModels'),value:\"/launch_model/custom/audio\"}),/*#__PURE__*/_jsx(Tab,{label:t('model.flexibleModels'),value:\"/launch_model/custom/flexible\"})]})}),customType.map(function(item){return/*#__PURE__*/_jsxs(TabPanel,{value:\"/launch_model/custom/\".concat(item),sx:{padding:0},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'1fr',margin:'30px 2rem'},children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(HotkeyFocusTextField,{id:\"search\",type:\"search\",label:t('launchModel.search'),value:searchTerm,onChange:handleSearchChange,size:\"small\",hotkey:\"Enter\",t:t})})}),/*#__PURE__*/_jsx(\"div\",{style:style,children:registrationData.filter(function(registration){return filter(registration);}).map(function(filteredRegistration){return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,gpuAvailable:gpuAvailable,is_custom:true,modelType:item==='llm'?'LLM':item,onUpdate:update,onClick:function onClick(){setSelectedModel(filteredRegistration);setIsOpenLaunchModelDrawer(true);}},filteredRegistration.model_name);})}),selectedModel&&/*#__PURE__*/_jsx(LaunchModelDrawer,{modelData:selectedModel,modelType:item==='llm'?'LLM':item,gpuAvailable:gpuAvailable,open:isOpenLaunchModelDrawer,onClose:function onClose(){return setIsOpenLaunchModelDrawer(false);}},selectedModel.model_name)]},item);})]})});};export default LaunchCustom;","map":{"version":3,"names":["TabContext","TabList","TabPanel","Box","FormControl","Tab","React","useContext","useEffect","useState","useTranslation","useNavigate","ApiContext","fetchWrapper","HotkeyFocusTextField","LaunchModelDrawer","ModelCard","jsx","_jsx","jsxs","_jsxs","customType","LaunchCustom","_ref","gpuAvailable","endPoint","_useState","_useState2","_slicedToArray","registrationData","setRegistrationData","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useState3","_useState4","searchTerm","setSearchTerm","_useState5","sessionStorage","getItem","_useState6","value","setValue","_useState7","_useState8","selectedModel","setSelectedModel","_useState9","_useState10","isOpenLaunchModelDrawer","setIsOpenLaunchModelDrawer","_useTranslation","t","navigate","handleTabChange","_","newValue","type","split","update","setItem","handleSearchChange","event","target","filter","registration","modelName","model_name","toLowerCase","includes","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","data","customRegistrations","newData","wrap","_callee2$","_context2","prev","next","abrupt","get","concat","sent","is_builtin","Promise","all","map","_ref3","_callee","desc","_callee$","_context","_objectSpread","stop","_x2","apply","arguments","t0","console","error","finish","_x","style","display","gridTemplateColumns","paddingLeft","paddingBottom","gridGap","m","children","sx","borderBottom","borderColor","onChange","label","item","padding","margin","variant","id","size","hotkey","filteredRegistration","url","modelData","is_custom","modelType","onUpdate","onClick","open","onClose"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/launch_model/launchCustom.js"],"sourcesContent":["import { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, FormControl, Tab } from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\nimport LaunchModelDrawer from './components/launchModelDrawer'\nimport ModelCard from './modelCard'\n\nconst customType = ['llm', 'embedding', 'rerank', 'image', 'audio', 'flexible']\n\nconst LaunchCustom = ({ gpuAvailable }) => {\n let endPoint = useContext(ApiContext).endPoint\n const [registrationData, setRegistrationData] = useState([])\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n\n // States used for filtering\n const [searchTerm, setSearchTerm] = useState('')\n const [value, setValue] = useState(sessionStorage.getItem('subType'))\n const [selectedModel, setSelectedModel] = useState(null)\n const [isOpenLaunchModelDrawer, setIsOpenLaunchModelDrawer] = useState(false)\n const { t } = useTranslation()\n\n const navigate = useNavigate()\n const handleTabChange = (_, newValue) => {\n const type =\n newValue.split('/')[3] === 'llm' ? 'LLM' : newValue.split('/')[3]\n update(type)\n setValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('subType', newValue)\n }\n\n const handleSearchChange = (event) => {\n setSearchTerm(event.target.value)\n }\n\n const filter = (registration) => {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n return modelName.includes(searchTerm.toLowerCase())\n }\n\n useEffect(() => {\n const type = sessionStorage.getItem('subType').split('/')[3]\n update(type === 'llm' ? 'LLM' : type)\n }, [])\n\n const update = async (type) => {\n if (isCallingApi || isUpdatingModel) return\n try {\n setIsCallingApi(true)\n\n const data = await fetchWrapper.get(`/v1/model_registrations/${type}`)\n const customRegistrations = data.filter((data) => !data.is_builtin)\n\n const newData = await Promise.all(\n customRegistrations.map(async (registration) => {\n const desc = await fetchWrapper.get(\n `/v1/model_registrations/${type}/${registration.model_name}`\n )\n\n return {\n ...desc,\n is_builtin: registration.is_builtin,\n }\n })\n )\n setRegistrationData(newData)\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n const style = {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',\n paddingLeft: '2rem',\n paddingBottom: '2rem',\n gridGap: '2rem 0rem',\n }\n\n return (\n <Box m=\"20px\">\n <TabContext value={value}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList value={value} onChange={handleTabChange} aria-label=\"tabs\">\n <Tab\n label={t('model.languageModels')}\n value=\"/launch_model/custom/llm\"\n />\n <Tab\n label={t('model.embeddingModels')}\n value=\"/launch_model/custom/embedding\"\n />\n <Tab\n label={t('model.rerankModels')}\n value=\"/launch_model/custom/rerank\"\n />\n <Tab\n label={t('model.imageModels')}\n value=\"/launch_model/custom/image\"\n />\n <Tab\n label={t('model.audioModels')}\n value=\"/launch_model/custom/audio\"\n />\n <Tab\n label={t('model.flexibleModels')}\n value=\"/launch_model/custom/flexible\"\n />\n </TabList>\n </Box>\n {customType.map((item) => (\n <TabPanel\n key={item}\n value={`/launch_model/custom/${item}`}\n sx={{ padding: 0 }}\n >\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: '1fr',\n margin: '30px 2rem',\n }}\n >\n <FormControl variant=\"outlined\" margin=\"normal\">\n <HotkeyFocusTextField\n id=\"search\"\n type=\"search\"\n label={t('launchModel.search')}\n value={searchTerm}\n onChange={handleSearchChange}\n size=\"small\"\n hotkey=\"Enter\"\n t={t}\n />\n </FormControl>\n </div>\n <div style={style}>\n {registrationData\n .filter((registration) => filter(registration))\n .map((filteredRegistration) => (\n <ModelCard\n key={filteredRegistration.model_name}\n url={endPoint}\n modelData={filteredRegistration}\n gpuAvailable={gpuAvailable}\n is_custom={true}\n modelType={item === 'llm' ? 'LLM' : item}\n onUpdate={update}\n onClick={() => {\n setSelectedModel(filteredRegistration)\n setIsOpenLaunchModelDrawer(true)\n }}\n />\n ))}\n </div>\n {selectedModel && (\n <LaunchModelDrawer\n key={selectedModel.model_name}\n modelData={selectedModel}\n modelType={item === 'llm' ? 'LLM' : item}\n gpuAvailable={gpuAvailable}\n open={isOpenLaunchModelDrawer}\n onClose={() => setIsOpenLaunchModelDrawer(false)}\n />\n )}\n </TabPanel>\n ))}\n </TabContext>\n </Box>\n )\n}\n\nexport default LaunchCustom\n"],"mappings":"+kBAAA,OAASA,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,WAAW,CAAEC,GAAG,KAAQ,eAAe,CACrD,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,cAAc,KAAQ,eAAe,CAC9C,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,iBAAiB,KAAM,gCAAgC,CAC9D,MAAO,CAAAC,SAAS,KAAM,aAAa,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEnC,GAAM,CAAAC,UAAU,CAAG,CAAC,KAAK,CAAE,WAAW,CAAE,QAAQ,CAAE,OAAO,CAAE,OAAO,CAAE,UAAU,CAAC,CAE/E,GAAM,CAAAC,YAAY,CAAG,QAAf,CAAAA,YAAYA,CAAAC,IAAA,CAAyB,IAAnB,CAAAC,YAAY,CAAAD,IAAA,CAAZC,YAAY,CAClC,GAAI,CAAAC,QAAQ,CAAGlB,UAAU,CAACK,UAAU,CAAC,CAACa,QAAQ,CAC9C,IAAAC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AA,CACfvF,gBAAgB,CACdsC,MAAM,CAAC,SAACC,YAAY,QAAK,CAAAD,MAAM,CAACC,YAAY,CAAC,GAAC,CAC9CyB,GAAG,CAAC,SAACoC,oBAAoB,qBACxB/G,IAAA,CAACF,SAAS,EAERkH,GAAG,CAAEzG,QAAS,CACd0G,SAAS,CAAEF,oBAAqB,CAChCzG,YAAY,CAAEA,YAAa,CAC3B4G,SAAS,CAAE,IAAK,CAChBC,SAAS,CAAEX,IAAI,GAAK,KAAK,CAAG,KAAK,CAAGA,IAAK,CACzCY,QAAQ,CAAExE,MAAO,CACjByE,OAAO,CAAE,SAAAA,QAAA,CAAM,CACbtF,gBAAgB,CAACgF,oBAAoB,CAAC,CACtC5E,0BAA0B,CAAC,IAAI,CAAC,CAClC,CAAE,EAVG4E,oBAAoB,CAAC3D,UAW3B,CAAC,EACH,CAAC,CACD,CAAC,CACLtB,aAAa,eACZ9B,IAAA,CAACH,iBAAiB,EAEhBoH,SAAS,CAAEnF,aAAc,CACzBqF,SAAS,CAAEX,IAAI,GAAK,KAAK,CAAG,KAAK,CAAGA,IAAK,CACzClG,YAAY,CAAEA,YAAa,CAC3BgH,IAAI,CAAEpF,uBAAwB,CAC9BqF,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAApF,0BAA0B,CAAC,KAAK,CAAC,EAAC,EAL5CL,aAAa,CAACsB,UAMpB,CACF,GApDIoD,IAqDG,CAAC,EACZ,CAAC,EACQ,CAAC,CACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAApG,YAAY","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import AddIcon from'@mui/icons-material/Add';import DeleteIcon from'@mui/icons-material/Delete';import{Button,TextField}from'@mui/material';import React,{useEffect,useRef,useState}from'react';import{useTranslation}from'react-i18next';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var AddVirtualenv=function AddVirtualenv(_ref){var virtualenv=_ref.virtualenv,onChangeVirtualenv=_ref.onChangeVirtualenv,scrollRef=_ref.scrollRef;var _useTranslation=useTranslation(),t=_useTranslation.t;var _useState=useState(function(){return virtualenv.packages.map(function(){return\"\".concat(Date.now(),\"-\").concat(Math.random());});}),_useState2=_slicedToArray(_useState,2),packageKeys=_useState2[0],setPackageKeys=_useState2[1];var prevPackagesLenRef=useRef(virtualenv.packages.length);useEffect(function(){var newLen=virtualenv.packages.length;if(newLen>prevPackagesLenRef.current){scrollRef.current.scrollTo({top:scrollRef.current.scrollHeight,behavior:'smooth'});}prevPackagesLenRef.current=newLen;setPackageKeys(function(prevKeys){var lengthDiff=virtualenv.packages.length-prevKeys.length;if(lengthDiff>0){return[].concat(_toConsumableArray(prevKeys),_toConsumableArray(new Array(lengthDiff).fill(0).map(function(){return\"\".concat(Date.now(),\"-\").concat(Math.random());})));}else if(lengthDiff<0){return prevKeys.slice(0,virtualenv.packages.length);}return prevKeys;});},[virtualenv.packages]);return/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"label\",{style:{marginBottom:'20px',marginRight:'20px'},children:t('registerModel.packages')}),/*#__PURE__*/_jsx(Button,{variant:\"contained\",size:\"small\",endIcon:/*#__PURE__*/_jsx(AddIcon,{}),onClick:function onClick(){return onChangeVirtualenv('add');},children:t('registerModel.more')}),/*#__PURE__*/_jsx(\"div\",{children:virtualenv.packages.map(function(item,index){return/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center',gap:5,marginTop:'10px',marginLeft:50},children:[/*#__PURE__*/_jsx(TextField,{style:{width:'100%'},size:\"small\",value:item,onChange:function onChange(e){onChangeVirtualenv('change',index,e.target.value);}}),/*#__PURE__*/_jsx(DeleteIcon,{onClick:function onClick(){return onChangeVirtualenv('delete',index);},style:{cursor:'pointer',color:'#1976d2'}})]},packageKeys[index]);})})]});};export default AddVirtualenv;","map":{"version":3,"names":["AddIcon","DeleteIcon","Button","TextField","React","useEffect","useRef","useState","useTranslation","jsx","_jsx","jsxs","_jsxs","AddVirtualenv","_ref","virtualenv","onChangeVirtualenv","scrollRef","_useTranslation","t","_useState","packages","map","concat","Date","now","Math","random","_useState2","_slicedToArray","packageKeys","setPackageKeys","prevPackagesLenRef","length","newLen","current","scrollTo","top","scrollHeight","behavior","prevKeys","lengthDiff","_toConsumableArray","Array","fill","slice","children","style","marginBottom","marginRight","variant","size","endIcon","onClick","item","index","display","alignItems","gap","marginTop","marginLeft","width","value","onChange","e","target","cursor","color"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/register_model/components/addVirtualenv.js"],"sourcesContent":["import AddIcon from '@mui/icons-material/Add'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport { Button, TextField } from '@mui/material'\nimport React, { useEffect, useRef, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\n\nconst AddVirtualenv = ({ virtualenv, onChangeVirtualenv, scrollRef }) => {\n const { t } = useTranslation()\n\n const [packageKeys, setPackageKeys] = useState(() =>\n virtualenv.packages.map(() => `${Date.now()}-${Math.random()}`)\n )\n\n const prevPackagesLenRef = useRef(virtualenv.packages.length)\n\n useEffect(() => {\n const newLen = virtualenv.packages.length\n if (newLen > prevPackagesLenRef.current) {\n scrollRef.current.scrollTo({\n top: scrollRef.current.scrollHeight,\n behavior: 'smooth',\n })\n }\n prevPackagesLenRef.current = newLen\n\n setPackageKeys((prevKeys) => {\n const lengthDiff = virtualenv.packages.length - prevKeys.length\n\n if (lengthDiff > 0) {\n return [\n ...prevKeys,\n ...new Array(lengthDiff)\n .fill(0)\n .map(() => `${Date.now()}-${Math.random()}`),\n ]\n } else if (lengthDiff < 0) {\n return prevKeys.slice(0, virtualenv.packages.length)\n }\n\n return prevKeys\n })\n }, [virtualenv.packages])\n\n return (\n <div>\n <label style={{ marginBottom: '20px', marginRight: '20px' }}>\n {t('registerModel.packages')}\n </label>\n <Button\n variant=\"contained\"\n size=\"small\"\n endIcon={<AddIcon />}\n onClick={() => onChangeVirtualenv('add')}\n >\n {t('registerModel.more')}\n </Button>\n\n <div>\n {virtualenv.packages.map((item, index) => (\n <div\n key={packageKeys[index]}\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 5,\n marginTop: '10px',\n marginLeft: 50,\n }}\n >\n <TextField\n style={{ width: '100%' }}\n size=\"small\"\n value={item}\n onChange={(e) => {\n onChangeVirtualenv('change', index, e.target.value)\n }}\n />\n <DeleteIcon\n onClick={() => onChangeVirtualenv('delete', index)}\n style={{ cursor: 'pointer', color: '#1976d2' }}\n />\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nexport default AddVirtualenv\n"],"mappings":"wSAAA,MAAO,CAAAA,OAAO,KAAM,yBAAyB,CAC7C,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OAASC,MAAM,CAAEC,SAAS,KAAQ,eAAe,CACjD,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,MAAM,CAAEC,QAAQ,KAAQ,OAAO,CAC1D,OAASC,cAAc,KAAQ,eAAe,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE9C,GAAM,CAAAC,aAAa,CAAG,QAAhB,CAAAA,aAAaA,CAAAC,IAAA,CAAsD,IAAhD,CAAAC,UAAU,CAAAD,IAAA,CAAVC,UAAU,CAAEC,kBAAkB,CAAAF,IAAA,CAAlBE,kBAAkB,CAAEC,SAAS,CAAAH,IAAA,CAATG,SAAS,CAChE,IAAAC,eAAA,CAAcV,cAAc,CAAC,CAAC,CAAtBW,CAAC,CAAAD,eAAA,CAADC,CAAC,CAET,IAAAC,SAAA,CAAsCb,QAAQ,CAAC,iBAC7C,CAAAQ,UAAU,CAACM,QAA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,EAAC,CACnDR,KAAK,CAAE,CAAEmB,MAAM,CAAE,SAAS,CAAEC,KAAK,CAAE,SAAU,CAAE,CAChD,CAAC,GApBGrC,WAAW,CAACyB,KAAK,CAqBnB,CAAC,EACP,CAAC,CACC,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAA1C,aAAa","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box,Button,ButtonGroup,Chip,CircularProgress,FormControl,InputLabel,MenuItem,Select}from'@mui/material';import React,{useCallback,useContext,useEffect,useRef,useState}from'react';import{useCookies}from'react-cookie';import{useTranslation}from'react-i18next';import{ApiContext}from'../../components/apiContext';import fetchWrapper from'../../components/fetchWrapper';import HotkeyFocusTextField from'../../components/hotkeyFocusTextField';import LaunchModelDrawer from'./components/launchModelDrawer';import ModelCard from'./modelCard';// Toggle pagination globally for this page. Set to false to disable pagination and load all items.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var ENABLE_PAGINATION=false;var LaunchModelComponent=function LaunchModelComponent(_ref){var modelType=_ref.modelType,gpuAvailable=_ref.gpuAvailable,featureModels=_ref.featureModels;var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi,endPoint=_useContext.endPoint;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];// States used for filtering\nvar _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useState5=useState(''),_useState6=_slicedToArray(_useState5,2),status=_useState6[0],setStatus=_useState6[1];var _useState7=useState([]),_useState8=_slicedToArray(_useState7,2),statusArr=_useState8[0],setStatusArr=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),collectionArr=_useState10[0],setCollectionArr=_useState10[1];var _useState11=useState([]),_useState12=_slicedToArray(_useState11,2),filterArr=_useState12[0],setFilterArr=_useState12[1];var _useTranslation=useTranslation(),t=_useTranslation.t;var _useState13=useState('featured'),_useState14=_slicedToArray(_useState13,2),modelListType=_useState14[0],setModelListType=_useState14[1];var _useState15=useState({type:modelType,modelAbility:'',options:[]}),_useState16=_slicedToArray(_useState15,2),modelAbilityData=_useState16[0],setModelAbilityData=_useState16[1];var _useState17=useState(null),_useState18=_slicedToArray(_useState17,2),selectedModel=_useState18[0],setSelectedModel=_useState18[1];var _useState19=useState(false),_useState20=_slicedToArray(_useState19,2),isOpenLaunchModelDrawer=_useState20[0],setIsOpenLaunchModelDrawer=_useState20[1];// Pagination status\nvar _useState21=useState([]),_useState22=_slicedToArray(_useState21,2),displayedData=_useState22[0],setDisplayedData=_useState22[1];var _useState23=useState(1),_useState24=_slicedToArray(_useState23,2),currentPage=_useState24[0],setCurrentPage=_useState24[1];var _useState25=useState(true),_useState26=_slicedToArray(_useState25,2),hasMore=_useState26[0],setHasMore=_useState26[1];var itemsPerPage=20;var loaderRef=useRef(null);var filter=useCallback(function(registration){if(searchTerm!==''){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';var modelDescription=registration.model_description?registration.model_description.toLowerCase():'';if(!modelName.includes(searchTerm.toLowerCase())&&!modelDescription.includes(searchTerm.toLowerCase())){return false;}}if(modelListType==='featured'){if(featureModels.length&&!featureModels.includes(registration.model_name)&&!(collectionArr!==null&&collectionArr!==void 0&&collectionArr.includes(registration.model_name))){return false;}}if(modelAbilityData.modelAbility&&(Array.isArray(registration.model_ability)&®istration.model_ability.indexOf(modelAbilityData.modelAbility)<0||typeof registration.model_ability==='string'&®istration.model_ability!==modelAbilityData.modelAbility))return false;if(statusArr.length===1){if(statusArr[0]==='cached'){var _registration$model_s;var judge=((_registration$model_s=registration.model_specs)===null||_registration$model_s===void 0?void 0:_registration$model_s.some(function(spec){return filterCache(spec);}))||(registration===null||registration===void 0?void 0:registration.cache_status);return judge;}else{return collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name);}}else if(statusArr.length>1){var _registration$model_s2;var _judge=((_registration$model_s2=registration.model_specs)===null||_registration$model_s2===void 0?void 0:_registration$model_s2.some(function(spec){return filterCache(spec);}))||(registration===null||registration===void 0?void 0:registration.cache_status);return _judge&&(collectionArr===null||collectionArr===void 0?void 0:collectionArr.includes(registration.model_name));}return true;},[searchTerm,modelListType,featureModels,collectionArr,modelAbilityData.modelAbility,statusArr]);var filterCache=useCallback(function(spec){if(Array.isArray(spec.cache_status)){var _spec$cache_status;return(_spec$cache_status=spec.cache_status)===null||_spec$cache_status===void 0?void 0:_spec$cache_status.some(function(cs){return cs;});}else{return spec.cache_status===true;}},[]);function getUniqueModelAbilities(arr){var uniqueAbilities=new Set();arr.forEach(function(item){if(Array.isArray(item.model_ability)){item.model_ability.forEach(function(ability){uniqueAbilities.add(ability);});}});return Array.from(uniqueAbilities);}var update=function update(){if(isCallingApi||isUpdatingModel||cookie.token!=='no_auth'&&!sessionStorage.getItem('token'))return;try{setIsCallingApi(true);fetchWrapper.get(\"/v1/model_registrations/\".concat(modelType,\"?detailed=true\")).then(function(data){var builtinRegistrations=data.filter(function(v){return v.is_builtin;});setModelAbilityData(_objectSpread(_objectSpread({},modelAbilityData),{},{options:getUniqueModelAbilities(builtinRegistrations)}));setRegistrationData(builtinRegistrations);var collectionData=JSON.parse(localStorage.getItem('collectionArr'));setCollectionArr(collectionData);// Reset pagination status\nsetCurrentPage(1);setHasMore(true);}).catch(function(error){console.error('Error:',error);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}catch(error){console.error('Error:',error);}finally{setIsCallingApi(false);}};useEffect(function(){update();},[cookie.token]);// Update pagination data\nvar updateDisplayedData=useCallback(function(){var filteredData=registrationData.filter(function(registration){return filter(registration);});var sortedData=_toConsumableArray(filteredData).sort(function(a,b){if(modelListType==='featured'){var indexA=featureModels.indexOf(a.model_name);var indexB=featureModels.indexOf(b.model_name);return(indexA!==-1?indexA:Infinity)-(indexB!==-1?indexB:Infinity);}return 0;});// If pagination is disabled, show all data at once\nif(!ENABLE_PAGINATION){setDisplayedData(sortedData);setHasMore(false);return;}var startIndex=(currentPage-1)*itemsPerPage;var endIndex=currentPage*itemsPerPage;var newData=sortedData.slice(startIndex,endIndex);if(currentPage===1){setDisplayedData(newData);}else{setDisplayedData(function(prev){return[].concat(_toConsumableArray(prev),_toConsumableArray(newData));});}setHasMore(endIndex<sortedData.length);},[registrationData,filter,modelListType,featureModels,currentPage,itemsPerPage]);useEffect(function(){updateDisplayedData();},[updateDisplayedData]);// Reset pagination when filters change\nuseEffect(function(){setCurrentPage(1);setHasMore(true);},[searchTerm,modelAbilityData.modelAbility,status,modelListType]);// Infinite scroll observer\nuseEffect(function(){if(!ENABLE_PAGINATION)return;var observer=new IntersectionObserver(function(entries){if(entries[0].isIntersecting&&hasMore&&!isCallingApi){setCurrentPage(function(prev){return prev+1;});}},{threshold:1.0});if(loaderRef.current){observer.observe(loaderRef.current);}return function(){if(loaderRef.current){observer.unobserve(loaderRef.current);}};},[hasMore,isCallingApi,currentPage]);var getCollectionArr=function getCollectionArr(data){setCollectionArr(data);};var handleChangeFilter=function handleChangeFilter(type,value){var typeMap={modelAbility:{setter:function setter(value){setModelAbilityData(_objectSpread(_objectSpread({},modelAbilityData),{},{modelAbility:value}));},filterArr:modelAbilityData.options},status:{setter:setStatus,filterArr:[]}};var _ref2=typeMap[type]||{},setter=_ref2.setter,excludeArr=_ref2.filterArr;if(!setter)return;setter(value);var updatedFilterArr=Array.from(new Set([].concat(_toConsumableArray(filterArr.filter(function(item){return!excludeArr.includes(item);})),[value])));setFilterArr(updatedFilterArr);if(type==='status'){setStatusArr(updatedFilterArr.filter(function(item){return!_toConsumableArray(modelAbilityData.options).includes(item);}));}// Reset pagination status\nsetDisplayedData([]);setCurrentPage(1);setHasMore(true);};var handleDeleteChip=function handleDeleteChip(item){setFilterArr(filterArr.filter(function(subItem){return subItem!==item;}));if(item===modelAbilityData.modelAbility){setModelAbilityData(_objectSpread(_objectSpread({},modelAbilityData),{},{modelAbility:''}));}else{setStatusArr(statusArr.filter(function(subItem){return subItem!==item;}));if(item===status)setStatus('');}// Reset pagination status\nsetCurrentPage(1);setHasMore(true);};var handleModelType=function handleModelType(newModelType){if(newModelType!==null){setModelListType(newModelType);// Reset pagination status\nsetDisplayedData([]);setCurrentPage(1);setHasMore(true);}};function getLabel(item){var translation=t(\"launchModel.\".concat(item));return translation===\"launchModel.\".concat(item)?item:translation;}return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'grid',gridTemplateColumns:function(){var hasAbility=modelAbilityData.options.length>0;var hasFeature=featureModels.length>0;var baseColumns=hasAbility?['200px','150px']:['200px'];var altColumns=hasAbility?['150px','150px']:['150px'];var columns=hasFeature?[].concat(baseColumns,['150px','1fr']):[].concat(altColumns,['1fr']);return columns.join(' ');}(),columnGap:'20px',margin:'30px 2rem',alignItems:'center'},children:[featureModels.length>0&&/*#__PURE__*/_jsx(FormControl,{sx:{minWidth:120},size:\"small\",children:/*#__PURE__*/_jsxs(ButtonGroup,{children:[/*#__PURE__*/_jsx(Button,{fullWidth:true,onClick:function onClick(){return handleModelType('featured');},variant:modelListType==='featured'?'contained':'outlined',children:t('launchModel.featured')}),/*#__PURE__*/_jsx(Button,{fullWidth:true,onClick:function onClick(){return handleModelType('all');},variant:modelListType==='all'?'contained':'outlined',children:t('launchModel.all')})]})}),modelAbilityData.options.length>0&&/*#__PURE__*/_jsxs(FormControl,{sx:{minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"ability-select-label\",children:t('launchModel.modelAbility')}),/*#__PURE__*/_jsx(Select,{id:\"ability\",labelId:\"ability-select-label\",label:\"Model Ability\",onChange:function onChange(e){return handleChangeFilter('modelAbility',e.target.value);},value:modelAbilityData.modelAbility,size:\"small\",sx:{width:'150px'},children:modelAbilityData.options.map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item,children:getLabel(item)},item);})})]}),/*#__PURE__*/_jsxs(FormControl,{sx:{minWidth:120},size:\"small\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"select-status\",children:t('launchModel.status')}),/*#__PURE__*/_jsxs(Select,{id:\"status\",labelId:\"select-status\",label:t('launchModel.status'),onChange:function onChange(e){return handleChangeFilter('status',e.target.value);},value:status,size:\"small\",sx:{width:'150px'},children:[/*#__PURE__*/_jsx(MenuItem,{value:\"cached\",children:t('launchModel.cached')}),/*#__PURE__*/_jsx(MenuItem,{value:\"favorite\",children:t('launchModel.favorite')})]})]}),/*#__PURE__*/_jsx(FormControl,{sx:{marginTop:1},variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(HotkeyFocusTextField,{id:\"search\",type:\"search\",label:t('launchModel.search'),value:searchTerm,onChange:function onChange(e){setSearchTerm(e.target.value);},size:\"small\",hotkey:\"Enter\",t:t})})]}),/*#__PURE__*/_jsx(\"div\",{style:{margin:'0 0 30px 30px'},children:filterArr.map(function(item,index){return/*#__PURE__*/_jsx(Chip,{label:getLabel(item),variant:\"outlined\",size:\"small\",color:\"primary\",style:{marginRight:10},onDelete:function onDelete(){return handleDeleteChip(item);}},index);})}),/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',gridGap:'2rem 0rem'},children:displayedData.map(function(filteredRegistration){return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,gpuAvailable:gpuAvailable,modelType:modelType,onGetCollectionArr:getCollectionArr,onUpdate:update,onClick:function onClick(){setSelectedModel(filteredRegistration);setIsOpenLaunchModelDrawer(true);}},filteredRegistration.model_name);})}),/*#__PURE__*/_jsx(\"div\",{ref:loaderRef,style:{height:'20px',margin:'20px 0'},children:ENABLE_PAGINATION&&hasMore&&!isCallingApi&&/*#__PURE__*/_jsx(\"div\",{style:{textAlign:'center',padding:'10px'},children:/*#__PURE__*/_jsx(CircularProgress,{})})}),selectedModel&&/*#__PURE__*/_jsx(LaunchModelDrawer,{modelData:selectedModel,modelType:modelType,gpuAvailable:gpuAvailable,open:isOpenLaunchModelDrawer,onClose:function onClose(){return setIsOpenLaunchModelDrawer(false);}},selectedModel.model_name)]});};export default LaunchModelComponent;","map":{"version":3,"names":["Box","Button","ButtonGroup","Chip","CircularProgress","FormControl","InputLabel","MenuItem","Select","React","useCallback","useContext","useEffect","useRef","useState","useCookies","useTranslation","ApiContext","fetchWrapper","HotkeyFocusTextField","LaunchModelDrawer","ModelCard","jsx","_jsx","jsxs","_jsxs","ENABLE_PAGINATION","LaunchModelComponent","_ref","modelType","gpuAvailable","featureModels","_useContext","isCallingApi","setIsCallingApi","endPoint","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","_useCookies","_useCookies2","_slicedToArray","cookie","_useState","_useState2","registrationData","setRegistrationData","_useState3","_useState4","searchTerm","setSearchTerm","_useState5","_useState6","status","setStatus","_useState7","_useState8","statusArr","setStatusArr","_useState9","_useState10","collectionArr","setCollectionArr","_useState11","_useState12","filterArr","setFilterArr","_useTranslation","t","_useState13","_useState14","modelListType","setModelListType","_useState15","type","modelAbility","options","_useState16","modelAbilityData","setModelAbilityData","_useState17","_useState18","selectedModel","setSelectedModel","_useState19","_useState20","isOpenLaunchModelDrawer","setIsOpenLaunchModelDrawer","_useState21","_useState22","displayedData","setDisplayedData","_useState23","_useState24","currentPage","setCurrentPage","_useState25","_useState26","hasMore","setHasMore","itemsPerPage","loaderRef","filter","registration","modelName","model_name","toLowerCase","modelDescription","model_description","includes","length","Array","isArray","model_ability","indexOf","_registration$model_s","judge","model_specs","some","spec","filterCache","cache_status","_registration$model_s2","_spec$cache_status","cs","getUniqueModelAbilities","arr","uniqueAbilities","Set","forEach","item","ability","add","from","update","token","sessionStorage","getItem","get","concat","then","data","builtinRegistrations","v","is_builtin","_objectSpread","collectionData","JSON","parse","localStorage","catch","error","console","response","message","updateDisplayedData","filteredData","sortedData","_toConsumableArray","sort","a","b","indexA","indexB","Infinity","startIndex","endIndex","newData","slice","prev","observer","IntersectionObserver","entries","isIntersecting","threshold","current","observe","unobserve","getCollectionArr","handleChangeFilter","value","typeMap","setter","_ref2","excludeArr","updatedFilterArr","handleDeleteChip","subItem","handleModelType","newModelType","getLabel","translation","m","children","style","display","gridTemplateColumns","hasAbility","hasFeature","baseColumns","altColumns","columns","join","columnGap","margin","alignItems","sx","minWidth","size","fullWidth","onClick","variant","id","labelId","label","onChange","e","target","width","map","marginTop","hotkey","index","color","marginRight","onDelete","paddingLeft","gridGap","filteredRegistration","url","modelData","onGetCollectionArr","onUpdate","ref","height","textAlign","padding","open","onClose"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/launch_model/LaunchModel.js"],"sourcesContent":["import {\n Box,\n Button,\n ButtonGroup,\n Chip,\n CircularProgress,\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n} from '@mui/material'\nimport React, {\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useTranslation } from 'react-i18next'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\nimport LaunchModelDrawer from './components/launchModelDrawer'\nimport ModelCard from './modelCard'\n\n// Toggle pagination globally for this page. Set to false to disable pagination and load all items.\nconst ENABLE_PAGINATION = false\n\nconst LaunchModelComponent = ({ modelType, gpuAvailable, featureModels }) => {\n const { isCallingApi, setIsCallingApi, endPoint } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n\n const [registrationData, setRegistrationData] = useState([])\n // States used for filtering\n const [searchTerm, setSearchTerm] = useState('')\n const [status, setStatus] = useState('')\n const [statusArr, setStatusArr] = useState([])\n const [collectionArr, setCollectionArr] = useState([])\n const [filterArr, setFilterArr] = useState([])\n const { t } = useTranslation()\n const [modelListType, setModelListType] = useState('featured')\n const [modelAbilityData, setModelAbilityData] = useState({\n type: modelType,\n modelAbility: '',\n options: [],\n })\n const [selectedModel, setSelectedModel] = useState(null)\n const [isOpenLaunchModelDrawer, setIsOpenLaunchModelDrawer] = useState(false)\n\n // Pagination status\n const [displayedData, setDisplayedData] = useState([])\n const [currentPage, setCurrentPage] = useState(1)\n const [hasMore, setHasMore] = useState(true)\n const itemsPerPage = 20\n const loaderRef = useRef(null)\n\n const filter = useCallback(\n (registration) => {\n if (searchTerm !== '') {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n const modelDescription = registration.model_description\n ? registration.model_description.toLowerCase()\n : ''\n\n if (\n !modelName.includes(searchTerm.toLowerCase()) &&\n !modelDescription.includes(searchTerm.toLowerCase())\n ) {\n return false\n }\n }\n\n if (modelListType === 'featured') {\n if (\n featureModels.length &&\n !featureModels.includes(registration.model_name) &&\n !collectionArr?.includes(registration.model_name)\n ) {\n return false\n }\n }\n\n if (\n modelAbilityData.modelAbility &&\n ((Array.isArray(registration.model_ability) &&\n registration.model_ability.indexOf(modelAbilityData.modelAbility) <\n 0) ||\n (typeof registration.model_ability === 'string' &&\n registration.model_ability !== modelAbilityData.modelAbility))\n )\n return false\n\n if (statusArr.length === 1) {\n if (statusArr[0] === 'cached') {\n const judge =\n registration.model_specs?.some((spec) => filterCache(spec)) ||\n registration?.cache_status\n return judge\n } else {\n return collectionArr?.includes(registration.model_name)\n }\n } else if (statusArr.length > 1) {\n const judge =\n registration.model_specs?.some((spec) => filterCache(spec)) ||\n registration?.cache_status\n return judge && collectionArr?.includes(registration.model_name)\n }\n\n return true\n },\n [\n searchTerm,\n modelListType,\n featureModels,\n collectionArr,\n modelAbilityData.modelAbility,\n statusArr,\n ]\n )\n\n const filterCache = useCallback((spec) => {\n if (Array.isArray(spec.cache_status)) {\n return spec.cache_status?.some((cs) => cs)\n } else {\n return spec.cache_status === true\n }\n }, [])\n\n function getUniqueModelAbilities(arr) {\n const uniqueAbilities = new Set()\n\n arr.forEach((item) => {\n if (Array.isArray(item.model_ability)) {\n item.model_ability.forEach((ability) => {\n uniqueAbilities.add(ability)\n })\n }\n })\n\n return Array.from(uniqueAbilities)\n }\n\n const update = () => {\n if (\n isCallingApi ||\n isUpdatingModel ||\n (cookie.token !== 'no_auth' && !sessionStorage.getItem('token'))\n )\n return\n\n try {\n setIsCallingApi(true)\n\n fetchWrapper\n .get(`/v1/model_registrations/${modelType}?detailed=true`)\n .then((data) => {\n const builtinRegistrations = data.filter((v) => v.is_builtin)\n setModelAbilityData({\n ...modelAbilityData,\n options: getUniqueModelAbilities(builtinRegistrations),\n })\n setRegistrationData(builtinRegistrations)\n const collectionData = JSON.parse(\n localStorage.getItem('collectionArr')\n )\n setCollectionArr(collectionData)\n\n // Reset pagination status\n setCurrentPage(1)\n setHasMore(true)\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n useEffect(() => {\n update()\n }, [cookie.token])\n\n // Update pagination data\n const updateDisplayedData = useCallback(() => {\n const filteredData = registrationData.filter((registration) =>\n filter(registration)\n )\n\n const sortedData = [...filteredData].sort((a, b) => {\n if (modelListType === 'featured') {\n const indexA = featureModels.indexOf(a.model_name)\n const indexB = featureModels.indexOf(b.model_name)\n return (\n (indexA !== -1 ? indexA : Infinity) -\n (indexB !== -1 ? indexB : Infinity)\n )\n }\n return 0\n })\n\n // If pagination is disabled, show all data at once\n if (!ENABLE_PAGINATION) {\n setDisplayedData(sortedData)\n setHasMore(false)\n return\n }\n\n const startIndex = (currentPage - 1) * itemsPerPage\n const endIndex = currentPage * itemsPerPage\n const newData = sortedData.slice(startIndex, endIndex)\n\n if (currentPage === 1) {\n setDisplayedData(newData)\n } else {\n setDisplayedData((prev) => [...prev, ...newData])\n }\n setHasMore(endIndex < sortedData.length)\n }, [\n registrationData,\n filter,\n modelListType,\n featureModels,\n currentPage,\n itemsPerPage,\n ])\n\n useEffect(() => {\n updateDisplayedData()\n }, [updateDisplayedData])\n\n // Reset pagination when filters change\n useEffect(() => {\n setCurrentPage(1)\n setHasMore(true)\n }, [searchTerm, modelAbilityData.modelAbility, status, modelListType])\n\n // Infinite scroll observer\n useEffect(() => {\n if (!ENABLE_PAGINATION) return\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting && hasMore && !isCallingApi) {\n setCurrentPage((prev) => prev + 1)\n }\n },\n { threshold: 1.0 }\n )\n\n if (loaderRef.current) {\n observer.observe(loaderRef.current)\n }\n\n return () => {\n if (loaderRef.current) {\n observer.unobserve(loaderRef.current)\n }\n }\n }, [hasMore, isCallingApi, currentPage])\n\n const getCollectionArr = (data) => {\n setCollectionArr(data)\n }\n\n const handleChangeFilter = (type, value) => {\n const typeMap = {\n modelAbility: {\n setter: (value) => {\n setModelAbilityData({\n ...modelAbilityData,\n modelAbility: value,\n })\n },\n filterArr: modelAbilityData.options,\n },\n status: { setter: setStatus, filterArr: [] },\n }\n\n const { setter, filterArr: excludeArr } = typeMap[type] || {}\n if (!setter) return\n\n setter(value)\n\n const updatedFilterArr = Array.from(\n new Set([\n ...filterArr.filter((item) => !excludeArr.includes(item)),\n value,\n ])\n )\n\n setFilterArr(updatedFilterArr)\n\n if (type === 'status') {\n setStatusArr(\n updatedFilterArr.filter(\n (item) => ![...modelAbilityData.options].includes(item)\n )\n )\n }\n\n // Reset pagination status\n setDisplayedData([])\n setCurrentPage(1)\n setHasMore(true)\n }\n\n const handleDeleteChip = (item) => {\n setFilterArr(\n filterArr.filter((subItem) => {\n return subItem !== item\n })\n )\n if (item === modelAbilityData.modelAbility) {\n setModelAbilityData({\n ...modelAbilityData,\n modelAbility: '',\n })\n } else {\n setStatusArr(\n statusArr.filter((subItem) => {\n return subItem !== item\n })\n )\n if (item === status) setStatus('')\n }\n\n // Reset pagination status\n setCurrentPage(1)\n setHasMore(true)\n }\n\n const handleModelType = (newModelType) => {\n if (newModelType !== null) {\n setModelListType(newModelType)\n\n // Reset pagination status\n setDisplayedData([])\n setCurrentPage(1)\n setHasMore(true)\n }\n }\n\n function getLabel(item) {\n const translation = t(`launchModel.${item}`)\n return translation === `launchModel.${item}` ? item : translation\n }\n\n return (\n <Box m=\"20px\">\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: (() => {\n const hasAbility = modelAbilityData.options.length > 0\n const hasFeature = featureModels.length > 0\n\n const baseColumns = hasAbility ? ['200px', '150px'] : ['200px']\n const altColumns = hasAbility ? ['150px', '150px'] : ['150px']\n\n const columns = hasFeature\n ? [...baseColumns, '150px', '1fr']\n : [...altColumns, '1fr']\n\n return columns.join(' ')\n })(),\n columnGap: '20px',\n margin: '30px 2rem',\n alignItems: 'center',\n }}\n >\n {featureModels.length > 0 && (\n <FormControl sx={{ minWidth: 120 }} size=\"small\">\n <ButtonGroup>\n <Button\n fullWidth\n onClick={() => handleModelType('featured')}\n variant={\n modelListType === 'featured' ? 'contained' : 'outlined'\n }\n >\n {t('launchModel.featured')}\n </Button>\n <Button\n fullWidth\n onClick={() => handleModelType('all')}\n variant={modelListType === 'all' ? 'contained' : 'outlined'}\n >\n {t('launchModel.all')}\n </Button>\n </ButtonGroup>\n </FormControl>\n )}\n {modelAbilityData.options.length > 0 && (\n <FormControl sx={{ minWidth: 120 }} size=\"small\">\n <InputLabel id=\"ability-select-label\">\n {t('launchModel.modelAbility')}\n </InputLabel>\n <Select\n id=\"ability\"\n labelId=\"ability-select-label\"\n label=\"Model Ability\"\n onChange={(e) =>\n handleChangeFilter('modelAbility', e.target.value)\n }\n value={modelAbilityData.modelAbility}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n {modelAbilityData.options.map((item) => (\n <MenuItem key={item} value={item}>\n {getLabel(item)}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )}\n <FormControl sx={{ minWidth: 120 }} size=\"small\">\n <InputLabel id=\"select-status\">{t('launchModel.status')}</InputLabel>\n <Select\n id=\"status\"\n labelId=\"select-status\"\n label={t('launchModel.status')}\n onChange={(e) => handleChangeFilter('status', e.target.value)}\n value={status}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n <MenuItem value=\"cached\">{t('launchModel.cached')}</MenuItem>\n <MenuItem value=\"favorite\">{t('launchModel.favorite')}</MenuItem>\n </Select>\n </FormControl>\n\n <FormControl sx={{ marginTop: 1 }} variant=\"outlined\" margin=\"normal\">\n <HotkeyFocusTextField\n id=\"search\"\n type=\"search\"\n label={t('launchModel.search')}\n value={searchTerm}\n onChange={(e) => {\n setSearchTerm(e.target.value)\n }}\n size=\"small\"\n hotkey=\"Enter\"\n t={t}\n />\n </FormControl>\n </div>\n <div style={{ margin: '0 0 30px 30px' }}>\n {filterArr.map((item, index) => (\n <Chip\n key={index}\n label={getLabel(item)}\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n style={{ marginRight: 10 }}\n onDelete={() => handleDeleteChip(item)}\n />\n ))}\n </div>\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',\n paddingLeft: '2rem',\n gridGap: '2rem 0rem',\n }}\n >\n {displayedData.map((filteredRegistration) => (\n <ModelCard\n key={filteredRegistration.model_name}\n url={endPoint}\n modelData={filteredRegistration}\n gpuAvailable={gpuAvailable}\n modelType={modelType}\n onGetCollectionArr={getCollectionArr}\n onUpdate={update}\n onClick={() => {\n setSelectedModel(filteredRegistration)\n setIsOpenLaunchModelDrawer(true)\n }}\n />\n ))}\n </div>\n\n <div ref={loaderRef} style={{ height: '20px', margin: '20px 0' }}>\n {ENABLE_PAGINATION && hasMore && !isCallingApi && (\n <div style={{ textAlign: 'center', padding: '10px' }}>\n <CircularProgress />\n </div>\n )}\n </div>\n\n {selectedModel && (\n <LaunchModelDrawer\n key={selectedModel.model_name}\n modelData={selectedModel}\n modelType={modelType}\n gpuAvailable={gpuAvailable}\n open={isOpenLaunchModelDrawer}\n onClose={() => setIsOpenLaunchModelDrawer(false)}\n />\n )}\n </Box>\n )\n}\n\nexport default LaunchModelComponent\n"],"mappings":"ubAAA,OACEA,GAAG,CACHC,MAAM,CACNC,WAAW,CACXC,IAAI,CACJC,gBAAgB,CAChBC,WAAW,CACXC,UAAU,CACVC,QAAQ,CACRC,MAAM,KACD,eAAe,CACtB,MAAO,CAAAC,KAAK,EACVC,WAAW,CACXC,UAAU,CACVC,SAAS,CACTC,MAAM,CACNC,QAAQ,KACH,OAAO,CACd,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,cAAc,KAAQ,eAAe,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,iBAAiB,KAAM,gCAAgC,CAC9D,MAAO,CAAAC,SAAS,KAAM,aAAa,CAEnC;AAAA,OAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBACA,GAAM,CAAAC,iBAAiB,CAAG,KAAK,CAE/B,GAAM,CAAAC,oBAAoB,CAAG,QAAvB,CAAAA,oBAAoBA,CAAAC,IAA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QAAS,CAAE,CAAAX,QAAA,CAC9DxK,iBAAiB,EAAIyE,OAAO,EAAI,CAAClE,YAAY,eAC5CV,IAAA,QAAK4K,KAAK,CAAE,CAAEyC,SAAS,CAAE,QAAQ,CAAEC,OAAO,CAAE,MAAO,CAAE,CAAA3C,QAAA,cACnD3K,IAAA,CAACnB,gBAAgB,GAAE,CAAC,CACjB,CACN,CACE,CAAC,CAEL+E,aAAa,eACZ5D,IAAA,CAACH,iBAAiB,EAEhBmN,SAAS,CAAEpJ,aAAc,CACzBtD,SAAS,CAAEA,SAAU,CACrBC,YAAY,CAAEA,YAAa,CAC3BgN,IAAI,CAAEvJ,uBAAwB,CAC9BwJ,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAAvJ,0BAA0B,CAAC,KAAK,CAAC,EAAC,EAL5CL,aAAa,CAACuB,UAMpB,CACF,EACE,CAAC,CAEV,CAAC,CAED,cAAe,CAAA/E,oBAAoB","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import{Box,Button,Dialog,DialogActions,DialogContent,DialogTitle,TextField}from'@mui/material';import React from'react';import{useTranslation}from'react-i18next';import CopyComponent from'../../../components/copyComponent';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var EditCustomModel=function EditCustomModel(_ref){var open=_ref.open,modelData=_ref.modelData,onClose=_ref.onClose,handleJsonDataPresentation=_ref.handleJsonDataPresentation;var _useTranslation=useTranslation(),t=_useTranslation.t;return/*#__PURE__*/_jsxs(Dialog,{open:open,onClose:onClose,maxWidth:\"md\",\"aria-labelledby\":\"alert-dialog-title\",\"aria-describedby\":\"alert-dialog-description\",children:[/*#__PURE__*/_jsx(DialogTitle,{sx:{m:0,p:2},id:\"customized-dialog-title\",children:modelData.model_name}),/*#__PURE__*/_jsx(Box,{sx:function sx(theme){return{position:'absolute',right:8,top:8,color:theme.palette.grey[500]};},children:/*#__PURE__*/_jsx(CopyComponent,{tip:t('launchModel.copyJson'),text:JSON.stringify(modelData,null,4)})}),/*#__PURE__*/_jsx(DialogContent,{children:/*#__PURE__*/_jsx(TextField,{sx:{width:'700px'},multiline:true,rows:24,disabled:true,defaultValue:JSON.stringify(modelData,null,4)})}),/*#__PURE__*/_jsxs(DialogActions,{children:[/*#__PURE__*/_jsx(Button,{onClick:onClose,children:t('launchModel.cancel')}),/*#__PURE__*/_jsx(Button,{onClick:handleJsonDataPresentation,autoFocus:true,children:t('launchModel.edit')})]})]});};export default EditCustomModel;","map":{"version":3,"names":["Box","Button","Dialog","DialogActions","DialogContent","DialogTitle","TextField","React","useTranslation","CopyComponent","jsx","_jsx","jsxs","_jsxs","EditCustomModel","_ref","open","modelData","onClose","handleJsonDataPresentation","_useTranslation","t","maxWidth","children","sx","m","p","id","model_name","theme","position","right","top","color","palette","grey","tip","text","JSON","stringify","width","multiline","rows","disabled","defaultValue","onClick","autoFocus"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/launch_model/components/editCustomModelDialog.js"],"sourcesContent":["import {\n Box,\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n TextField,\n} from '@mui/material'\nimport React from 'react'\nimport { useTranslation } from 'react-i18next'\n\nimport CopyComponent from '../../../components/copyComponent'\n\nconst EditCustomModel = ({\n open,\n modelData,\n onClose,\n handleJsonDataPresentation,\n}) => {\n const { t } = useTranslation()\n\n return (\n <Dialog\n open={open}\n onClose={onClose}\n maxWidth=\"md\"\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n <DialogTitle sx={{ m: 0, p: 2 }} id=\"customized-dialog-title\">\n {modelData.model_name}\n </DialogTitle>\n <Box\n sx={(theme) => ({\n position: 'absolute',\n right: 8,\n top: 8,\n color: theme.palette.grey[500],\n })}\n >\n <CopyComponent\n tip={t('launchModel.copyJson')}\n text={JSON.stringify(modelData, null, 4)}\n />\n </Box>\n <DialogContent>\n <TextField\n sx={{ width: '700px' }}\n multiline\n rows={24}\n disabled\n defaultValue={JSON.stringify(modelData, null, 4)}\n />\n </DialogContent>\n <DialogActions>\n <Button onClick={onClose}>{t('launchModel.cancel')}</Button>\n <Button onClick={handleJsonDataPresentation} autoFocus>\n {t('launchModel.edit')}\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n\nexport default EditCustomModel\n"],"mappings":"AAAA,OACEA,GAAG,CACHC,MAAM,CACNC,MAAM,CACNC,aAAa,CACbC,aAAa,CACbC,WAAW,CACXC,SAAS,KACJ,eAAe,CACtB,MAAO,CAAAC,KAAK,KAAM,OAAO,CACzB,OAASC,cAAc,KAAQ,eAAe,CAE9C,MAAO,CAAAC,aAAa,KAAM,mCAAmC,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE7D,GAAM,CAAAC,eAAe,CAAG,QAAlB,CAAAA,eAAeA,CAAAC,IAAA,CAKf,IAJJ,CAAAC,IAAI,CAAAD,IAAA,CAAJC,IAAI,CACJC,SAAS,CAAAF,IAAA,CAATE,SAAS,CACTC,OAAO,CAAAH,IAAA,CAAPG,OAAO,CACPC,0BAA0B,CAAAJ,IAAA,CAA1BI,0BAA0B,CAE1B,IAAAC,eAAA,CAAcZ,cAAc,CAAC,CAAC,CAAtBa,CAAC,CAAAD,eAAA,CAADC,CAAC,CAET,mBACER,KAAA,CAACX,MAAM,EACLc,IAAI,CAAEA,IAAK,CACXE,OAAO,CAAEA,OAAQ,CACjBI,QAAQ,CAAC,IAAI,CACb,kBAAgB,oBAAoB,CACpC,mBAAiB,0BAA0B,CAAAC,QAAA,eAE3CZ,IAAA,CAACN,WAAW,EAACmB,EAAE,CAAE,CAAEC,CAAC,CAAE,CAAC,CAAEC,CAAC,CAAE,CAAE,CAAE,CAACC,EAAE,CAAC,yBAAyB,CAAAJ,QAAA,CAC1DN,SAAS,CAACW,UAAU,CACV,CAAC,cACdjB,IAAA,CAACX,GAAG,EACFwB,EAAE,CAAE,SAAAA,GAACK,KAAK,QAAM,CACdC,QAAQ,CAAE,UAAU,CACpBC,KAAK,CAAE,CAAC,CACRC,GAAG,CAAE,CAAC,CACNC,KAAK,CAAEJ,KAAK,CAACK,OAAO,CAACC,IAAI,CAAC,GAAG,CAC/B,CAAC,EAAE,CAAAZ,QAAA,cAEHZ,IAAA,CAACF,aAAa,EACZ2B,GAAG,CAAEf,CAAC,CAAC,sBAAsB,CAAE,CAC/BgB,IAAI,CAAEC,IAAI,CAACC,SAAS,CAACtB,SAAS,CAAE,IAAI,CAAE,CAAC,CAAE,CAC1C,CAAC,CACC,CAAC,cACNN,IAAA,CAACP,aAAa,EAAAmB,QAAA,cACZZ,IAAA,CAACL,SAAS,EACRkB,EAAE,CAAE,CAAEgB,KAAK,CAAE,OAAQ,CAAE,CACvBC,SAAS,MACTC,IAAI,CAAE,EAAG,CACTC,QAAQ,MACRC,YAAY,CAAEN,IAAI,CAACC,SAAS,CAACtB,SAAS,CAAE,IAAI,CAAE,CAAC,CAAE,CAClD,CAAC,CACW,CAAC,cAChBJ,KAAA,CAACV,aAAa,EAAAoB,QAAA,eACZZ,IAAA,CAACV,MAAM,EAAC4C,OAAO,CAAE3B,OAAQ,CAAAK,QAAA,CAAEF,CAAC,CAAC,oBAAoB,CAAC,CAAS,CAAC,cAC5DV,IAAA,CAACV,MAAM,EAAC4C,OAAO,CAAE1B,0BAA2B,CAAC2B,SAAS,MAAAvB,QAAA,CACnDF,CAAC,CAAC,kBAAkB,CAAC,CAChB,CAAC,EACI,CAAC,EACV,CAAC,CAEb,CAAC,CAED,cAAe,CAAAP,eAAe","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _defineProperty from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";import _objectWithoutProperties from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\";import _regeneratorRuntime from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _asyncToGenerator from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/ui/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";var _excluded=[\"__isInitializing\"];import{ContentPasteGo,ExpandLess,ExpandMore,RocketLaunchOutlined,StopCircle,UndoOutlined}from'@mui/icons-material';import{Box,Button,Chip,CircularProgress,Collapse,Drawer,FormControl,FormControlLabel,InputLabel,ListItemButton,ListItemText,MenuItem,Radio,RadioGroup,Select,Switch,TextField,Tooltip}from'@mui/material';import React,{useContext,useEffect,useMemo,useRef,useState}from'react';import{useTranslation}from'react-i18next';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../../components/apiContext';import fetchWrapper from'../../../components/fetchWrapper';import TitleTypography from'../../../components/titleTypography';import{llmAllDataKey}from'../data/data';import CopyToCommandLine from'./commandBuilder';import DynamicFieldList from'./dynamicFieldList';import getModelFormConfig from'./modelFormConfig';import PasteDialog from'./pasteDialog';import Progress from'./progress';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var enginesWithNWorker=['SGLang','vLLM','MLX'];var modelEngineType=['LLM','embedding','rerank'];var SelectField=function SelectField(_ref){var label=_ref.label,labelId=_ref.labelId,name=_ref.name,value=_ref.value,onChange=_ref.onChange,_ref$options=_ref.options,options=_ref$options===void 0?[]:_ref$options,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,_ref$required=_ref.required,required=_ref$required===void 0?false:_ref$required;return/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",disabled:disabled,required:required,fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:labelId,children:label}),/*#__PURE__*/_jsx(Select,{labelId:labelId,name:name,value:value,onChange:onChange,label:label,className:\"textHighlight\",children:options.map(function(item){return/*#__PURE__*/_jsx(MenuItem,{value:item.value||item,children:item.label||item},item.value||item);})})]});};var LaunchModelDrawer=function LaunchModelDrawer(_ref2){var modelData=_ref2.modelData,modelType=_ref2.modelType,gpuAvailable=_ref2.gpuAvailable,open=_ref2.open,onClose=_ref2.onClose;var navigate=useNavigate();var _useTranslation=useTranslation(),t=_useTranslation.t;var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,isUpdatingModel=_useContext.isUpdatingModel,setErrorMsg=_useContext.setErrorMsg,setSuccessMsg=_useContext.setSuccessMsg,setIsCallingApi=_useContext.setIsCallingApi;var _useState=useState({}),_useState2=_slicedToArray(_useState,2),formData=_useState2[0],setFormData=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),hasHistory=_useState4[0],setHasHistory=_useState4[1];var _useState5=useState({}),_useState6=_slicedToArray(_useState5,2),enginesObj=_useState6[0],setEnginesObj=_useState6[1];var _useState7=useState([]),_useState8=_slicedToArray(_useState7,2),engineOptions=_useState8[0],setEngineOptions=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),formatOptions=_useState10[0],setFormatOptions=_useState10[1];var _useState11=useState([]),_useState12=_slicedToArray(_useState11,2),sizeOptions=_useState12[0],setSizeOptions=_useState12[1];var _useState13=useState([]),_useState14=_slicedToArray(_useState13,2),quantizationOptions=_useState14[0],setQuantizationOptions=_useState14[1];var _useState15=useState([]),_useState16=_slicedToArray(_useState15,2),multimodalProjectorOptions=_useState16[0],setMultimodalProjectorOptions=_useState16[1];var _useState17=useState([]),_useState18=_slicedToArray(_useState17,2),multimodalProjector=_useState18[0],setMultimodalProjector=_useState18[1];var _useState19=useState(false),_useState20=_slicedToArray(_useState19,2),isOpenPasteDialog=_useState20[0],setIsOpenPasteDialog=_useState20[1];var _useState21=useState({}),_useState22=_slicedToArray(_useState21,2),collapseState=_useState22[0],setCollapseState=_useState22[1];var _useState23=useState(false),_useState24=_slicedToArray(_useState23,2),isShowProgress=_useState24[0],setIsShowProgress=_useState24[1];var _useState25=useState(false),_useState26=_slicedToArray(_useState25,2),isShowCancel=_useState26[0],setIsShowCancel=_useState26[1];var _useState27=useState(false),_useState28=_slicedToArray(_useState27,2),isLoading=_useState28[0],setIsLoading=_useState28[1];var _useState29=useState(0),_useState30=_slicedToArray(_useState29,2),progress=_useState30[0],setProgress=_useState30[1];var _useState31=useState([]),_useState32=_slicedToArray(_useState31,2),checkDynamicFieldComplete=_useState32[0],setCheckDynamicFieldComplete=_useState32[1];var intervalRef=useRef(null);var downloadHubOptions=useMemo(function(){return['none'].concat(_toConsumableArray((modelData===null||modelData===void 0?void 0:modelData.download_hubs)||[]));},[modelData===null||modelData===void 0?void 0:modelData.download_hubs]);var isCached=function isCached(spec){if(Array.isArray(spec.cache_status)){return spec.cache_status.some(function(cs){return cs;});}else{return spec.cache_status===true;}};var convertModelSize=function convertModelSize(size){return size.toString().includes('_')?size:parseInt(size,10);};var range=function range(start,end){return new Array(end-start+1).fill(undefined).map(function(_,i){return i+start;});};var getNGPURange=function getNGPURange(modelType){if(['LLM','image'].includes(modelType)){return gpuAvailable>0?['auto','CPU'].concat(_toConsumableArray(range(1,gpuAvailable))):['auto','CPU'];}else{return gpuAvailable===0?['CPU']:['GPU','CPU'];}};var normalizeNGPU=function normalizeNGPU(value){if(!value)return null;if(value==='CPU')return null;if(value==='auto'||value==='GPU')return'auto';var num=parseInt(value,10);return isNaN(num)||num===0?null:num;};var handleValueType=function handleValueType(str){str=String(str);if(str.toLowerCase()==='none'){return null;}else if(str.toLowerCase()==='true'){return true;}else if(str.toLowerCase()==='false'){return false;}else if(str.includes(',')){return str.split(',');}else if(str.includes(',')){return str.split(',');}else if(Number(str)||str!==''&&Number(str)===0){return Number(str);}else{return str;}};var arrayToObject=function arrayToObject(arr){var transformValue=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(v){return v;};return Object.fromEntries(arr.map(function(_ref3){var key=_ref3.key,value=_ref3.value;return[key,transformValue(value)];}));};var handleGetHistory=function handleGetHistory(){var historyArr=JSON.parse(localStorage.getItem('historyArr'))||[];return historyArr.find(function(item){return item.model_name===modelData.model_name;});};var deleteHistory=function deleteHistory(){var arr=JSON.parse(localStorage.getItem('historyArr'));var newArr=arr.filter(function(item){return item.model_name!==modelData.model_name;});localStorage.setItem('historyArr',JSON.stringify(newArr));setHasHistory(false);setFormData({});setCollapseState({});};var objectToArray=function objectToArray(obj){if(!obj||typeof obj!=='object')return[];return Object.entries(obj).map(function(_ref4){var _ref5=_slicedToArray(_ref4,2),key=_ref5[0],value=_ref5[1];return{key:key,value:value};});};var restoreNGPU=function restoreNGPU(value){if(value===null)return'CPU';if(value==='auto'){return['LLM','image'].includes(modelType)?'auto':'GPU';}if(typeof value==='number')return String(value);return value||'CPU';};var restoreFormDataFormat=function restoreFormDataFormat(finalData){var result=_objectSpread({},finalData);var customData=[];for(var key in result){!llmAllDataKey.includes(key)&&customData.push({key:key,value:result[key]===null?'none':result[key]===false?false:result[key]});}if(customData.length)result.custom=customData;result.n_gpu=restoreNGPU(result.n_gpu);if(result!==null&&result!==void 0&&result.gpu_idx&&Array.isArray(result.gpu_idx)){result.gpu_idx=result.gpu_idx.join(',');}if(result!==null&&result!==void 0&&result.peft_model_config){var pmc=result.peft_model_config;if(pmc.image_lora_load_kwargs){result.image_lora_load_kwargs=objectToArray(pmc.image_lora_load_kwargs);}if(pmc.image_lora_fuse_kwargs){result.image_lora_fuse_kwargs=objectToArray(pmc.image_lora_fuse_kwargs);}if(pmc.lora_list){result.lora_list=pmc.lora_list;}delete result.peft_model_config;}if(result!==null&&result!==void 0&&result.envs&&typeof result.envs==='object'&&!Array.isArray(result.envs)){result.envs=objectToArray(result.envs);}if(result!==null&&result!==void 0&&result.quantization_config&&typeof result.quantization_config==='object'&&!Array.isArray(result.quantization_config)){result.quantization_config=objectToArray(result.quantization_config);}return result;};var getCollapseStateFromData=function getCollapseStateFromData(result){var _result$image_lora_lo,_result$image_lora_fu,_result$lora_list,_result$envs,_result$virtual_env_p,_result$virtual_env_p2;var newState={};if(result.model_uid||result.request_limits||result.worker_ip||result.gpu_idx||result.download_hub||result.model_path){newState.nested_section_optional=true;}if((_result$image_lora_lo=result.image_lora_load_kwargs)!==null&&_result$image_lora_lo!==void 0&&_result$image_lora_lo.length||(_result$image_lora_fu=result.image_lora_fuse_kwargs)!==null&&_result$image_lora_fu!==void 0&&_result$image_lora_fu.length||(_result$lora_list=result.lora_list)!==null&&_result$lora_list!==void 0&&_result$lora_list.length){newState.nested_section_optional=true;newState.nested_section_lora=true;}if((_result$envs=result.envs)!==null&&_result$envs!==void 0&&_result$envs.length){newState.nested_section_optional=true;newState.nested_section_env=true;}if(((_result$virtual_env_p=(_result$virtual_env_p2=result.virtual_env_packages)===null||_result$virtual_env_p2===void 0?void 0:_result$virtual_env_p2.length)!==null&&_result$virtual_env_p!==void 0?_result$virtual_env_p:0)>0||result.enable_virtual_env!==undefined){newState.nested_section_optional=true;newState.nested_section_virtualEnv=true;}return newState;};var handleCommandLine=function handleCommandLine(data){if(data.model_name===modelData.model_name){var restoredData=restoreFormDataFormat(data);setFormData(restoredData);var collapseFromData=getCollapseStateFromData(restoredData);setCollapseState(function(prev){return _objectSpread(_objectSpread({},prev),collapseFromData);});}else{setErrorMsg(t('launchModel.commandLineTip'));}};var fetchModelEngine=function fetchModelEngine(model_name,model_type){fetchWrapper.get(model_type==='LLM'?\"/v1/engines/\".concat(model_name):\"/v1/engines/\".concat(model_type,\"/\").concat(model_name)).then(function(data){setEnginesObj(data);setEngineOptions(Object.keys(data));}).catch(function(error){var _error$response;console.error('Error:',error);if((error===null||error===void 0?void 0:(_error$response=error.response)===null||_error$response===void 0?void 0:_error$response.status)!==403){setErrorMsg(error.message);}}).finally(function(){setIsCallingApi(false);});};var fetchCancelModel=/*#__PURE__*/function(){var _ref6=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _error$response2;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return fetchWrapper.post(\"/v1/models/\".concat(modelData.model_name,\"/cancel\"));case 3:setIsLoading(true);_context.next=10;break;case 6:_context.prev=6;_context.t0=_context[\"catch\"](0);console.error('Error:',_context.t0);if((_context.t0===null||_context.t0===void 0?void 0:(_error$response2=_context.t0.response)===null||_error$response2===void 0?void 0:_error$response2.status)!==403){setErrorMsg(_context.t0.message);}case 10:_context.prev=10;setProgress(0);stopPolling();setIsShowProgress(false);setIsShowCancel(false);return _context.finish(10);case 16:case\"end\":return _context.stop();}},_callee,null,[[0,6,10,16]]);}));return function fetchCancelModel(){return _ref6.apply(this,arguments);};}();var fetchProgress=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var res,_error$response3;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=3;return fetchWrapper.get(\"/v1/models/\".concat(modelData.model_name,\"/progress\"));case 3:res=_context2.sent;if(res.progress!==1.0)setProgress(Number(res.progress));_context2.next=11;break;case 7:_context2.prev=7;_context2.t0=_context2[\"catch\"](0);console.error('Error:',_context2.t0);if((_context2.t0===null||_context2.t0===void 0?void 0:(_error$response3=_context2.t0.response)===null||_error$response3===void 0?void 0:_error$response3.status)!==403){setErrorMsg(_context2.t0.message);}case 11:_context2.prev=11;stopPolling();setIsCallingApi(false);return _context2.finish(11);case 15:case\"end\":return _context2.stop();}},_callee2,null,[[0,7,11,15]]);}));return function fetchProgress(){return _ref7.apply(this,arguments);};}();var startPolling=function startPolling(){if(intervalRef.current)return;intervalRef.current=setInterval(fetchProgress,500);};var stopPolling=function stopPolling(){if(intervalRef.current!==null){clearInterval(intervalRef.current);intervalRef.current=null;}};useEffect(function(){var data=handleGetHistory();if(data){setHasHistory(true);var restoredData=restoreFormDataFormat(data);setFormData(modelEngineType.includes(modelType)?_objectSpread(_objectSpread({},restoredData),{},{__isInitializing:true}):restoredData);var collapseFromData=getCollapseStateFromData(restoredData);setCollapseState(function(prev){return _objectSpread(_objectSpread({},prev),collapseFromData);});}},[]);useEffect(function(){if(modelEngineType.includes(modelType))fetchModelEngine(modelData.model_name,modelType);},[modelData.model_name,modelType]);useEffect(function(){if(formData.__isInitializing){setFormData(function(prev){var __isInitializing=prev.__isInitializing,rest=_objectWithoutProperties(prev,_excluded);console.log('__isInitializing',__isInitializing);return rest;});return;}if(formData.model_engine&&modelEngineType.includes(modelType)){var _enginesObj$formData$;var format=_toConsumableArray(new Set((_enginesObj$formData$=enginesObj[formData.model_engine])===null||_enginesObj$formData$===void 0?void 0:_enginesObj$formData$.map(function(item){return item.model_format;})));setFormatOptions(format);if(!format.includes(formData.model_format)){setFormData(function(prev){return _objectSpread(_objectSpread({},prev),{},{model_format:''});});}if(format.length===1){setFormData(function(prev){return _objectSpread(_objectSpread({},prev),{},{model_format:format[0]});});}}},[formData.model_engine,enginesObj]);useEffect(function(){var _enginesObj$formData$2,_enginesObj$formData$3;if(formData.__isInitializing)return;if(!formData.model_engine||!formData.model_format)return;var configMap={LLM:{field:'model_size_in_billions',optionSetter:setSizeOptions,extractor:function extractor(item){return item.model_size_in_billions;}},embedding:{field:'quantization',optionSetter:setQuantizationOptions,extractor:function extractor(item){return item.quantization;}},rerank:{field:'quantization',optionSetter:setQuantizationOptions,extractor:function extractor(item){return item.quantization;}}};var config=configMap[modelType];if(!config)return;var options=_toConsumableArray(new Set((_enginesObj$formData$2=enginesObj[formData.model_engine])===null||_enginesObj$formData$2===void 0?void 0:(_enginesObj$formData$3=_enginesObj$formData$2.filter(function(item){return item.model_format===formData.model_format;}))===null||_enginesObj$formData$3===void 0?void 0:_enginesObj$formData$3.map(config.extractor)));config.optionSetter(options);if(!options.includes(formData[config.field])){setFormData(function(prev){return _objectSpread(_objectSpread({},prev),{},_defineProperty({},config.field,''));});}if(options.length===1){setFormData(function(prev){return _objectSpread(_objectSpread({},prev),{},_defineProperty({},config.field,options[0]));});}},[formData.model_engine,formData.model_format,enginesObj]);useEffect(function(){if(formData.__isInitializing)return;if(formData.model_engine&&formData.model_format&&formData.model_size_in_billions){var _enginesObj$formData$4,_enginesObj$formData$5;var quants=_toConsumableArray(new Set((_enginesObj$formData$4=enginesObj[formData.model_engine])===null||_enginesObj$formData$4===void 0?void 0:_enginesObj$formData$4.filter(function(item){return item.model_format===formData.model_format&&item.model_size_in_billions===convertModelSize(formData.model_size_in_billions);}).flatMap(function(item){return item.quantizations;})));var multimodal_projectors=_toConsumableArray(new Set((_enginesObj$formData$5=enginesObj[formData.model_engine])===null||_enginesObj$formData$5===void 0?void 0:_enginesObj$formData$5.filter(function(item){return item.model_format===formData.model_format&&item.model_size_in_billions===convertModelSize(formData.model_size_in_billions);}).flatMap(function(item){return item.multimodal_projectors||[];})));setQuantizationOptions(quants);setMultimodalProjectorOptions(multimodal_projectors||[]);if(!quants.includes(formData.quantization)){setFormData(function(prev){return _objectSpread(_objectSpread({},prev),{},{quantization:''});});}if(quants.length===1){setFormData(function(prev){return _objectSpread(_objectSpread({},prev),{},{quantization:quants[0]});});}if(!multimodal_projectors.includes(multimodalProjector)){setMultimodalProjector('');}if(multimodal_projectors.length>0&&!multimodalProjector){setMultimodalProjector(multimodal_projectors[0]);}}},[formData.model_engine,formData.model_format,formData.model_size_in_billions,enginesObj]);var engineItems=useMemo(function(){return engineOptions.map(function(engine){var _enginesObj$engine;var modelFormats=Array.from(new Set((_enginesObj$engine=enginesObj[engine])===null||_enginesObj$engine===void 0?void 0:_enginesObj$engine.map(function(item){return item.model_format;})));var relevantSpecs=modelData.model_specs.filter(function(spec){return modelFormats.includes(spec.model_format);});var cached=relevantSpecs.some(function(spec){return isCached(spec);});return{value:engine,label:cached?\"\".concat(engine,\" \").concat(t('launchModel.cached')):engine};});},[engineOptions,enginesObj,modelData]);var formatItems=useMemo(function(){return formatOptions.map(function(format){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===format;});var cached=specs.some(function(spec){return isCached(spec);});return{value:format,label:cached?\"\".concat(format,\" \").concat(t('launchModel.cached')):format};});},[formatOptions,modelData]);var sizeItems=useMemo(function(){return sizeOptions.map(function(size){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===formData.model_format;}).filter(function(spec){return spec.model_size_in_billions===size;});var cached=specs.some(function(spec){return isCached(spec);});return{value:size,label:cached?\"\".concat(size,\" \").concat(t('launchModel.cached')):size};});},[sizeOptions,modelData]);var quantizationItems=useMemo(function(){return quantizationOptions.map(function(quant){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===formData.model_format;}).filter(function(spec){return modelType==='LLM'?spec.model_size_in_billions===convertModelSize(formData.model_size_in_billions):true;});var spec=specs.find(function(s){return s.quantizations===quant;});var cached=Array.isArray(spec===null||spec===void 0?void 0:spec.cache_status)?spec===null||spec===void 0?void 0:spec.cache_status[spec===null||spec===void 0?void 0:spec.quantizations.indexOf(quant)]:spec===null||spec===void 0?void 0:spec.cache_status;return{value:quant,label:cached?\"\".concat(quant,\" \").concat(t('launchModel.cached')):quant};});},[quantizationOptions,modelData]);var checkRequiredFields=function checkRequiredFields(fields,data){return fields.every(function(field){if(field.type==='collapse'&&field.children){return checkRequiredFields(field.children,data);}if(field.visible&&field.required){var value=data[field.name];return value!==undefined&&value!==null&&String(value).trim()!=='';}return true;});};var isDynamicFieldComplete=function isDynamicFieldComplete(val){if(!val)return false;if(Array.isArray(val)&&typeof val[0]==='string'){return val.every(function(item){return item===null||item===void 0?void 0:item.trim();});}if(Array.isArray(val)&&typeof val[0]==='object'){return val.every(function(obj){return Object.values(obj).every(function(v){return typeof v!=='string'||v.trim();});});}return true;};var handleDynamicField=function handleDynamicField(name,val){setCheckDynamicFieldComplete(function(prev){var filtered=prev.filter(function(item){return item.name!==name;});return[].concat(_toConsumableArray(filtered),[{name:name,isComplete:isDynamicFieldComplete(val)}]);});setFormData(function(prev){return _objectSpread(_objectSpread({},prev),{},_defineProperty({},name,val));});};var handleChange=function handleChange(e){var _e$target=e.target,name=_e$target.name,value=_e$target.value,type=_e$target.type,checked=_e$target.checked;setFormData(function(prev){return _objectSpread(_objectSpread({},prev),{},_defineProperty({},name,type==='checkbox'?checked:value));});};var handleGPUIdx=function handleGPUIdx(data){var arr=[];data===null||data===void 0?void 0:data.split(',').forEach(function(item){arr.push(Number(item));});return arr;};var processFieldsRecursively=function processFieldsRecursively(fields,result){fields.forEach(function(field){if(result[field.name]===undefined&&field.default!==undefined){result[field.name]=field.default;}if((result[field.name]||result[field.name]===0)&&field.type==='number'&&typeof result[field.name]!=='number'){result[field.name]=parseInt(result[field.name],10);}if(field.name==='gpu_idx'&&result[field.name]){result[field.name]=handleGPUIdx(result[field.name]);}if(field.visible===false||result[field.name]===''||result[field.name]==null){delete result[field.name];}if(field.type==='dynamicField'&&Array.isArray(result[field.name])){result[field.name]=result[field.name].filter(function(item){if(typeof item==='string'){return item.trim()!=='';}else if(typeof item==='object'&&item!==null){return Object.values(item).every(function(val){if(typeof val==='string'){return val.trim()!=='';}return val!==undefined&&val!==null;});}return false;});if(result[field.name].length===0){delete result[field.name];}}if(field.type==='collapse'&&Array.isArray(field.children)){processFieldsRecursively(field.children,result);}});};var getFinalFormData=function getFinalFormData(){var _result$lora_list2,_result$envs2,_result$quantization_,_result$custom;var fields=modelFormConfig[modelType]||[];var result=_objectSpread({model_name:modelData.model_name,model_type:modelType},formData);processFieldsRecursively(fields,result);if(result.n_gpu){result.n_gpu=normalizeNGPU(result.n_gpu);}if(result.n_gpu_layers<0){delete result.n_gpu_layers;}if(result.download_hub==='none'){delete result.download_hub;}if(result.gguf_quantization==='none'){delete result.gguf_quantization;}var peft_model_config={};['image_lora_load_kwargs','image_lora_fuse_kwargs'].forEach(function(key){var _result$key;if((_result$key=result[key])!==null&&_result$key!==void 0&&_result$key.length){peft_model_config[key]=arrayToObject(result[key],handleValueType);delete result[key];}});if((_result$lora_list2=result.lora_list)!==null&&_result$lora_list2!==void 0&&_result$lora_list2.length){peft_model_config.lora_list=result.lora_list;delete result.lora_list;}if(Object.keys(peft_model_config).length){result.peft_model_config=peft_model_config;}if(result.enable_virtual_env==='unset'){delete result.enable_virtual_env;}else if(result.enable_virtual_env==='true'){result.enable_virtual_env=true;}else if(result.enable_virtual_env==='false'){result.enable_virtual_env=false;}if((_result$envs2=result.envs)!==null&&_result$envs2!==void 0&&_result$envs2.length){result.envs=arrayToObject(result.envs);}if((_result$quantization_=result.quantization_config)!==null&&_result$quantization_!==void 0&&_result$quantization_.length){result.quantization_config=arrayToObject(result.quantization_config,handleValueType);}for(var key in result){if(![].concat(_toConsumableArray(llmAllDataKey),['custom']).includes(key)){delete result[key];}}if((_result$custom=result.custom)!==null&&_result$custom!==void 0&&_result$custom.length){Object.assign(result,arrayToObject(result.custom,handleValueType));delete result.custom;}return result;};var handleSubmit=function handleSubmit(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);setProgress(0);setIsShowProgress(true);setIsShowCancel(true);try{var data=getFinalFormData();// First fetcher request to initiate the model\nfetchWrapper.post('/v1/models',data).then(function(){navigate(\"/running_models/\".concat(modelType));sessionStorage.setItem('runningModelType',\"/running_models/\".concat(modelType));var historyArr=JSON.parse(localStorage.getItem('historyArr'))||[];var historyModelNameArr=historyArr.map(function(item){return item.model_name;});if(historyModelNameArr.includes(data.model_name)){historyArr=historyArr.map(function(item){if(item.model_name===data.model_name){return data;}return item;});}else{historyArr.push(data);}localStorage.setItem('historyArr',JSON.stringify(historyArr));}).catch(function(error){var _error$response4,_error$response5;console.error('Error:',error);if(((_error$response4=error.response)===null||_error$response4===void 0?void 0:_error$response4.status)===499){setSuccessMsg(t('launchModel.cancelledSuccessfully'));}else if(((_error$response5=error.response)===null||_error$response5===void 0?void 0:_error$response5.status)!==403){setErrorMsg(error.message);}}).finally(function(){setIsCallingApi(false);stopPolling();setIsShowProgress(false);setIsShowCancel(false);setIsLoading(false);});startPolling();}catch(error){setErrorMsg(\"\".concat(error));setIsCallingApi(false);}};var modelFormConfig=getModelFormConfig({t:t,formData:formData,modelData:modelData,gpuAvailable:gpuAvailable,engineItems:engineItems,formatItems:formatItems,sizeItems:sizeItems,quantizationItems:quantizationItems,getNGPURange:getNGPURange,downloadHubOptions:downloadHubOptions,enginesWithNWorker:enginesWithNWorker,multimodalProjectorOptions:multimodalProjectorOptions});var areRequiredFieldsFilled=useMemo(function(){var data=getFinalFormData();var fields=modelFormConfig[modelType]||[];return checkRequiredFields(fields,data);},[formData,modelType]);var renderFormFields=function renderFormFields(){var fields=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var enhancedFields=fields.map(function(field){if(field.name==='reasoning_content'){var _modelData$model_abil,_ref8,_ref9,_formData$enable_thin;var enable_thinking_default=fields.find(function(item){return item.name==='enable_thinking';}).default;return _objectSpread(_objectSpread({},field),{},{visible:!!((_modelData$model_abil=modelData.model_ability)!==null&&_modelData$model_abil!==void 0&&_modelData$model_abil.includes('reasoning'))&&((_ref8=(_ref9=(_formData$enable_thin=formData.enable_thinking)!==null&&_formData$enable_thin!==void 0?_formData$enable_thin:enable_thinking_default)!==null&&_ref9!==void 0?_ref9:field.default)!==null&&_ref8!==void 0?_ref8:false)});}if(field.name==='gpu_idx'&&field.visible!==true){var n_gpu_default=fields.find(function(item){return item.name==='n_gpu';}).default;return _objectSpread(_objectSpread({},field),{},{visible:formData.n_gpu==='GPU'||(formData.n_gpu===undefined||formData.n_gpu===null||formData.n_gpu==='')&&n_gpu_default==='GPU'});}return field;});return enhancedFields.filter(function(field){return field.visible;}).map(function(field){var _ref10,_formData$field$name,_ref11,_formData$field$name2,_ref12,_formData$field$name3,_ref13,_formData$field$name4,_ref14,_ref15,_formData$field$name5,_field$options,_field$options$;var fieldKey=field.name;switch(field.type){case'collapse':{var _collapseState$fieldK;var _open=(_collapseState$fieldK=collapseState[fieldKey])!==null&&_collapseState$fieldK!==void 0?_collapseState$fieldK:false;var toggleCollapse=function toggleCollapse(){setCollapseState(function(prev){return _objectSpread(_objectSpread({},prev),{},_defineProperty({},fieldKey,!prev[fieldKey]));});};return/*#__PURE__*/_jsxs(Box,{sx:{mt:2},children:[/*#__PURE__*/_jsx(ListItemButton,{onClick:toggleCollapse,children:/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center',gap:10},children:[/*#__PURE__*/_jsx(ListItemText,{primary:field.label}),_open?/*#__PURE__*/_jsx(ExpandLess,{}):/*#__PURE__*/_jsx(ExpandMore,{})]})}),/*#__PURE__*/_jsx(Collapse,{in:_open,timeout:\"auto\",unmountOnExit:true,children:/*#__PURE__*/_jsx(Box,{sx:{pl:2},children:renderFormFields(field.children||[])})})]},fieldKey);}case'select':return/*#__PURE__*/_jsx(SelectField,{label:field.label,labelId:\"\".concat(field.name,\"-label\"),name:field.name,disabled:field.disabled,value:(_ref10=(_formData$field$name=formData[field.name])!==null&&_formData$field$name!==void 0?_formData$field$name:field.default)!==null&&_ref10!==void 0?_ref10:'',onChange:handleChange,options:field.options,required:field.required},fieldKey);case'number':return/*#__PURE__*/_jsx(TextField,{name:field.name,label:field.label,type:\"number\",disabled:field.disabled,InputProps:field.inputProps,value:(_ref11=(_formData$field$name2=formData[field.name])!==null&&_formData$field$name2!==void 0?_formData$field$name2:field.default)!==null&&_ref11!==void 0?_ref11:'',onChange:handleChange,required:field.required,error:field.error,helperText:field.error&&field.helperText,fullWidth:true,margin:\"normal\",className:\"textHighlight\"},fieldKey);case'input':return/*#__PURE__*/_jsx(TextField,{name:field.name,label:field.label,disabled:field.disabled,InputProps:field.inputProps,value:(_ref12=(_formData$field$name3=formData[field.name])!==null&&_formData$field$name3!==void 0?_formData$field$name3:field.default)!==null&&_ref12!==void 0?_ref12:'',onChange:handleChange,required:field.required,error:field.error,helperText:field.error&&field.helperText,fullWidth:true,margin:\"normal\",className:\"textHighlight\"},fieldKey);case'switch':return/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(Tooltip,{title:field.tip,placement:\"top\",children:/*#__PURE__*/_jsx(FormControlLabel,{name:field.name,label:field.label,labelPlacement:\"start\",control:/*#__PURE__*/_jsx(Switch,{checked:(_ref13=(_formData$field$name4=formData[field.name])!==null&&_formData$field$name4!==void 0?_formData$field$name4:field.default)!==null&&_ref13!==void 0?_ref13:false}),onChange:handleChange,required:field.required})})},fieldKey);case'radio':return/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center',gap:10,marginLeft:15},children:[/*#__PURE__*/_jsx(\"span\",{children:field.label}),/*#__PURE__*/_jsx(RadioGroup,{row:true,name:field.name,value:(_ref14=(_ref15=(_formData$field$name5=formData[field.name])!==null&&_formData$field$name5!==void 0?_formData$field$name5:field.default)!==null&&_ref15!==void 0?_ref15:(_field$options=field.options)===null||_field$options===void 0?void 0:(_field$options$=_field$options[0])===null||_field$options$===void 0?void 0:_field$options$.value)!==null&&_ref14!==void 0?_ref14:'',onChange:handleChange,children:field.options.map(function(item){return/*#__PURE__*/_jsx(FormControlLabel,{value:item.value,control:/*#__PURE__*/_jsx(Radio,{}),label:item.label},item.label);})})]},fieldKey);case'dynamicField':return/*#__PURE__*/_jsx(DynamicFieldList,{name:field.name,label:field.label,mode:field.mode,keyPlaceholder:field.keyPlaceholder,valuePlaceholder:field.valuePlaceholder,value:formData[field.name],onChange:handleDynamicField,keyOptions:field.keyOptions},fieldKey);default:return null;}});};var renderButtonContent=function renderButtonContent(){if(isShowCancel){return/*#__PURE__*/_jsx(StopCircle,{sx:{fontSize:26}});}if(isLoading){return/*#__PURE__*/_jsx(CircularProgress,{size:26});}return/*#__PURE__*/_jsx(RocketLaunchOutlined,{sx:{fontSize:26}});};return/*#__PURE__*/_jsx(Drawer,{open:open,onClose:onClose,anchor:\"right\",children:/*#__PURE__*/_jsxs(Box,{className:\"drawerCard\",children:[/*#__PURE__*/_jsxs(Box,{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",children:[/*#__PURE__*/_jsxs(Box,{display:\"flex\",alignItems:\"center\",children:[/*#__PURE__*/_jsx(TitleTypography,{value:modelData.model_name}),hasHistory&&/*#__PURE__*/_jsx(Chip,{label:t('launchModel.lastConfig'),variant:\"outlined\",size:\"small\",color:\"primary\",onDelete:deleteHistory})]}),/*#__PURE__*/_jsxs(Box,{display:\"flex\",alignItems:\"center\",gap:1,children:[/*#__PURE__*/_jsx(Tooltip,{title:t('launchModel.commandLineParsing'),placement:\"top\",children:/*#__PURE__*/_jsx(ContentPasteGo,{className:\"pasteText\",onClick:function onClick(){return setIsOpenPasteDialog(true);}})}),areRequiredFieldsFilled&&/*#__PURE__*/_jsx(CopyToCommandLine,{getData:getFinalFormData,predefinedKeys:llmAllDataKey})]})]}),/*#__PURE__*/_jsxs(Box,{sx:{flex:1,display:'flex',flexDirection:'column',justifyContent:'space-between'},component:\"form\",onSubmit:handleSubmit,children:[/*#__PURE__*/_jsx(Box,{children:renderFormFields(modelFormConfig[modelType])}),/*#__PURE__*/_jsxs(Box,{marginTop:4,children:[/*#__PURE__*/_jsx(Box,{height:16,children:isShowProgress&&/*#__PURE__*/_jsx(Progress,{style:{marginBottom:20},progress:progress})}),/*#__PURE__*/_jsxs(Box,{display:\"flex\",gap:2,children:[/*#__PURE__*/_jsx(Button,{style:{flex:1},variant:\"outlined\",color:\"primary\",title:t(isShowCancel?'launchModel.cancel':'launchModel.launch'),disabled:!areRequiredFieldsFilled||isLoading||isCallingApi||checkDynamicFieldComplete.some(function(item){return!item.isComplete;}),onClick:function onClick(){if(isShowCancel){fetchCancelModel();}else{handleSubmit();}},children:renderButtonContent()}),/*#__PURE__*/_jsx(Button,{style:{flex:1},variant:\"outlined\",color:\"primary\",onClick:onClose,title:t('launchModel.goBack'),children:/*#__PURE__*/_jsx(UndoOutlined,{sx:{fontSize:26}})})]})]})]}),/*#__PURE__*/_jsx(PasteDialog,{open:isOpenPasteDialog,onHandleClose:function onHandleClose(){return setIsOpenPasteDialog(false);},onHandleCommandLine:handleCommandLine})]})});};export default LaunchModelDrawer;","map":{"version":3,"names":["ContentPasteGo","ExpandLess","ExpandMore","RocketLaunchOutlined","StopCircle","UndoOutlined","Box","Button","Chip","CircularProgress","Collapse","Drawer","FormControl","FormControlLabel","InputLabel","ListItemButton","ListItemText","MenuItem","Radio","RadioGroup","Select","Switch","TextField","Tooltip","React","useContext","useEffect","useMemo","useRef","useState","useTranslation","useNavigate","ApiContext","fetchWrapper","TitleTypography","llmAllDataKey","CopyToCommandLine","DynamicFieldList","getModelFormConfig","PasteDialog","Progress","jsx","_jsx","jsxs","_jsxs","enginesWithNWorker","modelEngineType","SelectField","_ref","label","labelId","name","value","onChange","_ref$options","options","_ref$disabled","disabled","_ref$required","required","variant","margin","fullWidth","children","id","className","map","item","LaunchModelDrawer","_ref2","modelData","modelType","gpuAvailable","open","onClose","navigate","_useTranslation","t","_useContext","isCallingApi","isUpdatingModel","setErrorMsg","setSuccessMsg","setIsCallingApi","_useState","_useState2","_slicedToArray","formData","setFormData","_useState3","_useState4","hasHistory","setHasHistory","_useState5","_useState6","enginesObj","setEnginesObj","_useState7","_useState8","engineOptions","setEngineOptions","_useState9","_useState10","formatOptions","setFormatOptions","_useState11","_useState12","sizeOptions","setSizeOptions","_useState13","_useState14","quantizationOptions","setQuantizationOptions","_useState15","_useState16","multimodalProjectorOptions","setMultimodalProjectorOptions","_useState17","_useState18","multimodalProjector","setMultimodalProjector","_useState19","_useState20","isOpenPasteDialog","setIsOpenPasteDialog","_useState21","_useState22","collapseState","setCollapseState","_useState23","_useState24","isShowProgress","setIsShowProgress","_useState25","_useState26","isShowCancel","setIsShowCancel","_useState27","_useState28","isLoading","setIsLoading","_useState29","_useState30","progress","setProgress","_useState31","_useState32","checkDynamicFieldComplete","setCheckDynamicFieldComplete","intervalRef","downloadHubOptions","concat","_toConsumableArray","download_hubs","isCached","spec","Array","isArray","cache_status","some","cs","convertModelSize","size","toString","includes","parseInt","range","start","end","fill","undefined","_","i","getNGPURange","normalizeNGPU","num","isNaN","handleValueType","str","String","toLowerCase","split","Number","arrayToObject","arr","transformValue","arguments","length","v","Object","fromEntries","_ref3","key","handleGetHistory","historyArr","JSON","parse","localStorage","getItem","find","model_name","deleteHistory","newArr","filter","setItem","stringify","objectToArray","obj","entries","_ref4","_ref5","restoreNGPU","restoreFormDataFormat","finalData","result","_objectSpread","customData","push","custom","n_gpu","gpu_idx","join","peft_model_config","pmc","image_lora_load_kwargs","image_lora_fuse_kwargs","lora_list","envs","quantization_config","getCollapseStateFromData","_result$image_lora_lo","_result$image_lora_fu","_result$lora_list","_result$envs","_result$virtual_env_p","_result$virtual_env_p2","newState","model_uid","request_limits","worker_ip","download_hub","model_path","nested_section_optional","nested_section_lora","nested_section_env","virtual_env_packages","enable_virtual_env","nested_section_virtualEnv","handleCommandLine","data","restoredData","collapseFromData","prev","fetchModelEngine","model_type","get","then","keys","catch","error","_error$response","console","response","status","message","finally","fetchCancelModel","_ref6","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_error$response2","wrap","_callee$","_context","next","post","t0","stopPolling","finish","stop","apply","fetchProgress","_ref7","_callee2","res","_error$response3","_callee2$","_context2","sent","startPolling","current","setInterval","clearInterval","__isInitializing","rest","_objectWithoutProperties","_excluded","log","model_engine","_enginesObj$formData$","format","Set","model_format","_enginesObj$formData$2","_enginesObj$formData$3","configMap","LLM","field","optionSetter","extractor","model_size_in_billions","embedding","quantization","rerank","config","_defineProperty","_enginesObj$formData$4","_enginesObj$formData$5","quants","flatMap","quantizations","multimodal_projectors","engineItems","engine","_enginesObj$engine","modelFormats","from","relevantSpecs","model_specs","cached","formatItems","specs","sizeItems","quantizationItems","quant","s","indexOf","checkRequiredFields","fields","every","type","visible","trim","isDynamicFieldComplete","val","values","handleDynamicField","filtered","isComplete","handleChange","e","_e$target","target","checked","handleGPUIdx","forEach","processFieldsRecursively","default","getFinalFormData","_result$lora_list2","_result$envs2","_result$quantization_","_result$custom","modelFormConfig","n_gpu_layers","gguf_quantization","_result$key","assign","handleSubmit","sessionStorage","historyModelNameArr","_error$response4","_error$response5","areRequiredFieldsFilled","renderFormFields","enhancedFields","_modelData$model_abil","_ref8","_ref9","_formData$enable_thin","enable_thinking_default","model_ability","enable_thinking","n_gpu_default","_ref10","_formData$field$name","_ref11","_formData$field$name2","_ref12","_formData$field$name3","_ref13","_formData$field$name4","_ref14","_ref15","_formData$field$name5","_field$options","_field$options$","fieldKey","_collapseState$fieldK","toggleCollapse","sx","mt","onClick","style","display","alignItems","gap","primary","in","timeout","unmountOnExit","pl","InputProps","inputProps","helperText","title","tip","placement","labelPlacement","control","marginLeft","row","mode","keyPlaceholder","valuePlaceholder","keyOptions","renderButtonContent","fontSize","anchor","justifyContent","color","onDelete","getData","predefinedKeys","flex","flexDirection","component","onSubmit","marginTop","height","marginBottom","onHandleClose","onHandleCommandLine"],"sources":["/home/runner/work/inference/inference/xinference/ui/web/ui/src/scenes/launch_model/components/launchModelDrawer.js"],"sourcesContent":["import {\n ContentPasteGo,\n ExpandLess,\n ExpandMore,\n RocketLaunchOutlined,\n StopCircle,\n UndoOutlined,\n} from '@mui/icons-material'\nimport {\n Box,\n Button,\n Chip,\n CircularProgress,\n Collapse,\n Drawer,\n FormControl,\n FormControlLabel,\n InputLabel,\n ListItemButton,\n ListItemText,\n MenuItem,\n Radio,\n RadioGroup,\n Select,\n Switch,\n TextField,\n Tooltip,\n} from '@mui/material'\nimport React, { useContext, useEffect, useMemo, useRef, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../../components/apiContext'\nimport fetchWrapper from '../../../components/fetchWrapper'\nimport TitleTypography from '../../../components/titleTypography'\nimport { llmAllDataKey } from '../data/data'\nimport CopyToCommandLine from './commandBuilder'\nimport DynamicFieldList from './dynamicFieldList'\nimport getModelFormConfig from './modelFormConfig'\nimport PasteDialog from './pasteDialog'\nimport Progress from './progress'\n\nconst enginesWithNWorker = ['SGLang', 'vLLM', 'MLX']\nconst modelEngineType = ['LLM', 'embedding', 'rerank']\n\nconst SelectField = ({\n label,\n labelId,\n name,\n value,\n onChange,\n options = [],\n disabled = false,\n required = false,\n}) => (\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n disabled={disabled}\n required={required}\n fullWidth\n >\n <InputLabel id={labelId}>{label}</InputLabel>\n <Select\n labelId={labelId}\n name={name}\n value={value}\n onChange={onChange}\n label={label}\n className=\"textHighlight\"\n >\n {options.map((item) => (\n <MenuItem key={item.value || item} value={item.value || item}>\n {item.label || item}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n)\n\nconst LaunchModelDrawer = ({\n modelData,\n modelType,\n gpuAvailable,\n open,\n onClose,\n}) => {\n const navigate = useNavigate()\n const { t } = useTranslation()\n const {\n isCallingApi,\n isUpdatingModel,\n setErrorMsg,\n setSuccessMsg,\n setIsCallingApi,\n } = useContext(ApiContext)\n const [formData, setFormData] = useState({})\n const [hasHistory, setHasHistory] = useState(false)\n\n const [enginesObj, setEnginesObj] = useState({})\n const [engineOptions, setEngineOptions] = useState([])\n const [formatOptions, setFormatOptions] = useState([])\n const [sizeOptions, setSizeOptions] = useState([])\n const [quantizationOptions, setQuantizationOptions] = useState([])\n const [multimodalProjectorOptions, setMultimodalProjectorOptions] = useState(\n []\n )\n const [multimodalProjector, setMultimodalProjector] = useState([])\n const [isOpenPasteDialog, setIsOpenPasteDialog] = useState(false)\n const [collapseState, setCollapseState] = useState({})\n const [isShowProgress, setIsShowProgress] = useState(false)\n const [isShowCancel, setIsShowCancel] = useState(false)\n const [isLoading, setIsLoading] = useState(false)\n const [progress, setProgress] = useState(0)\n const [checkDynamicFieldComplete, setCheckDynamicFieldComplete] = useState([])\n\n const intervalRef = useRef(null)\n\n const downloadHubOptions = useMemo(\n () => ['none', ...(modelData?.download_hubs || [])],\n [modelData?.download_hubs]\n )\n\n const isCached = (spec) => {\n if (Array.isArray(spec.cache_status)) {\n return spec.cache_status.some((cs) => cs)\n } else {\n return spec.cache_status === true\n }\n }\n\n const convertModelSize = (size) => {\n return size.toString().includes('_') ? size : parseInt(size, 10)\n }\n\n const range = (start, end) => {\n return new Array(end - start + 1).fill(undefined).map((_, i) => i + start)\n }\n\n const getNGPURange = (modelType) => {\n if (['LLM', 'image'].includes(modelType)) {\n return gpuAvailable > 0\n ? ['auto', 'CPU', ...range(1, gpuAvailable)]\n : ['auto', 'CPU']\n } else {\n return gpuAvailable === 0 ? ['CPU'] : ['GPU', 'CPU']\n }\n }\n\n const normalizeNGPU = (value) => {\n if (!value) return null\n\n if (value === 'CPU') return null\n if (value === 'auto' || value === 'GPU') return 'auto'\n\n const num = parseInt(value, 10)\n return isNaN(num) || num === 0 ? null : num\n }\n\n const handleValueType = (str) => {\n str = String(str)\n if (str.toLowerCase() === 'none') {\n return null\n } else if (str.toLowerCase() === 'true') {\n return true\n } else if (str.toLowerCase() === 'false') {\n return false\n } else if (str.includes(',')) {\n return str.split(',')\n } else if (str.includes(',')) {\n return str.split(',')\n } else if (Number(str) || (str !== '' && Number(str) === 0)) {\n return Number(str)\n } else {\n return str\n }\n }\n\n const arrayToObject = (arr, transformValue = (v) => v) =>\n Object.fromEntries(\n arr.map(({ key, value }) => [key, transformValue(value)])\n )\n\n const handleGetHistory = () => {\n const historyArr = JSON.parse(localStorage.getItem('historyArr')) || []\n return historyArr.find((item) => item.model_name === modelData.model_name)\n }\n\n const deleteHistory = () => {\n const arr = JSON.parse(localStorage.getItem('historyArr'))\n const newArr = arr.filter(\n (item) => item.model_name !== modelData.model_name\n )\n localStorage.setItem('historyArr', JSON.stringify(newArr))\n setHasHistory(false)\n setFormData({})\n setCollapseState({})\n }\n\n const objectToArray = (obj) => {\n if (!obj || typeof obj !== 'object') return []\n return Object.entries(obj).map(([key, value]) => ({ key, value }))\n }\n\n const restoreNGPU = (value) => {\n if (value === null) return 'CPU'\n if (value === 'auto') {\n return ['LLM', 'image'].includes(modelType) ? 'auto' : 'GPU'\n }\n if (typeof value === 'number') return String(value)\n return value || 'CPU'\n }\n\n const restoreFormDataFormat = (finalData) => {\n const result = { ...finalData }\n\n let customData = []\n for (let key in result) {\n !llmAllDataKey.includes(key) &&\n customData.push({\n key: key,\n value:\n result[key] === null\n ? 'none'\n : result[key] === false\n ? false\n : result[key],\n })\n }\n if (customData.length) result.custom = customData\n\n result.n_gpu = restoreNGPU(result.n_gpu)\n if (result?.gpu_idx && Array.isArray(result.gpu_idx)) {\n result.gpu_idx = result.gpu_idx.join(',')\n }\n\n if (result?.peft_model_config) {\n const pmc = result.peft_model_config\n\n if (pmc.image_lora_load_kwargs) {\n result.image_lora_load_kwargs = objectToArray(\n pmc.image_lora_load_kwargs\n )\n }\n\n if (pmc.image_lora_fuse_kwargs) {\n result.image_lora_fuse_kwargs = objectToArray(\n pmc.image_lora_fuse_kwargs\n )\n }\n\n if (pmc.lora_list) {\n result.lora_list = pmc.lora_list\n }\n\n delete result.peft_model_config\n }\n\n if (\n result?.envs &&\n typeof result.envs === 'object' &&\n !Array.isArray(result.envs)\n ) {\n result.envs = objectToArray(result.envs)\n }\n\n if (\n result?.quantization_config &&\n typeof result.quantization_config === 'object' &&\n !Array.isArray(result.quantization_config)\n ) {\n result.quantization_config = objectToArray(result.quantization_config)\n }\n\n return result\n }\n\n const getCollapseStateFromData = (result) => {\n const newState = {}\n\n if (\n result.model_uid ||\n result.request_limits ||\n result.worker_ip ||\n result.gpu_idx ||\n result.download_hub ||\n result.model_path\n ) {\n newState.nested_section_optional = true\n }\n\n if (\n result.image_lora_load_kwargs?.length ||\n result.image_lora_fuse_kwargs?.length ||\n result.lora_list?.length\n ) {\n newState.nested_section_optional = true\n newState.nested_section_lora = true\n }\n\n if (result.envs?.length) {\n newState.nested_section_optional = true\n newState.nested_section_env = true\n }\n\n if (\n (result.virtual_env_packages?.length ?? 0) > 0 ||\n result.enable_virtual_env !== undefined\n ) {\n newState.nested_section_optional = true\n newState.nested_section_virtualEnv = true\n }\n\n return newState\n }\n\n const handleCommandLine = (data) => {\n if (data.model_name === modelData.model_name) {\n const restoredData = restoreFormDataFormat(data)\n setFormData(restoredData)\n\n const collapseFromData = getCollapseStateFromData(restoredData)\n setCollapseState((prev) => ({ ...prev, ...collapseFromData }))\n } else {\n setErrorMsg(t('launchModel.commandLineTip'))\n }\n }\n\n const fetchModelEngine = (model_name, model_type) => {\n fetchWrapper\n .get(\n model_type === 'LLM'\n ? `/v1/engines/${model_name}`\n : `/v1/engines/${model_type}/${model_name}`\n )\n .then((data) => {\n setEnginesObj(data)\n setEngineOptions(Object.keys(data))\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error?.response?.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n .finally(() => {\n setIsCallingApi(false)\n })\n }\n\n const fetchCancelModel = async () => {\n try {\n await fetchWrapper.post(`/v1/models/${modelData.model_name}/cancel`)\n setIsLoading(true)\n } catch (error) {\n console.error('Error:', error)\n if (error?.response?.status !== 403) {\n setErrorMsg(error.message)\n }\n } finally {\n setProgress(0)\n stopPolling()\n setIsShowProgress(false)\n setIsShowCancel(false)\n }\n }\n\n const fetchProgress = async () => {\n try {\n const res = await fetchWrapper.get(\n `/v1/models/${modelData.model_name}/progress`\n )\n if (res.progress !== 1.0) setProgress(Number(res.progress))\n } catch (error) {\n console.error('Error:', error)\n if (error?.response?.status !== 403) {\n setErrorMsg(error.message)\n }\n } finally {\n stopPolling()\n setIsCallingApi(false)\n }\n }\n\n const startPolling = () => {\n if (intervalRef.current) return\n intervalRef.current = setInterval(fetchProgress, 500)\n }\n\n const stopPolling = () => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current)\n intervalRef.current = null\n }\n }\n\n useEffect(() => {\n const data = handleGetHistory()\n if (data) {\n setHasHistory(true)\n const restoredData = restoreFormDataFormat(data)\n setFormData(\n modelEngineType.includes(modelType)\n ? { ...restoredData, __isInitializing: true }\n : restoredData\n )\n const collapseFromData = getCollapseStateFromData(restoredData)\n setCollapseState((prev) => ({ ...prev, ...collapseFromData }))\n }\n }, [])\n\n useEffect(() => {\n if (modelEngineType.includes(modelType))\n fetchModelEngine(modelData.model_name, modelType)\n }, [modelData.model_name, modelType])\n\n useEffect(() => {\n if (formData.__isInitializing) {\n setFormData((prev) => {\n const { __isInitializing, ...rest } = prev\n console.log('__isInitializing', __isInitializing)\n return rest\n })\n return\n }\n\n if (formData.model_engine && modelEngineType.includes(modelType)) {\n const format = [\n ...new Set(\n enginesObj[formData.model_engine]?.map((item) => item.model_format)\n ),\n ]\n setFormatOptions(format)\n\n if (!format.includes(formData.model_format)) {\n setFormData((prev) => ({\n ...prev,\n model_format: '',\n }))\n }\n if (format.length === 1) {\n setFormData((prev) => ({\n ...prev,\n model_format: format[0],\n }))\n }\n }\n }, [formData.model_engine, enginesObj])\n\n useEffect(() => {\n if (formData.__isInitializing) return\n\n if (!formData.model_engine || !formData.model_format) return\n\n const configMap = {\n LLM: {\n field: 'model_size_in_billions',\n optionSetter: setSizeOptions,\n extractor: (item) => item.model_size_in_billions,\n },\n embedding: {\n field: 'quantization',\n optionSetter: setQuantizationOptions,\n extractor: (item) => item.quantization,\n },\n rerank: {\n field: 'quantization',\n optionSetter: setQuantizationOptions,\n extractor: (item) => item.quantization,\n },\n }\n\n const config = configMap[modelType]\n if (!config) return\n\n const options = [\n ...new Set(\n enginesObj[formData.model_engine]\n ?.filter((item) => item.model_format === formData.model_format)\n ?.map(config.extractor)\n ),\n ]\n\n config.optionSetter(options)\n if (!options.includes(formData[config.field])) {\n setFormData((prev) => ({ ...prev, [config.field]: '' }))\n }\n\n if (options.length === 1) {\n setFormData((prev) => ({ ...prev, [config.field]: options[0] }))\n }\n }, [formData.model_engine, formData.model_format, enginesObj])\n\n useEffect(() => {\n if (formData.__isInitializing) return\n if (\n formData.model_engine &&\n formData.model_format &&\n formData.model_size_in_billions\n ) {\n const quants = [\n ...new Set(\n enginesObj[formData.model_engine]\n ?.filter(\n (item) =>\n item.model_format === formData.model_format &&\n item.model_size_in_billions ===\n convertModelSize(formData.model_size_in_billions)\n )\n .flatMap((item) => item.quantizations)\n ),\n ]\n const multimodal_projectors = [\n ...new Set(\n enginesObj[formData.model_engine]\n ?.filter(\n (item) =>\n item.model_format === formData.model_format &&\n item.model_size_in_billions ===\n convertModelSize(formData.model_size_in_billions)\n )\n .flatMap((item) => item.multimodal_projectors || [])\n ),\n ]\n setQuantizationOptions(quants)\n setMultimodalProjectorOptions(multimodal_projectors || [])\n if (!quants.includes(formData.quantization)) {\n setFormData((prev) => ({\n ...prev,\n quantization: '',\n }))\n }\n if (quants.length === 1) {\n setFormData((prev) => ({\n ...prev,\n quantization: quants[0],\n }))\n }\n if (!multimodal_projectors.includes(multimodalProjector)) {\n setMultimodalProjector('')\n }\n if (multimodal_projectors.length > 0 && !multimodalProjector) {\n setMultimodalProjector(multimodal_projectors[0])\n }\n }\n }, [\n formData.model_engine,\n formData.model_format,\n formData.model_size_in_billions,\n enginesObj,\n ])\n\n const engineItems = useMemo(() => {\n return engineOptions.map((engine) => {\n const modelFormats = Array.from(\n new Set(enginesObj[engine]?.map((item) => item.model_format))\n )\n\n const relevantSpecs = modelData.model_specs.filter((spec) =>\n modelFormats.includes(spec.model_format)\n )\n\n const cached = relevantSpecs.some((spec) => isCached(spec))\n\n return {\n value: engine,\n label: cached ? `${engine} ${t('launchModel.cached')}` : engine,\n }\n })\n }, [engineOptions, enginesObj, modelData])\n\n const formatItems = useMemo(() => {\n return formatOptions.map((format) => {\n const specs = modelData.model_specs.filter(\n (spec) => spec.model_format === format\n )\n\n const cached = specs.some((spec) => isCached(spec))\n\n return {\n value: format,\n label: cached ? `${format} ${t('launchModel.cached')}` : format,\n }\n })\n }, [formatOptions, modelData])\n\n const sizeItems = useMemo(() => {\n return sizeOptions.map((size) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === formData.model_format)\n .filter((spec) => spec.model_size_in_billions === size)\n const cached = specs.some((spec) => isCached(spec))\n\n return {\n value: size,\n label: cached ? `${size} ${t('launchModel.cached')}` : size,\n }\n })\n }, [sizeOptions, modelData])\n\n const quantizationItems = useMemo(() => {\n return quantizationOptions.map((quant) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === formData.model_format)\n .filter((spec) =>\n modelType === 'LLM'\n ? spec.model_size_in_billions ===\n convertModelSize(formData.model_size_in_billions)\n : true\n )\n\n const spec = specs.find((s) => {\n return s.quantizations === quant\n })\n const cached = Array.isArray(spec?.cache_status)\n ? spec?.cache_status[spec?.quantizations.indexOf(quant)]\n : spec?.cache_status\n\n return {\n value: quant,\n label: cached ? `${quant} ${t('launchModel.cached')}` : quant,\n }\n })\n }, [quantizationOptions, modelData])\n\n const checkRequiredFields = (fields, data) => {\n return fields.every((field) => {\n if (field.type === 'collapse' && field.children) {\n return checkRequiredFields(field.children, data)\n }\n if (field.visible && field.required) {\n const value = data[field.name]\n return (\n value !== undefined && value !== null && String(value).trim() !== ''\n )\n }\n return true\n })\n }\n\n const isDynamicFieldComplete = (val) => {\n if (!val) return false\n if (Array.isArray(val) && typeof val[0] === 'string') {\n return val.every((item) => item?.trim())\n }\n if (Array.isArray(val) && typeof val[0] === 'object') {\n return val.every((obj) => {\n return Object.values(obj).every(\n (v) => typeof v !== 'string' || v.trim()\n )\n })\n }\n return true\n }\n\n const handleDynamicField = (name, val) => {\n setCheckDynamicFieldComplete((prev) => {\n const filtered = prev.filter((item) => item.name !== name)\n return [...filtered, { name, isComplete: isDynamicFieldComplete(val) }]\n })\n setFormData((prev) => ({\n ...prev,\n [name]: val,\n }))\n }\n\n const handleChange = (e) => {\n const { name, value, type, checked } = e.target\n setFormData((prev) => ({\n ...prev,\n [name]: type === 'checkbox' ? checked : value,\n }))\n }\n\n const handleGPUIdx = (data) => {\n const arr = []\n data?.split(',').forEach((item) => {\n arr.push(Number(item))\n })\n return arr\n }\n\n const processFieldsRecursively = (fields, result) => {\n fields.forEach((field) => {\n if (result[field.name] === undefined && field.default !== undefined) {\n result[field.name] = field.default\n }\n if (\n (result[field.name] || result[field.name] === 0) &&\n field.type === 'number' &&\n typeof result[field.name] !== 'number'\n ) {\n result[field.name] = parseInt(result[field.name], 10)\n }\n if (field.name === 'gpu_idx' && result[field.name]) {\n result[field.name] = handleGPUIdx(result[field.name])\n }\n if (\n field.visible === false ||\n result[field.name] === '' ||\n result[field.name] == null\n ) {\n delete result[field.name]\n }\n if (field.type === 'dynamicField' && Array.isArray(result[field.name])) {\n result[field.name] = result[field.name].filter((item) => {\n if (typeof item === 'string') {\n return item.trim() !== ''\n } else if (typeof item === 'object' && item !== null) {\n return Object.values(item).every((val) => {\n if (typeof val === 'string') {\n return val.trim() !== ''\n }\n return val !== undefined && val !== null\n })\n }\n return false\n })\n if (result[field.name].length === 0) {\n delete result[field.name]\n }\n }\n if (field.type === 'collapse' && Array.isArray(field.children)) {\n processFieldsRecursively(field.children, result)\n }\n })\n }\n\n const getFinalFormData = () => {\n const fields = modelFormConfig[modelType] || []\n let result = {\n model_name: modelData.model_name,\n model_type: modelType,\n ...formData,\n }\n\n processFieldsRecursively(fields, result)\n\n if (result.n_gpu) {\n result.n_gpu = normalizeNGPU(result.n_gpu)\n }\n\n if (result.n_gpu_layers < 0) {\n delete result.n_gpu_layers\n }\n if (result.download_hub === 'none') {\n delete result.download_hub\n }\n if (result.gguf_quantization === 'none') {\n delete result.gguf_quantization\n }\n\n const peft_model_config = {}\n ;['image_lora_load_kwargs', 'image_lora_fuse_kwargs'].forEach((key) => {\n if (result[key]?.length) {\n peft_model_config[key] = arrayToObject(result[key], handleValueType)\n delete result[key]\n }\n })\n if (result.lora_list?.length) {\n peft_model_config.lora_list = result.lora_list\n delete result.lora_list\n }\n if (Object.keys(peft_model_config).length) {\n result.peft_model_config = peft_model_config\n }\n\n if (result.enable_virtual_env === 'unset') {\n delete result.enable_virtual_env\n } else if (result.enable_virtual_env === 'true') {\n result.enable_virtual_env = true\n } else if (result.enable_virtual_env === 'false') {\n result.enable_virtual_env = false\n }\n\n if (result.envs?.length) {\n result.envs = arrayToObject(result.envs)\n }\n\n if (result.quantization_config?.length) {\n result.quantization_config = arrayToObject(\n result.quantization_config,\n handleValueType\n )\n }\n\n for (const key in result) {\n if (![...llmAllDataKey, 'custom'].includes(key)) {\n delete result[key]\n }\n }\n if (result.custom?.length) {\n Object.assign(result, arrayToObject(result.custom, handleValueType))\n delete result.custom\n }\n\n return result\n }\n\n const handleSubmit = () => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n\n setIsCallingApi(true)\n setProgress(0)\n setIsShowProgress(true)\n setIsShowCancel(true)\n\n try {\n const data = getFinalFormData()\n // First fetcher request to initiate the model\n fetchWrapper\n .post('/v1/models', data)\n .then(() => {\n navigate(`/running_models/${modelType}`)\n sessionStorage.setItem(\n 'runningModelType',\n `/running_models/${modelType}`\n )\n let historyArr = JSON.parse(localStorage.getItem('historyArr')) || []\n const historyModelNameArr = historyArr.map((item) => item.model_name)\n if (historyModelNameArr.includes(data.model_name)) {\n historyArr = historyArr.map((item) => {\n if (item.model_name === data.model_name) {\n return data\n }\n return item\n })\n } else {\n historyArr.push(data)\n }\n localStorage.setItem('historyArr', JSON.stringify(historyArr))\n })\n .catch((error) => {\n console.error('Error:', error)\n if (error.response?.status === 499) {\n setSuccessMsg(t('launchModel.cancelledSuccessfully'))\n } else if (error.response?.status !== 403) {\n setErrorMsg(error.message)\n }\n })\n .finally(() => {\n setIsCallingApi(false)\n stopPolling()\n setIsShowProgress(false)\n setIsShowCancel(false)\n setIsLoading(false)\n })\n startPolling()\n } catch (error) {\n setErrorMsg(`${error}`)\n setIsCallingApi(false)\n }\n }\n\n const modelFormConfig = getModelFormConfig({\n t,\n formData,\n modelData,\n gpuAvailable,\n engineItems,\n formatItems,\n sizeItems,\n quantizationItems,\n getNGPURange,\n downloadHubOptions,\n enginesWithNWorker,\n multimodalProjectorOptions,\n })\n\n const areRequiredFieldsFilled = useMemo(() => {\n const data = getFinalFormData()\n const fields = modelFormConfig[modelType] || []\n return checkRequiredFields(fields, data)\n }, [formData, modelType])\n\n const renderFormFields = (fields = []) => {\n const enhancedFields = fields.map((field) => {\n if (field.name === 'reasoning_content') {\n const enable_thinking_default = fields.find(\n (item) => item.name === 'enable_thinking'\n ).default\n return {\n ...field,\n visible:\n !!modelData.model_ability?.includes('reasoning') &&\n (formData.enable_thinking ??\n enable_thinking_default ??\n field.default ??\n false),\n }\n }\n if (field.name === 'gpu_idx' && field.visible !== true) {\n const n_gpu_default = fields.find(\n (item) => item.name === 'n_gpu'\n ).default\n\n return {\n ...field,\n visible:\n formData.n_gpu === 'GPU' ||\n ((formData.n_gpu === undefined ||\n formData.n_gpu === null ||\n formData.n_gpu === '') &&\n n_gpu_default === 'GPU'),\n }\n }\n return field\n })\n\n return enhancedFields\n .filter((field) => field.visible)\n .map((field) => {\n const fieldKey = field.name\n switch (field.type) {\n case 'collapse': {\n const open = collapseState[fieldKey] ?? false\n\n const toggleCollapse = () => {\n setCollapseState((prev) => ({\n ...prev,\n [fieldKey]: !prev[fieldKey],\n }))\n }\n\n return (\n <Box key={fieldKey} sx={{ mt: 2 }}>\n <ListItemButton onClick={toggleCollapse}>\n <div\n style={{ display: 'flex', alignItems: 'center', gap: 10 }}\n >\n <ListItemText primary={field.label} />\n {open ? <ExpandLess /> : <ExpandMore />}\n </div>\n </ListItemButton>\n <Collapse in={open} timeout=\"auto\" unmountOnExit>\n <Box sx={{ pl: 2 }}>\n {renderFormFields(field.children || [])}\n </Box>\n </Collapse>\n </Box>\n )\n }\n case 'select':\n return (\n <SelectField\n key={fieldKey}\n label={field.label}\n labelId={`${field.name}-label`}\n name={field.name}\n disabled={field.disabled}\n value={formData[field.name] ?? field.default ?? ''}\n onChange={handleChange}\n options={field.options}\n required={field.required}\n />\n )\n case 'number':\n return (\n <TextField\n key={fieldKey}\n name={field.name}\n label={field.label}\n type=\"number\"\n disabled={field.disabled}\n InputProps={field.inputProps}\n value={formData[field.name] ?? field.default ?? ''}\n onChange={handleChange}\n required={field.required}\n error={field.error}\n helperText={field.error && field.helperText}\n fullWidth\n margin=\"normal\"\n className=\"textHighlight\"\n />\n )\n case 'input':\n return (\n <TextField\n key={fieldKey}\n name={field.name}\n label={field.label}\n disabled={field.disabled}\n InputProps={field.inputProps}\n value={formData[field.name] ?? field.default ?? ''}\n onChange={handleChange}\n required={field.required}\n error={field.error}\n helperText={field.error && field.helperText}\n fullWidth\n margin=\"normal\"\n className=\"textHighlight\"\n />\n )\n case 'switch':\n return (\n <div key={fieldKey}>\n <Tooltip title={field.tip} placement=\"top\">\n <FormControlLabel\n name={field.name}\n label={field.label}\n labelPlacement=\"start\"\n control={\n <Switch\n checked={formData[field.name] ?? field.default ?? false}\n />\n }\n onChange={handleChange}\n required={field.required}\n />\n </Tooltip>\n </div>\n )\n case 'radio':\n return (\n <div\n key={fieldKey}\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 10,\n marginLeft: 15,\n }}\n >\n <span>{field.label}</span>\n <RadioGroup\n row\n name={field.name}\n value={\n formData[field.name] ??\n field.default ??\n field.options?.[0]?.value ??\n ''\n }\n onChange={handleChange}\n >\n {field.options.map((item) => (\n <FormControlLabel\n key={item.label}\n value={item.value}\n control={<Radio />}\n label={item.label}\n />\n ))}\n </RadioGroup>\n </div>\n )\n case 'dynamicField':\n return (\n <DynamicFieldList\n key={fieldKey}\n name={field.name}\n label={field.label}\n mode={field.mode}\n keyPlaceholder={field.keyPlaceholder}\n valuePlaceholder={field.valuePlaceholder}\n value={formData[field.name]}\n onChange={handleDynamicField}\n keyOptions={field.keyOptions}\n />\n )\n default:\n return null\n }\n })\n }\n\n const renderButtonContent = () => {\n if (isShowCancel) {\n return <StopCircle sx={{ fontSize: 26 }} />\n }\n if (isLoading) {\n return <CircularProgress size={26} />\n }\n\n return <RocketLaunchOutlined sx={{ fontSize: 26 }} />\n }\n\n return (\n <Drawer open={open} onClose={onClose} anchor=\"right\">\n <Box className=\"drawerCard\">\n <Box display=\"flex\" alignItems=\"center\" justifyContent=\"space-between\">\n <Box display=\"flex\" alignItems=\"center\">\n <TitleTypography value={modelData.model_name} />\n {hasHistory && (\n <Chip\n label={t('launchModel.lastConfig')}\n variant=\"outlined\"\n size=\"small\"\n color=\"primary\"\n onDelete={deleteHistory}\n />\n )}\n </Box>\n <Box display=\"flex\" alignItems=\"center\" gap={1}>\n <Tooltip\n title={t('launchModel.commandLineParsing')}\n placement=\"top\"\n >\n <ContentPasteGo\n className=\"pasteText\"\n onClick={() => setIsOpenPasteDialog(true)}\n />\n </Tooltip>\n\n {areRequiredFieldsFilled && (\n <CopyToCommandLine\n getData={getFinalFormData}\n predefinedKeys={llmAllDataKey}\n />\n )}\n </Box>\n </Box>\n\n <Box\n sx={{\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n }}\n component=\"form\"\n onSubmit={handleSubmit}\n >\n <Box>{renderFormFields(modelFormConfig[modelType])}</Box>\n\n <Box marginTop={4}>\n <Box height={16}>\n {isShowProgress && (\n <Progress style={{ marginBottom: 20 }} progress={progress} />\n )}\n </Box>\n <Box display=\"flex\" gap={2}>\n <Button\n style={{ flex: 1 }}\n variant=\"outlined\"\n color=\"primary\"\n title={t(\n isShowCancel ? 'launchModel.cancel' : 'launchModel.launch'\n )}\n disabled={\n !areRequiredFieldsFilled ||\n isLoading ||\n isCallingApi ||\n checkDynamicFieldComplete.some((item) => !item.isComplete)\n }\n onClick={() => {\n if (isShowCancel) {\n fetchCancelModel()\n } else {\n handleSubmit()\n }\n }}\n >\n {renderButtonContent()}\n </Button>\n <Button\n style={{ flex: 1 }}\n variant=\"outlined\"\n color=\"primary\"\n onClick={onClose}\n title={t('launchModel.goBack')}\n >\n <UndoOutlined sx={{ fontSize: 26 }} />\n </Button>\n </Box>\n </Box>\n </Box>\n\n <PasteDialog\n open={isOpenPasteDialog}\n onHandleClose={() => setIsOpenPasteDialog(false)}\n onHandleCommandLine={handleCommandLine}\n />\n </Box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