xinference 1.0.1__py3-none-any.whl → 1.2.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.

Files changed (343) hide show
  1. xinference/_compat.py +2 -0
  2. xinference/_version.py +3 -3
  3. xinference/api/restful_api.py +77 -71
  4. xinference/core/chat_interface.py +6 -1
  5. xinference/core/model.py +79 -19
  6. xinference/core/supervisor.py +172 -10
  7. xinference/core/utils.py +12 -8
  8. xinference/core/worker.py +102 -4
  9. xinference/deploy/cmdline.py +3 -1
  10. xinference/deploy/test/test_cmdline.py +56 -0
  11. xinference/isolation.py +24 -0
  12. xinference/model/audio/core.py +16 -0
  13. xinference/model/audio/cosyvoice.py +39 -6
  14. xinference/model/audio/f5tts.py +200 -0
  15. xinference/model/audio/f5tts_mlx.py +260 -0
  16. xinference/model/audio/fish_speech.py +36 -111
  17. xinference/model/audio/melotts.py +110 -0
  18. xinference/model/audio/model_spec.json +99 -3
  19. xinference/model/audio/model_spec_modelscope.json +27 -0
  20. xinference/model/audio/utils.py +32 -0
  21. xinference/model/audio/whisper.py +35 -10
  22. xinference/model/embedding/core.py +203 -142
  23. xinference/model/embedding/model_spec.json +7 -0
  24. xinference/model/embedding/model_spec_modelscope.json +8 -0
  25. xinference/model/image/core.py +69 -1
  26. xinference/model/image/model_spec.json +145 -4
  27. xinference/model/image/model_spec_modelscope.json +150 -4
  28. xinference/model/image/stable_diffusion/core.py +45 -13
  29. xinference/model/llm/__init__.py +4 -2
  30. xinference/model/llm/llm_family.json +536 -53
  31. xinference/model/llm/llm_family.py +15 -36
  32. xinference/model/llm/llm_family_modelscope.json +454 -20
  33. xinference/model/llm/memory.py +1 -1
  34. xinference/model/llm/mlx/core.py +248 -52
  35. xinference/model/llm/sglang/core.py +1 -0
  36. xinference/model/llm/transformers/chatglm.py +9 -5
  37. xinference/model/llm/transformers/cogagent.py +272 -0
  38. xinference/model/llm/transformers/core.py +2 -0
  39. xinference/model/llm/transformers/qwen2_vl.py +12 -1
  40. xinference/model/llm/transformers/utils.py +16 -8
  41. xinference/model/llm/utils.py +36 -4
  42. xinference/model/llm/vllm/core.py +53 -10
  43. xinference/model/llm/vllm/xavier/__init__.py +13 -0
  44. xinference/model/llm/vllm/xavier/allocator.py +74 -0
  45. xinference/model/llm/vllm/xavier/block.py +111 -0
  46. xinference/model/llm/vllm/xavier/block_manager.py +71 -0
  47. xinference/model/llm/vllm/xavier/block_tracker.py +129 -0
  48. xinference/model/llm/vllm/xavier/collective.py +74 -0
  49. xinference/model/llm/vllm/xavier/collective_manager.py +147 -0
  50. xinference/model/llm/vllm/xavier/engine.py +247 -0
  51. xinference/model/llm/vllm/xavier/executor.py +134 -0
  52. xinference/model/llm/vllm/xavier/scheduler.py +438 -0
  53. xinference/model/llm/vllm/xavier/test/__init__.py +13 -0
  54. xinference/model/llm/vllm/xavier/test/test_xavier.py +147 -0
  55. xinference/model/llm/vllm/xavier/transfer.py +319 -0
  56. xinference/model/video/diffusers.py +14 -0
  57. xinference/model/video/model_spec.json +15 -0
  58. xinference/model/video/model_spec_modelscope.json +16 -0
  59. xinference/thirdparty/cosyvoice/bin/average_model.py +92 -0
  60. xinference/thirdparty/cosyvoice/bin/export_jit.py +12 -2
  61. xinference/thirdparty/cosyvoice/bin/export_onnx.py +112 -0
  62. xinference/thirdparty/cosyvoice/bin/export_trt.sh +9 -0
  63. xinference/thirdparty/cosyvoice/bin/inference.py +5 -7
  64. xinference/thirdparty/cosyvoice/bin/spk2info.pt +0 -0
  65. xinference/thirdparty/cosyvoice/bin/train.py +42 -8
  66. xinference/thirdparty/cosyvoice/cli/cosyvoice.py +96 -25
  67. xinference/thirdparty/cosyvoice/cli/frontend.py +77 -30
  68. xinference/thirdparty/cosyvoice/cli/model.py +330 -80
  69. xinference/thirdparty/cosyvoice/dataset/dataset.py +6 -2
  70. xinference/thirdparty/cosyvoice/dataset/processor.py +76 -14
  71. xinference/thirdparty/cosyvoice/flow/decoder.py +92 -13
  72. xinference/thirdparty/cosyvoice/flow/flow.py +99 -9
  73. xinference/thirdparty/cosyvoice/flow/flow_matching.py +110 -13
  74. xinference/thirdparty/cosyvoice/flow/length_regulator.py +5 -4
  75. xinference/thirdparty/cosyvoice/hifigan/discriminator.py +140 -0
  76. xinference/thirdparty/cosyvoice/hifigan/generator.py +58 -42
  77. xinference/thirdparty/cosyvoice/hifigan/hifigan.py +67 -0
  78. xinference/thirdparty/cosyvoice/llm/llm.py +139 -6
  79. xinference/thirdparty/cosyvoice/tokenizer/assets/multilingual_zh_ja_yue_char_del.tiktoken +58836 -0
  80. xinference/thirdparty/cosyvoice/tokenizer/tokenizer.py +279 -0
  81. xinference/thirdparty/cosyvoice/transformer/embedding.py +2 -2
  82. xinference/thirdparty/cosyvoice/transformer/encoder_layer.py +7 -7
  83. xinference/thirdparty/cosyvoice/transformer/upsample_encoder.py +318 -0
  84. xinference/thirdparty/cosyvoice/utils/common.py +28 -1
  85. xinference/thirdparty/cosyvoice/utils/executor.py +69 -7
  86. xinference/thirdparty/cosyvoice/utils/file_utils.py +2 -12
  87. xinference/thirdparty/cosyvoice/utils/frontend_utils.py +9 -5
  88. xinference/thirdparty/cosyvoice/utils/losses.py +20 -0
  89. xinference/thirdparty/cosyvoice/utils/scheduler.py +1 -2
  90. xinference/thirdparty/cosyvoice/utils/train_utils.py +101 -45
  91. xinference/thirdparty/f5_tts/api.py +166 -0
  92. xinference/thirdparty/f5_tts/configs/E2TTS_Base_train.yaml +44 -0
  93. xinference/thirdparty/f5_tts/configs/E2TTS_Small_train.yaml +44 -0
  94. xinference/thirdparty/f5_tts/configs/F5TTS_Base_train.yaml +46 -0
  95. xinference/thirdparty/f5_tts/configs/F5TTS_Small_train.yaml +46 -0
  96. xinference/thirdparty/f5_tts/eval/README.md +49 -0
  97. xinference/thirdparty/f5_tts/eval/ecapa_tdnn.py +330 -0
  98. xinference/thirdparty/f5_tts/eval/eval_infer_batch.py +207 -0
  99. xinference/thirdparty/f5_tts/eval/eval_infer_batch.sh +13 -0
  100. xinference/thirdparty/f5_tts/eval/eval_librispeech_test_clean.py +84 -0
  101. xinference/thirdparty/f5_tts/eval/eval_seedtts_testset.py +84 -0
  102. xinference/thirdparty/f5_tts/eval/utils_eval.py +405 -0
  103. xinference/thirdparty/f5_tts/infer/README.md +191 -0
  104. xinference/thirdparty/f5_tts/infer/SHARED.md +74 -0
  105. xinference/thirdparty/f5_tts/infer/examples/basic/basic.toml +11 -0
  106. xinference/thirdparty/f5_tts/infer/examples/basic/basic_ref_en.wav +0 -0
  107. xinference/thirdparty/f5_tts/infer/examples/basic/basic_ref_zh.wav +0 -0
  108. xinference/thirdparty/f5_tts/infer/examples/multi/country.flac +0 -0
  109. xinference/thirdparty/f5_tts/infer/examples/multi/main.flac +0 -0
  110. xinference/thirdparty/f5_tts/infer/examples/multi/story.toml +19 -0
  111. xinference/thirdparty/f5_tts/infer/examples/multi/story.txt +1 -0
  112. xinference/thirdparty/f5_tts/infer/examples/multi/town.flac +0 -0
  113. xinference/thirdparty/f5_tts/infer/examples/vocab.txt +2545 -0
  114. xinference/thirdparty/f5_tts/infer/infer_cli.py +226 -0
  115. xinference/thirdparty/f5_tts/infer/infer_gradio.py +851 -0
  116. xinference/thirdparty/f5_tts/infer/speech_edit.py +193 -0
  117. xinference/thirdparty/f5_tts/infer/utils_infer.py +538 -0
  118. xinference/thirdparty/f5_tts/model/__init__.py +10 -0
  119. xinference/thirdparty/f5_tts/model/backbones/README.md +20 -0
  120. xinference/thirdparty/f5_tts/model/backbones/dit.py +163 -0
  121. xinference/thirdparty/f5_tts/model/backbones/mmdit.py +146 -0
  122. xinference/thirdparty/f5_tts/model/backbones/unett.py +219 -0
  123. xinference/thirdparty/f5_tts/model/cfm.py +285 -0
  124. xinference/thirdparty/f5_tts/model/dataset.py +319 -0
  125. xinference/thirdparty/f5_tts/model/modules.py +658 -0
  126. xinference/thirdparty/f5_tts/model/trainer.py +366 -0
  127. xinference/thirdparty/f5_tts/model/utils.py +185 -0
  128. xinference/thirdparty/f5_tts/scripts/count_max_epoch.py +33 -0
  129. xinference/thirdparty/f5_tts/scripts/count_params_gflops.py +39 -0
  130. xinference/thirdparty/f5_tts/socket_server.py +159 -0
  131. xinference/thirdparty/f5_tts/train/README.md +77 -0
  132. xinference/thirdparty/f5_tts/train/datasets/prepare_csv_wavs.py +139 -0
  133. xinference/thirdparty/f5_tts/train/datasets/prepare_emilia.py +230 -0
  134. xinference/thirdparty/f5_tts/train/datasets/prepare_libritts.py +92 -0
  135. xinference/thirdparty/f5_tts/train/datasets/prepare_ljspeech.py +65 -0
  136. xinference/thirdparty/f5_tts/train/datasets/prepare_wenetspeech4tts.py +125 -0
  137. xinference/thirdparty/f5_tts/train/finetune_cli.py +174 -0
  138. xinference/thirdparty/f5_tts/train/finetune_gradio.py +1846 -0
  139. xinference/thirdparty/f5_tts/train/train.py +75 -0
  140. xinference/thirdparty/fish_speech/fish_speech/conversation.py +94 -83
  141. xinference/thirdparty/fish_speech/fish_speech/models/text2semantic/llama.py +63 -20
  142. xinference/thirdparty/fish_speech/fish_speech/text/clean.py +1 -26
  143. xinference/thirdparty/fish_speech/fish_speech/text/spliter.py +1 -1
  144. xinference/thirdparty/fish_speech/fish_speech/tokenizer.py +152 -0
  145. xinference/thirdparty/fish_speech/fish_speech/train.py +2 -2
  146. xinference/thirdparty/fish_speech/fish_speech/webui/manage.py +1 -1
  147. xinference/thirdparty/fish_speech/tools/{post_api.py → api_client.py} +7 -13
  148. xinference/thirdparty/fish_speech/tools/api_server.py +98 -0
  149. xinference/thirdparty/fish_speech/tools/download_models.py +5 -5
  150. xinference/thirdparty/fish_speech/tools/fish_e2e.py +2 -2
  151. xinference/thirdparty/fish_speech/tools/inference_engine/__init__.py +192 -0
  152. xinference/thirdparty/fish_speech/tools/inference_engine/reference_loader.py +125 -0
  153. xinference/thirdparty/fish_speech/tools/inference_engine/utils.py +39 -0
  154. xinference/thirdparty/fish_speech/tools/inference_engine/vq_manager.py +57 -0
  155. xinference/thirdparty/fish_speech/tools/llama/eval_in_context.py +2 -2
  156. xinference/thirdparty/fish_speech/tools/llama/generate.py +117 -89
  157. xinference/thirdparty/fish_speech/tools/run_webui.py +104 -0
  158. xinference/thirdparty/fish_speech/tools/schema.py +11 -28
  159. xinference/thirdparty/fish_speech/tools/server/agent/__init__.py +57 -0
  160. xinference/thirdparty/fish_speech/tools/server/agent/generate.py +119 -0
  161. xinference/thirdparty/fish_speech/tools/server/agent/generation_utils.py +122 -0
  162. xinference/thirdparty/fish_speech/tools/server/agent/pre_generation_utils.py +72 -0
  163. xinference/thirdparty/fish_speech/tools/server/api_utils.py +75 -0
  164. xinference/thirdparty/fish_speech/tools/server/exception_handler.py +27 -0
  165. xinference/thirdparty/fish_speech/tools/server/inference.py +45 -0
  166. xinference/thirdparty/fish_speech/tools/server/model_manager.py +122 -0
  167. xinference/thirdparty/fish_speech/tools/server/model_utils.py +129 -0
  168. xinference/thirdparty/fish_speech/tools/server/views.py +246 -0
  169. xinference/thirdparty/fish_speech/tools/webui/__init__.py +173 -0
  170. xinference/thirdparty/fish_speech/tools/webui/inference.py +91 -0
  171. xinference/thirdparty/fish_speech/tools/webui/variables.py +14 -0
  172. xinference/thirdparty/matcha/utils/utils.py +2 -2
  173. xinference/thirdparty/melo/api.py +135 -0
  174. xinference/thirdparty/melo/app.py +61 -0
  175. xinference/thirdparty/melo/attentions.py +459 -0
  176. xinference/thirdparty/melo/commons.py +160 -0
  177. xinference/thirdparty/melo/configs/config.json +94 -0
  178. xinference/thirdparty/melo/data/example/metadata.list +20 -0
  179. xinference/thirdparty/melo/data_utils.py +413 -0
  180. xinference/thirdparty/melo/download_utils.py +67 -0
  181. xinference/thirdparty/melo/infer.py +25 -0
  182. xinference/thirdparty/melo/init_downloads.py +14 -0
  183. xinference/thirdparty/melo/losses.py +58 -0
  184. xinference/thirdparty/melo/main.py +36 -0
  185. xinference/thirdparty/melo/mel_processing.py +174 -0
  186. xinference/thirdparty/melo/models.py +1030 -0
  187. xinference/thirdparty/melo/modules.py +598 -0
  188. xinference/thirdparty/melo/monotonic_align/__init__.py +16 -0
  189. xinference/thirdparty/melo/monotonic_align/core.py +46 -0
  190. xinference/thirdparty/melo/preprocess_text.py +135 -0
  191. xinference/thirdparty/melo/split_utils.py +174 -0
  192. xinference/thirdparty/melo/text/__init__.py +35 -0
  193. xinference/thirdparty/melo/text/chinese.py +199 -0
  194. xinference/thirdparty/melo/text/chinese_bert.py +107 -0
  195. xinference/thirdparty/melo/text/chinese_mix.py +253 -0
  196. xinference/thirdparty/melo/text/cleaner.py +36 -0
  197. xinference/thirdparty/melo/text/cleaner_multiling.py +110 -0
  198. xinference/thirdparty/melo/text/cmudict.rep +129530 -0
  199. xinference/thirdparty/melo/text/cmudict_cache.pickle +0 -0
  200. xinference/thirdparty/melo/text/english.py +284 -0
  201. xinference/thirdparty/melo/text/english_bert.py +39 -0
  202. xinference/thirdparty/melo/text/english_utils/abbreviations.py +35 -0
  203. xinference/thirdparty/melo/text/english_utils/number_norm.py +97 -0
  204. xinference/thirdparty/melo/text/english_utils/time_norm.py +47 -0
  205. xinference/thirdparty/melo/text/es_phonemizer/base.py +140 -0
  206. xinference/thirdparty/melo/text/es_phonemizer/cleaner.py +109 -0
  207. xinference/thirdparty/melo/text/es_phonemizer/es_symbols.json +79 -0
  208. xinference/thirdparty/melo/text/es_phonemizer/es_symbols.txt +1 -0
  209. xinference/thirdparty/melo/text/es_phonemizer/es_symbols_v2.json +83 -0
  210. xinference/thirdparty/melo/text/es_phonemizer/es_to_ipa.py +12 -0
  211. xinference/thirdparty/melo/text/es_phonemizer/example_ipa.txt +400 -0
  212. xinference/thirdparty/melo/text/es_phonemizer/gruut_wrapper.py +253 -0
  213. xinference/thirdparty/melo/text/es_phonemizer/punctuation.py +174 -0
  214. xinference/thirdparty/melo/text/es_phonemizer/spanish_symbols.txt +1 -0
  215. xinference/thirdparty/melo/text/es_phonemizer/test.ipynb +124 -0
  216. xinference/thirdparty/melo/text/fr_phonemizer/base.py +140 -0
  217. xinference/thirdparty/melo/text/fr_phonemizer/cleaner.py +122 -0
  218. xinference/thirdparty/melo/text/fr_phonemizer/en_symbols.json +78 -0
  219. xinference/thirdparty/melo/text/fr_phonemizer/example_ipa.txt +1 -0
  220. xinference/thirdparty/melo/text/fr_phonemizer/fr_symbols.json +89 -0
  221. xinference/thirdparty/melo/text/fr_phonemizer/fr_to_ipa.py +30 -0
  222. xinference/thirdparty/melo/text/fr_phonemizer/french_abbreviations.py +48 -0
  223. xinference/thirdparty/melo/text/fr_phonemizer/french_symbols.txt +1 -0
  224. xinference/thirdparty/melo/text/fr_phonemizer/gruut_wrapper.py +258 -0
  225. xinference/thirdparty/melo/text/fr_phonemizer/punctuation.py +172 -0
  226. xinference/thirdparty/melo/text/french.py +94 -0
  227. xinference/thirdparty/melo/text/french_bert.py +39 -0
  228. xinference/thirdparty/melo/text/japanese.py +647 -0
  229. xinference/thirdparty/melo/text/japanese_bert.py +49 -0
  230. xinference/thirdparty/melo/text/ko_dictionary.py +44 -0
  231. xinference/thirdparty/melo/text/korean.py +192 -0
  232. xinference/thirdparty/melo/text/opencpop-strict.txt +429 -0
  233. xinference/thirdparty/melo/text/spanish.py +122 -0
  234. xinference/thirdparty/melo/text/spanish_bert.py +39 -0
  235. xinference/thirdparty/melo/text/symbols.py +290 -0
  236. xinference/thirdparty/melo/text/tone_sandhi.py +769 -0
  237. xinference/thirdparty/melo/train.py +635 -0
  238. xinference/thirdparty/melo/train.sh +19 -0
  239. xinference/thirdparty/melo/transforms.py +209 -0
  240. xinference/thirdparty/melo/utils.py +424 -0
  241. xinference/types.py +15 -0
  242. xinference/web/ui/build/asset-manifest.json +6 -6
  243. xinference/web/ui/build/index.html +1 -1
  244. xinference/web/ui/build/static/css/main.51a587ff.css +2 -0
  245. xinference/web/ui/build/static/css/main.51a587ff.css.map +1 -0
  246. xinference/web/ui/build/static/js/main.b0936c54.js +3 -0
  247. xinference/web/ui/build/static/js/main.b0936c54.js.map +1 -0
  248. xinference/web/ui/node_modules/.cache/babel-loader/03c4052f1b91f6ba0c5389bdcf49c43319b4076c08e4b8585dab312538ae290a.json +1 -0
  249. xinference/web/ui/node_modules/.cache/babel-loader/1786b83003b8e9605a0f5f855a185d4d16e38fc893dfb326a2a9cca206b4240a.json +1 -0
  250. xinference/web/ui/node_modules/.cache/babel-loader/17cbc181dd674b9150b80c73ed6a82656de0082d857f6e5f66d9716129ac0b38.json +1 -0
  251. xinference/web/ui/node_modules/.cache/babel-loader/185ceb8872d562e032b47e79df6a45670e06345b8ed70aad1a131e0476783c5c.json +1 -0
  252. xinference/web/ui/node_modules/.cache/babel-loader/26b8c9f34b0bed789b3a833767672e39302d1e0c09b4276f4d58d1df7b6bd93b.json +1 -0
  253. xinference/web/ui/node_modules/.cache/babel-loader/2b484da66c724d0d56a40849c109327408796a668b1381511b6e9e03baa48658.json +1 -0
  254. xinference/web/ui/node_modules/.cache/babel-loader/2cbbbce9b84df73330d4c42b82436ed881b3847628f2fbc346aa62e2859fd88c.json +1 -0
  255. xinference/web/ui/node_modules/.cache/babel-loader/2ec9b14431ed33ce6901bf9f27007be4e6e472709c99d6e22b50ce528e4b78ee.json +1 -0
  256. xinference/web/ui/node_modules/.cache/babel-loader/3b966db018f96be4a055d6ca205f0990d4d0b370e2980c17d8bca2c9a021819c.json +1 -0
  257. xinference/web/ui/node_modules/.cache/babel-loader/3eefb411b24c2b3ce053570ef50daccf154022f0e168be5ed0fec21394baf9f4.json +1 -0
  258. xinference/web/ui/node_modules/.cache/babel-loader/522b229e3cac219123f0d69673f5570e191c2d2a505dc65b312d336eae2279c0.json +1 -0
  259. xinference/web/ui/node_modules/.cache/babel-loader/52e45f17ba300580ea3fcc9f9228ccba194bb092b76f25e9255af311f8b05aab.json +1 -0
  260. xinference/web/ui/node_modules/.cache/babel-loader/5a0bc4631f936459afc1a3b1d3ec2420118b1f00e11f60ccac3e08088f3f27a8.json +1 -0
  261. xinference/web/ui/node_modules/.cache/babel-loader/611fa2c6c53b66039991d06dfb0473b5ab37fc63b4564e0f6e1718523768a045.json +1 -0
  262. xinference/web/ui/node_modules/.cache/babel-loader/6329bc76c406fe5eb305412383fbde5950f847bb5e43261f73f37622c365acb4.json +1 -0
  263. xinference/web/ui/node_modules/.cache/babel-loader/63c8e07687ea53a4f8a910ee5e42e0eb26cd1acbfbe820f3e3248a786ee51401.json +1 -0
  264. xinference/web/ui/node_modules/.cache/babel-loader/69b2d5001684174ec9da57e07914eed3eac4960018bceb6cbfa801d861301d7c.json +1 -0
  265. xinference/web/ui/node_modules/.cache/babel-loader/710c1acda69e561e30a933b98c6a56d50197868b15c21e2aad55ab6d46649eb6.json +1 -0
  266. xinference/web/ui/node_modules/.cache/babel-loader/720deca1fce5a1dc5056048fa8258fd138a82ea855f350b6613f104a73fb761f.json +1 -0
  267. xinference/web/ui/node_modules/.cache/babel-loader/76a23b92d26a499c57e61eea2b895fbc9771bd0849a72e66f8e633192017978b.json +1 -0
  268. xinference/web/ui/node_modules/.cache/babel-loader/858063f23b34dfe600254eb5afd85518b0002ec4b30b7386616c45600826e3b2.json +1 -0
  269. xinference/web/ui/node_modules/.cache/babel-loader/920b82c1c89124cf217109eeedbfcd3aae3b917be50c9dfb6bbb4ce26bdfd2e7.json +1 -0
  270. xinference/web/ui/node_modules/.cache/babel-loader/94d8b7aeb0076f2ce07db598cea0e87b13bc8d5614eb530b8d6e696c2daf6f88.json +1 -0
  271. xinference/web/ui/node_modules/.cache/babel-loader/9e917fe7022d01b2ccbe5cc0ce73d70bb72bee584ff293bad71bdff6695dee28.json +1 -0
  272. xinference/web/ui/node_modules/.cache/babel-loader/9f28fdb8399f1d0474f0aca86f1658dc94f5bf0c90f6146352de150692de8862.json +1 -0
  273. xinference/web/ui/node_modules/.cache/babel-loader/a0dfafa06b2bb7cba8cad41c482503f61944f759f4318139362602ef5cc47ccb.json +1 -0
  274. xinference/web/ui/node_modules/.cache/babel-loader/a3ff866acddf34917a7ee399e0e571a4dfd8ba66d5057db885f243e16a6eb17d.json +1 -0
  275. xinference/web/ui/node_modules/.cache/babel-loader/afb8084f539534cd594755ea2205ecd5bd1f62dddcfdf75a2eace59a28131278.json +1 -0
  276. xinference/web/ui/node_modules/.cache/babel-loader/b57b1438b77294c1f3f6cfce12ac487d8106c6f016975ba0aec94d98997e2e1e.json +1 -0
  277. xinference/web/ui/node_modules/.cache/babel-loader/b9917b0bf8e4d55ccbac1c334aa04d6ff3c5b6ed9e5d38b9ea2c687fa7d3f5a9.json +1 -0
  278. xinference/web/ui/node_modules/.cache/babel-loader/bbcc94b0149963d1d6f267ee1f4f03d3925b758392ce2f516c3fe8af0e0169fc.json +1 -0
  279. xinference/web/ui/node_modules/.cache/babel-loader/bdee44abeadc4abc17d41c52eb49c6e19a4b1a267b6e16876ce91bdeeebfc52d.json +1 -0
  280. xinference/web/ui/node_modules/.cache/babel-loader/beb112b70f4a56db95920a9e20efb6c97c37b68450716730217a9ee1a9ae92be.json +1 -0
  281. xinference/web/ui/node_modules/.cache/babel-loader/c88db97be0cdf440193b3995996e83510a04cb00048135485fc0e26d197e80b5.json +1 -0
  282. xinference/web/ui/node_modules/.cache/babel-loader/d49e5314d34310a62d01a03067ce1bec5da00abce84c5196aa9c6842fa79a430.json +1 -0
  283. xinference/web/ui/node_modules/.cache/babel-loader/d7664d18c4ddbad9c3a6a31b91f7c00fb0dde804608674a9860ee50f33e54708.json +1 -0
  284. xinference/web/ui/node_modules/.cache/babel-loader/d9072c318b819b7c90a0f7e9cc0b6413b4dbeb8e9859898e53d75ea882fcde99.json +1 -0
  285. xinference/web/ui/node_modules/.cache/babel-loader/db16a983bc08a05f0439cc61ca0840e49e1d8400eef678909f16c032a418a3d6.json +1 -0
  286. xinference/web/ui/node_modules/.cache/babel-loader/dc249829767b8abcbc3677e0b07b6d3ecbfdfe6d08cfe23a665eb33373a9aa9d.json +1 -0
  287. xinference/web/ui/node_modules/.cache/babel-loader/e242c583c2dbc2784f0fcf513523975f7d5df447e106c1c17e49e8578a6fc3ed.json +1 -0
  288. xinference/web/ui/node_modules/.cache/babel-loader/eac5f1296513e69e4b96f750ddccd4d0264e2bae4e4c449144e83274a48698d9.json +1 -0
  289. xinference/web/ui/node_modules/.cache/babel-loader/ed57202cb79649bb716400436590245547df241988fc7c8e1d85d132299542d2.json +1 -0
  290. xinference/web/ui/node_modules/.cache/babel-loader/f125bf72e773a14cdaebd0c343e80adb909d12e317ee5c00cd4a57442fbe2c62.json +1 -0
  291. xinference/web/ui/node_modules/.cache/babel-loader/f91af913d7f91c410719ab13136aaed3aaf0f8dda06652f25c42cb5231587398.json +1 -0
  292. xinference/web/ui/node_modules/.package-lock.json +67 -3
  293. xinference/web/ui/node_modules/@babel/runtime/package.json +592 -538
  294. xinference/web/ui/node_modules/html-parse-stringify/package.json +50 -0
  295. xinference/web/ui/node_modules/i18next/dist/esm/package.json +1 -0
  296. xinference/web/ui/node_modules/i18next/package.json +129 -0
  297. xinference/web/ui/node_modules/react-i18next/.eslintrc.json +74 -0
  298. xinference/web/ui/node_modules/react-i18next/dist/es/package.json +1 -0
  299. xinference/web/ui/node_modules/react-i18next/package.json +162 -0
  300. xinference/web/ui/node_modules/void-elements/package.json +34 -0
  301. xinference/web/ui/package-lock.json +69 -3
  302. xinference/web/ui/package.json +2 -0
  303. xinference/web/ui/src/locales/en.json +186 -0
  304. xinference/web/ui/src/locales/zh.json +186 -0
  305. {xinference-1.0.1.dist-info → xinference-1.2.1.dist-info}/METADATA +68 -32
  306. {xinference-1.0.1.dist-info → xinference-1.2.1.dist-info}/RECORD +316 -122
  307. xinference/thirdparty/cosyvoice/bin/export_trt.py +0 -8
  308. xinference/thirdparty/fish_speech/tools/api.py +0 -943
  309. xinference/thirdparty/fish_speech/tools/msgpack_api.py +0 -95
  310. xinference/thirdparty/fish_speech/tools/webui.py +0 -548
  311. xinference/web/ui/build/static/css/main.5061c4c3.css +0 -2
  312. xinference/web/ui/build/static/css/main.5061c4c3.css.map +0 -1
  313. xinference/web/ui/build/static/js/main.2f269bb3.js +0 -3
  314. xinference/web/ui/build/static/js/main.2f269bb3.js.map +0 -1
  315. xinference/web/ui/node_modules/.cache/babel-loader/07ce9e632e6aff24d7aa3ad8e48224433bbfeb0d633fca723453f1fcae0c9f1c.json +0 -1
  316. xinference/web/ui/node_modules/.cache/babel-loader/1130403f9e46f5738a23b45ac59b57de8f360c908c713e2c0670c2cce9bd367a.json +0 -1
  317. xinference/web/ui/node_modules/.cache/babel-loader/131091b25d26b17cdca187d7542a21475c211138d900cf667682260e76ef9463.json +0 -1
  318. xinference/web/ui/node_modules/.cache/babel-loader/1f269fb2a368363c1cb2237825f1dba093b6bdd8c44cc05954fd19ec2c1fff03.json +0 -1
  319. xinference/web/ui/node_modules/.cache/babel-loader/331312668fa8bd3d7401818f4a25fa98135d7f61371cd6bfff78b18cf4fbdd92.json +0 -1
  320. xinference/web/ui/node_modules/.cache/babel-loader/40f17338fc75ae095de7d2b4d8eae0d5ca0193a7e2bcece4ee745b22a7a2f4b7.json +0 -1
  321. xinference/web/ui/node_modules/.cache/babel-loader/4de9a6942c5f1749d6cbfdd54279699975f16016b182848bc253886f52ec2ec3.json +0 -1
  322. xinference/web/ui/node_modules/.cache/babel-loader/822586ed1077201b64b954f12f25e3f9b45678c1acbabe53d8af3ca82ca71f33.json +0 -1
  323. xinference/web/ui/node_modules/.cache/babel-loader/8d33354bd2100c8602afc3341f131a88cc36aaeecd5a4b365ed038514708e350.json +0 -1
  324. xinference/web/ui/node_modules/.cache/babel-loader/9375a35b05d56989b2755bf72161fa707c92f28569d33765a75f91a568fda6e9.json +0 -1
  325. xinference/web/ui/node_modules/.cache/babel-loader/a158a9ffa0c9b169aee53dd4a0c44501a596755b4e4f6ede7746d65a72e2a71f.json +0 -1
  326. xinference/web/ui/node_modules/.cache/babel-loader/bd6ad8159341315a1764c397621a560809f7eb7219ab5174c801fca7e969d943.json +0 -1
  327. xinference/web/ui/node_modules/.cache/babel-loader/c7bf40bab396765f67d0fed627ed3665890608b2d0edaa3e8cb7cfc96310db45.json +0 -1
  328. xinference/web/ui/node_modules/.cache/babel-loader/d6c643278a0b28320e6f33a60f5fb64c053997cbdc39a60e53ccc574688ade9e.json +0 -1
  329. xinference/web/ui/node_modules/.cache/babel-loader/e42b72d4cc1ea412ebecbb8d040dc6c6bfee462c33903c2f1f3facb602ad742e.json +0 -1
  330. xinference/web/ui/node_modules/.cache/babel-loader/e64b7e8cedcf43d4c95deba60ec1341855c887705805bb62431693118b870c69.json +0 -1
  331. xinference/web/ui/node_modules/.cache/babel-loader/f5039ddbeb815c51491a1989532006b96fc3ae49c6c60e3c097f875b4ae915ae.json +0 -1
  332. xinference/web/ui/node_modules/.cache/babel-loader/f72f011744c4649fabddca6f7a9327861ac0a315a89b1a2e62a39774e7863845.json +0 -1
  333. xinference/web/ui/node_modules/.cache/babel-loader/feabb04b4aa507102da0a64398a40818e878fd1df9b75dda8461b3e1e7ff3f11.json +0 -1
  334. /xinference/thirdparty/{cosyvoice/bin → f5_tts}/__init__.py +0 -0
  335. /xinference/thirdparty/{cosyvoice/flow → melo}/__init__.py +0 -0
  336. /xinference/thirdparty/{cosyvoice/hifigan → melo/text/english_utils}/__init__.py +0 -0
  337. /xinference/thirdparty/{cosyvoice/llm → melo/text/es_phonemizer}/__init__.py +0 -0
  338. /xinference/thirdparty/{fish_speech/tools → melo/text/fr_phonemizer}/__init__.py +0 -0
  339. /xinference/web/ui/build/static/js/{main.2f269bb3.js.LICENSE.txt → main.b0936c54.js.LICENSE.txt} +0 -0
  340. {xinference-1.0.1.dist-info → xinference-1.2.1.dist-info}/LICENSE +0 -0
  341. {xinference-1.0.1.dist-info → xinference-1.2.1.dist-info}/WHEEL +0 -0
  342. {xinference-1.0.1.dist-info → xinference-1.2.1.dist-info}/entry_points.txt +0 -0
  343. {xinference-1.0.1.dist-info → xinference-1.2.1.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _defineProperty from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";import _toConsumableArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/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{Alert,Box,Button,FormControlLabel,Radio,RadioGroup,TextField,Tooltip}from'@mui/material';import React,{useEffect,useState}from'react';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";import{Fragment as _Fragment}from\"react/jsx-runtime\";var modelFormatArr=[{value:'pytorch',label:'PyTorch'},{value:'ggufv2',label:'GGUF'},{value:'gptq',label:'GPTQ'},{value:'awq',label:'AWQ'},{value:'fp8',label:'FP8'},{value:'mlx',label:'MLX'}];var AddModelSpecs=function AddModelSpecs(_ref){var isJump=_ref.isJump,formData=_ref.formData,specsDataArr=_ref.specsDataArr,onGetArr=_ref.onGetArr,scrollRef=_ref.scrollRef;var _useState=useState(0),_useState2=_slicedToArray(_useState,2),count=_useState2[0],setCount=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),specsArr=_useState4[0],setSpecsArr=_useState4[1];var _useState5=useState([]),_useState6=_slicedToArray(_useState5,2),pathArr=_useState6[0],setPathArr=_useState6[1];var _useState7=useState([]),_useState8=_slicedToArray(_useState7,2),modelSizeAlertId=_useState8[0],setModelSizeAlertId=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),quantizationAlertId=_useState10[0],setQuantizationAlertId=_useState10[1];var _useState11=useState(false),_useState12=_slicedToArray(_useState11,2),isError=_useState12[0],setIsError=_useState12[1];var _useState13=useState(false),_useState14=_slicedToArray(_useState13,2),isAdd=_useState14[0],setIsAdd=_useState14[1];useEffect(function(){if(isJump){var dataArr=specsDataArr.map(function(item,index){var model_uri=item.model_uri,model_size_in_billions=item.model_size_in_billions,model_format=item.model_format,quantizations=item.quantizations,model_file_name_template=item.model_file_name_template;var size=model_size_in_billions;if(typeof size!=='number')size=size.split('_').join('.');return{id:index,model_uri:model_uri,model_size_in_billions:size,model_format:model_format,quantizations:quantizations,model_file_name_template:model_file_name_template};});setCount(dataArr.length);setSpecsArr(dataArr);var subPathArr=[];specsDataArr.forEach(function(item){if(item.model_format!=='ggufv2'){subPathArr.push(item.model_uri);}else{subPathArr.push(item.model_uri+'/'+item.model_file_name_template);}});setPathArr(subPathArr);}else{setSpecsArr([_objectSpread({id:count},formData)]);setCount(count+1);setPathArr([formData.model_uri]);}},[]);useEffect(function(){var arr=specsArr.map(function(item){var uri=item.model_uri,size=item.model_size_in_billions,modelFormat=item.model_format,quantizations=item.quantizations,model_file_name_template=item.model_file_name_template;var handleSize=parseInt(size)===parseFloat(size)?Number(size):size.split('.').join('_');var handleQuantization=quantizations;if(modelFormat==='pytorch'){handleQuantization=['none'];}else if(handleQuantization[0]===''&&modelFormat==='ggufv2'){handleQuantization=['default'];}return{model_uri:uri,model_size_in_billions:handleSize,model_format:modelFormat,quantizations:handleQuantization,model_file_name_template:model_file_name_template};});setIsError(true);if(modelSizeAlertId.length===0&&quantizationAlertId.length===0){setIsError(false);}onGetArr(arr,isError);isAdd&&handleScrollBottom();setIsAdd(false);},[specsArr,isError]);var handleAddSpecs=function handleAddSpecs(){setCount(count+1);var item={id:count,model_uri:'/path/to/llama-1',model_size_in_billions:7,model_format:'pytorch',quantizations:[]};setSpecsArr([].concat(_toConsumableArray(specsArr),[item]));setIsAdd(true);setPathArr([].concat(_toConsumableArray(pathArr),['/path/to/llama-1']));};var handleUpdateSpecsArr=function handleUpdateSpecsArr(index,type,newValue){if(type==='model_format'){var subPathArr=_toConsumableArray(pathArr);if(specsArr[index].model_format!=='ggufv2'){pathArr[index]=specsArr[index].model_uri;}else{pathArr[index]=specsArr[index].model_uri+'/'+specsArr[index].model_file_name_template;}setPathArr(subPathArr);}setSpecsArr(specsArr.map(function(item,subIndex){if(subIndex===index){if(type==='quantizations'){return _objectSpread(_objectSpread({},item),{},_defineProperty({},type,[newValue]));}else if(type==='model_format'){if(newValue==='ggufv2'){var _getPathComponents=getPathComponents(pathArr[index]),baseDir=_getPathComponents.baseDir,filename=_getPathComponents.filename;var obj=_objectSpread(_objectSpread({},item),{},{model_format:newValue,quantizations:[''],model_uri:baseDir,model_file_name_template:filename});return obj;}else{var _ref2;var id=item.id,model_size_in_billions=item.model_size_in_billions,model_format=item.model_format;return _ref2={id:id,model_uri:pathArr[index],model_size_in_billions:model_size_in_billions,model_format:model_format},_defineProperty(_ref2,type,newValue),_defineProperty(_ref2,\"quantizations\",['']),_ref2;}}else if(type==='model_uri'){var _subPathArr=_toConsumableArray(pathArr);_subPathArr[index]=newValue;setPathArr(_subPathArr);if(item.model_format==='ggufv2'){var _getPathComponents2=getPathComponents(newValue),_baseDir=_getPathComponents2.baseDir,_filename=_getPathComponents2.filename;var _obj=_objectSpread(_objectSpread({},item),{},{model_uri:_baseDir,model_file_name_template:_filename});return _obj;}else{return _objectSpread(_objectSpread({},item),{},_defineProperty({},type,newValue));}}else{return _objectSpread(_objectSpread({},item),{},_defineProperty({},type,newValue));}}return item;}));};var handleDeleteSpecs=function handleDeleteSpecs(index){setSpecsArr(specsArr.filter(function(_,subIndex){return index!==subIndex;}));};var getPathComponents=function getPathComponents(path){var normalizedPath=path.replace(/\\\\/g,'/');var baseDir=normalizedPath.substring(0,normalizedPath.lastIndexOf('/'));var filename=normalizedPath.substring(normalizedPath.lastIndexOf('/')+1);return{baseDir:baseDir,filename:filename};};var handleModelSize=function handleModelSize(index,value,id){setModelSizeAlertId(modelSizeAlertId.filter(function(item){return item!==id;}));handleUpdateSpecsArr(index,'model_size_in_billions',value);if(value!==''&&(!Number(value)||Number(value)<=0)){var modelSizeAlertIdArr=Array.from(new Set([].concat(_toConsumableArray(modelSizeAlertId),[id])));setModelSizeAlertId(modelSizeAlertIdArr);}};var handleQuantization=function handleQuantization(model_format,index,value,id){setQuantizationAlertId(quantizationAlertId.filter(function(item){return item!==id;}));handleUpdateSpecsArr(index,'quantizations',value);if((model_format==='gptq'||model_format==='awq'||model_format==='fp8'||model_format==='mlx')&&value===''){var quantizationAlertIdArr=Array.from(new Set([].concat(_toConsumableArray(quantizationAlertId),[id])));setQuantizationAlertId(quantizationAlertIdArr);}};var handleScrollBottom=function handleScrollBottom(){scrollRef.current.scrollTo({top:scrollRef.current.scrollHeight,behavior:'smooth'});};return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'flex',alignItems:'center',marginBottom:10},children:[/*#__PURE__*/_jsx(\"label\",{style:{width:'100px'},children:\"Model Specs\"}),/*#__PURE__*/_jsx(Button,{variant:\"contained\",size:\"small\",endIcon:/*#__PURE__*/_jsx(AddIcon,{}),className:\"addBtn\",onClick:handleAddSpecs,children:\"more\"})]}),/*#__PURE__*/_jsx(\"div\",{className:\"specs_container\",children:specsArr.map(function(item,index){return/*#__PURE__*/_jsxs(\"div\",{className:\"item\",children:[/*#__PURE__*/_jsx(\"label\",{style:{paddingLeft:5},children:\"Model Format\"}),/*#__PURE__*/_jsx(RadioGroup,{value:item.model_format,onChange:function onChange(e){handleUpdateSpecsArr(index,'model_format',e.target.value);if(e.target.value==='gptq'||e.target.value==='awq'||e.target.value==='fp8'||e.target.value==='mlx'){var quantizationAlertIdArr=Array.from(new Set([].concat(_toConsumableArray(quantizationAlertId),[item.id])));setQuantizationAlertId(quantizationAlertIdArr);}else{setQuantizationAlertId([]);}},children:/*#__PURE__*/_jsx(Box,{sx:styles.checkboxWrapper,children:modelFormatArr.map(function(item){return/*#__PURE__*/_jsx(Box,{sx:{marginLeft:'10px'},children:/*#__PURE__*/_jsx(FormControlLabel,{value:item.value,control:/*#__PURE__*/_jsx(Radio,{}),label:item.label})},item.value);})})}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"}),/*#__PURE__*/_jsx(TextField,{error:item.model_uri!==''?false:true,style:{minWidth:'60%'},label:\"Model Path\",size:\"small\",value:item.model_format!=='ggufv2'?item.model_uri:item.model_uri+'/'+item.model_file_name_template,onChange:function onChange(e){handleUpdateSpecsArr(index,'model_uri',e.target.value);},helperText:\"For PyTorch, provide the model directory. For GGUF, provide the model file path.\"}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"}),/*#__PURE__*/_jsx(TextField,{error:Number(item.model_size_in_billions)>0?false:true,label:\"Model Size in Billions\",size:\"small\",value:item.model_size_in_billions,onChange:function onChange(e){handleModelSize(index,e.target.value,item.id);}}),modelSizeAlertId.includes(item.id)&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Please enter a number greater than 0.\"}),/*#__PURE__*/_jsx(Box,{padding:\"15px\"}),item.model_format!=='pytorch'&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(TextField,{style:{minWidth:'60%'},label:item.model_format==='gptq'||item.model_format==='awq'||item.model_format==='fp8'||item.model_format==='mlx'?'Quantization':'Quantization (Optional)',size:\"small\",value:item.quantizations[0],onChange:function onChange(e){handleQuantization(item.model_format,index,e.target.value,item.id);},helperText:item.model_format==='gptq'||item.model_format==='awq'||item.model_format==='fp8'||item.model_format==='mlx'?'For GPTQ/AWQ/FP8/MLX models, please be careful to fill in the quantization corresponding to the model you want to register.':''}),item.model_format!=='ggufv2'&&quantizationAlertId.includes(item.id)&&item.quantizations[0]==''&&/*#__PURE__*/_jsx(Alert,{severity:\"error\",children:\"Quantization cannot be left empty.\"})]}),specsArr.length>1&&/*#__PURE__*/_jsx(Tooltip,{title:\"Delete specs\",placement:\"top\",children:/*#__PURE__*/_jsx(\"div\",{className:\"deleteBtn\",onClick:function onClick(){return handleDeleteSpecs(index);},children:/*#__PURE__*/_jsx(DeleteIcon,{className:\"deleteIcon\"})})})]},item.id);})})]});};export default AddModelSpecs;var styles={baseFormControl:{width:'100%',margin:'normal',size:'small'},checkboxWrapper:{display:'flex',flexWrap:'wrap',alignItems:'center',width:'100%'}};","map":{"version":3,"names":["AddIcon","DeleteIcon","Alert","Box","Button","FormControlLabel","Radio","RadioGroup","TextField","Tooltip","React","useEffect","useState","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","modelFormatArr","value","label","AddModelSpecs","_ref","isJump","formData","specsDataArr","onGetArr","scrollRef","_useState","_useState2","_slicedToArray","count","setCount","_useState3","_useState4","specsArr","setSpecsArr","_useState5","_useState6","pathArr","setPathArr","_useState7","_useState8","modelSizeAlertId","setModelSizeAlertId","_useState9","_useState10","quantizationAlertId","setQuantizationAlertId","_useState11","_useState12","isError","setIsError","_useState13","_useState14","isAdd","setIsAdd","dataArr","map","item","index","model_uri","model_size_in_billions","model_format","quantizations","model_file_name_template","size","split","join","id","length","subPathArr","forEach","push","_objectSpread","arr","uri","modelFormat","handleSize","parseInt","parseFloat","Number","handleQuantization","handleScrollBottom","handleAddSpecs","concat","_toConsumableArray","handleUpdateSpecsArr","type","newValue","subIndex","_defineProperty","_getPathComponents","getPathComponents","baseDir","filename","obj","_ref2","_getPathComponents2","handleDeleteSpecs","filter","_","path","normalizedPath","replace","substring","lastIndexOf","handleModelSize","modelSizeAlertIdArr","Array","from","Set","quantizationAlertIdArr","current","scrollTo","top","scrollHeight","behavior","children","style","display","alignItems","marginBottom","width","variant","endIcon","className","onClick","paddingLeft","onChange","e","target","sx","styles","checkboxWrapper","marginLeft","control","padding","error","minWidth","helperText","includes","severity","title","placement","baseFormControl","margin","flexWrap"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/register_model/components/addModelSpecs.js"],"sourcesContent":["import AddIcon from '@mui/icons-material/Add'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport {\n Alert,\n Box,\n Button,\n FormControlLabel,\n Radio,\n RadioGroup,\n TextField,\n Tooltip,\n} from '@mui/material'\nimport React, { useEffect, useState } from 'react'\n\nconst modelFormatArr = [\n { value: 'pytorch', label: 'PyTorch' },\n { value: 'ggufv2', label: 'GGUF' },\n { value: 'gptq', label: 'GPTQ' },\n { value: 'awq', label: 'AWQ' },\n { value: 'fp8', label: 'FP8' },\n { value: 'mlx', label: 'MLX' },\n]\n\nconst AddModelSpecs = ({\n isJump,\n formData,\n specsDataArr,\n onGetArr,\n scrollRef,\n}) => {\n const [count, setCount] = useState(0)\n const [specsArr, setSpecsArr] = useState([])\n const [pathArr, setPathArr] = useState([])\n const [modelSizeAlertId, setModelSizeAlertId] = useState([])\n const [quantizationAlertId, setQuantizationAlertId] = useState([])\n const [isError, setIsError] = useState(false)\n const [isAdd, setIsAdd] = useState(false)\n\n useEffect(() => {\n if (isJump) {\n const dataArr = specsDataArr.map((item, index) => {\n const {\n model_uri,\n model_size_in_billions,\n model_format,\n quantizations,\n model_file_name_template,\n } = item\n let size = model_size_in_billions\n if (typeof size !== 'number') size = size.split('_').join('.')\n\n return {\n id: index,\n model_uri,\n model_size_in_billions: size,\n model_format,\n quantizations,\n model_file_name_template,\n }\n })\n setCount(dataArr.length)\n setSpecsArr(dataArr)\n\n const subPathArr = []\n specsDataArr.forEach((item) => {\n if (item.model_format !== 'ggufv2') {\n subPathArr.push(item.model_uri)\n } else {\n subPathArr.push(item.model_uri + '/' + item.model_file_name_template)\n }\n })\n setPathArr(subPathArr)\n } else {\n setSpecsArr([\n {\n id: count,\n ...formData,\n },\n ])\n setCount(count + 1)\n setPathArr([formData.model_uri])\n }\n }, [])\n\n useEffect(() => {\n const arr = specsArr.map((item) => {\n const {\n model_uri: uri,\n model_size_in_billions: size,\n model_format: modelFormat,\n quantizations,\n model_file_name_template,\n } = item\n const handleSize =\n parseInt(size) === parseFloat(size)\n ? Number(size)\n : size.split('.').join('_')\n\n let handleQuantization = quantizations\n if (modelFormat === 'pytorch') {\n handleQuantization = ['none']\n } else if (handleQuantization[0] === '' && modelFormat === 'ggufv2') {\n handleQuantization = ['default']\n }\n\n return {\n model_uri: uri,\n model_size_in_billions: handleSize,\n model_format: modelFormat,\n quantizations: handleQuantization,\n model_file_name_template,\n }\n })\n setIsError(true)\n if (modelSizeAlertId.length === 0 && quantizationAlertId.length === 0) {\n setIsError(false)\n }\n onGetArr(arr, isError)\n isAdd && handleScrollBottom()\n setIsAdd(false)\n }, [specsArr, isError])\n\n const handleAddSpecs = () => {\n setCount(count + 1)\n const item = {\n id: count,\n model_uri: '/path/to/llama-1',\n model_size_in_billions: 7,\n model_format: 'pytorch',\n quantizations: [],\n }\n setSpecsArr([...specsArr, item])\n setIsAdd(true)\n setPathArr([...pathArr, '/path/to/llama-1'])\n }\n\n const handleUpdateSpecsArr = (index, type, newValue) => {\n if (type === 'model_format') {\n const subPathArr = [...pathArr]\n if (specsArr[index].model_format !== 'ggufv2') {\n pathArr[index] = specsArr[index].model_uri\n } else {\n pathArr[index] =\n specsArr[index].model_uri +\n '/' +\n specsArr[index].model_file_name_template\n }\n setPathArr(subPathArr)\n }\n\n setSpecsArr(\n specsArr.map((item, subIndex) => {\n if (subIndex === index) {\n if (type === 'quantizations') {\n return { ...item, [type]: [newValue] }\n } else if (type === 'model_format') {\n if (newValue === 'ggufv2') {\n const { baseDir, filename } = getPathComponents(pathArr[index])\n const obj = {\n ...item,\n model_format: newValue,\n quantizations: [''],\n model_uri: baseDir,\n model_file_name_template: filename,\n }\n return obj\n } else {\n const { id, model_size_in_billions, model_format } = item\n return {\n id,\n model_uri: pathArr[index],\n model_size_in_billions,\n model_format,\n [type]: newValue,\n quantizations: [''],\n }\n }\n } else if (type === 'model_uri') {\n const subPathArr = [...pathArr]\n subPathArr[index] = newValue\n setPathArr(subPathArr)\n if (item.model_format === 'ggufv2') {\n const { baseDir, filename } = getPathComponents(newValue)\n const obj = {\n ...item,\n model_uri: baseDir,\n model_file_name_template: filename,\n }\n return obj\n } else {\n return { ...item, [type]: newValue }\n }\n } else {\n return { ...item, [type]: newValue }\n }\n }\n return item\n })\n )\n }\n\n const handleDeleteSpecs = (index) => {\n setSpecsArr(specsArr.filter((_, subIndex) => index !== subIndex))\n }\n\n const getPathComponents = (path) => {\n const normalizedPath = path.replace(/\\\\/g, '/')\n const baseDir = normalizedPath.substring(0, normalizedPath.lastIndexOf('/'))\n const filename = normalizedPath.substring(\n normalizedPath.lastIndexOf('/') + 1\n )\n return { baseDir, filename }\n }\n\n const handleModelSize = (index, value, id) => {\n setModelSizeAlertId(modelSizeAlertId.filter((item) => item !== id))\n handleUpdateSpecsArr(index, 'model_size_in_billions', value)\n if (value !== '' && (!Number(value) || Number(value) <= 0)) {\n const modelSizeAlertIdArr = Array.from(new Set([...modelSizeAlertId, id]))\n setModelSizeAlertId(modelSizeAlertIdArr)\n }\n }\n\n const handleQuantization = (model_format, index, value, id) => {\n setQuantizationAlertId(quantizationAlertId.filter((item) => item !== id))\n handleUpdateSpecsArr(index, 'quantizations', value)\n if (\n (model_format === 'gptq' ||\n model_format === 'awq' ||\n model_format === 'fp8' ||\n model_format === 'mlx') &&\n value === ''\n ) {\n const quantizationAlertIdArr = Array.from(\n new Set([...quantizationAlertId, id])\n )\n setQuantizationAlertId(quantizationAlertIdArr)\n }\n }\n\n const handleScrollBottom = () => {\n scrollRef.current.scrollTo({\n top: scrollRef.current.scrollHeight,\n behavior: 'smooth',\n })\n }\n\n return (\n <>\n <div style={{ display: 'flex', alignItems: 'center', marginBottom: 10 }}>\n <label style={{ width: '100px' }}>Model Specs</label>\n <Button\n variant=\"contained\"\n size=\"small\"\n endIcon={<AddIcon />}\n className=\"addBtn\"\n onClick={handleAddSpecs}\n >\n more\n </Button>\n </div>\n <div className=\"specs_container\">\n {specsArr.map((item, index) => (\n <div className=\"item\" key={item.id}>\n <label\n style={{\n paddingLeft: 5,\n }}\n >\n Model Format\n </label>\n <RadioGroup\n value={item.model_format}\n onChange={(e) => {\n handleUpdateSpecsArr(index, 'model_format', e.target.value)\n if (\n e.target.value === 'gptq' ||\n e.target.value === 'awq' ||\n e.target.value === 'fp8' ||\n e.target.value === 'mlx'\n ) {\n const quantizationAlertIdArr = Array.from(\n new Set([...quantizationAlertId, item.id])\n )\n setQuantizationAlertId(quantizationAlertIdArr)\n } else {\n setQuantizationAlertId([])\n }\n }}\n >\n <Box sx={styles.checkboxWrapper}>\n {modelFormatArr.map((item) => (\n <Box key={item.value} sx={{ marginLeft: '10px' }}>\n <FormControlLabel\n value={item.value}\n control={<Radio />}\n label={item.label}\n />\n </Box>\n ))}\n </Box>\n </RadioGroup>\n <Box padding=\"15px\"></Box>\n\n <TextField\n error={item.model_uri !== '' ? false : true}\n style={{ minWidth: '60%' }}\n label=\"Model Path\"\n size=\"small\"\n value={\n item.model_format !== 'ggufv2'\n ? item.model_uri\n : item.model_uri + '/' + item.model_file_name_template\n }\n onChange={(e) => {\n handleUpdateSpecsArr(index, 'model_uri', e.target.value)\n }}\n helperText=\"For PyTorch, provide the model directory. For GGUF, provide the model file path.\"\n />\n <Box padding=\"15px\"></Box>\n\n <TextField\n error={Number(item.model_size_in_billions) > 0 ? false : true}\n label=\"Model Size in Billions\"\n size=\"small\"\n value={item.model_size_in_billions}\n onChange={(e) => {\n handleModelSize(index, e.target.value, item.id)\n }}\n />\n {modelSizeAlertId.includes(item.id) && (\n <Alert severity=\"error\">\n Please enter a number greater than 0.\n </Alert>\n )}\n <Box padding=\"15px\"></Box>\n\n {item.model_format !== 'pytorch' && (\n <>\n <TextField\n style={{ minWidth: '60%' }}\n label={\n item.model_format === 'gptq' ||\n item.model_format === 'awq' ||\n item.model_format === 'fp8' ||\n item.model_format === 'mlx'\n ? 'Quantization'\n : 'Quantization (Optional)'\n }\n size=\"small\"\n value={item.quantizations[0]}\n onChange={(e) => {\n handleQuantization(\n item.model_format,\n index,\n e.target.value,\n item.id\n )\n }}\n helperText={\n item.model_format === 'gptq' ||\n item.model_format === 'awq' ||\n item.model_format === 'fp8' ||\n item.model_format === 'mlx'\n ? 'For GPTQ/AWQ/FP8/MLX models, please be careful to fill in the quantization corresponding to the model you want to register.'\n : ''\n }\n />\n {item.model_format !== 'ggufv2' &&\n quantizationAlertId.includes(item.id) &&\n item.quantizations[0] == '' && (\n <Alert severity=\"error\">\n Quantization cannot be left empty.\n </Alert>\n )}\n </>\n )}\n\n {specsArr.length > 1 && (\n <Tooltip title=\"Delete specs\" placement=\"top\">\n <div\n className=\"deleteBtn\"\n onClick={() => handleDeleteSpecs(index)}\n >\n <DeleteIcon className=\"deleteIcon\" />\n </div>\n </Tooltip>\n )}\n </div>\n ))}\n </div>\n </>\n )\n}\n\nexport default AddModelSpecs\n\nconst styles = {\n baseFormControl: {\n width: '100%',\n margin: 'normal',\n size: 'small',\n },\n checkboxWrapper: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n width: '100%',\n },\n}\n"],"mappings":"6jBAAA,MAAO,CAAAA,OAAO,KAAM,yBAAyB,CAC7C,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OACEC,KAAK,CACLC,GAAG,CACHC,MAAM,CACNC,gBAAgB,CAChBC,KAAK,CACLC,UAAU,CACVC,SAAS,CACTC,OAAO,KACF,eAAe,CACtB,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,gCAAAC,QAAA,IAAAC,SAAA,yBAElD,GAAM,CAAAC,cAAc,CAAG,CACrB,CAAEC,KAAK,CAAE,SAAS,CAAEC,KAAK,CAAE,SAAU,CAAC,CACtC,CAAED,KAAK,CAAE,QAAQ,CAAEC,KAAK,CAAE,MAAO,CAAC,CAClC,CAAED,KAAK,CAAE,MAAM,CAAEC,KAAK,CAAE,MAAO,CAAC,CAChC,CAAED,KAAK,CAAE,KAAK,CAAEC,KAAK,CAAE,KAAM,CAAC,CAC9B,CAAED,KAAK,CAAE,KAAK,CAAEC,KAAK,CAAE,KAAM,CAAC,CAC9B,CAAED,KAAK,CAAE,KAAK,CAAEC,KAAK,CAAE,KAAM,CAAC,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CAACZ,KAAK,EAAC6I,QAAQ,CAAC,OAAO,CAAAxB,QAAA,CAAC,oCAExB,CAAO,CACR,EACH,CACH,CAEAnF,QAAQ,CAACmC,MAAM,CAAG,CAAC,eAClBzD,IAAA,CAACL,OAAO,EAACuI,KAAK,CAAC,cAAc,CAACC,SAAS,CAAC,KAAK,CAAA1B,QAAA,cAC3CzG,IAAA,QACEiH,SAAS,CAAC,WAAW,CACrBC,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAA5B,iBAAiB,CAACvC,KAAK,CAAC,EAAC,CAAA0D,QAAA,cAExCzG,IAAA,CAACb,UAAU,EAAC8H,SAAS,CAAC,YAAY,CAAE,CAAC,CAClC,CAAC,CACC,CACV,GA5HwBnE,IAAI,CAACU,EA6H3B,CAAC,EACP,CAAC,CACC,CAAC,EACN,CAAC,CAEP,CAAC,CAED,cAAe,CAAAhD,aAAa,CAE5B,GAAM,CAAAgH,MAAM,CAAG,CACbY,eAAe,CAAE,CACftB,KAAK,CAAE,MAAM,CACbuB,MAAM,CAAE,QAAQ,CAChBhF,IAAI,CAAE,OACR,CAAC,CACDoE,eAAe,CAAE,CACfd,OAAO,CAAE,MAAM,CACf2B,QAAQ,CAAE,MAAM,CAChB1B,UAAU,CAAE,QAAQ,CACpBE,KAAK,CAAE,MACT,CACF,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _regeneratorRuntime from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _asyncToGenerator from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/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{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import fetchWrapper from'../../components/fetchWrapper';import HotkeyFocusTextField from'../../components/hotkeyFocusTextField';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 navigate=useNavigate();var handleTabChange=function handleTabChange(_,newValue){var type=newValue.split('/')[3]==='llm'?'LLM':newValue.split('/')[3];getData(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];getData(type==='llm'?'LLM':type);},[]);var getData=/*#__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 getData(_x){return _ref2.apply(this,arguments);};}();var handlecustomDelete=function handlecustomDelete(model_name){setRegistrationData(registrationData.filter(function(item){return item.model_name!==model_name;}));};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:\"Language Models\",value:\"/launch_model/custom/llm\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"/launch_model/custom/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank Models\",value:\"/launch_model/custom/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image Models\",value:\"/launch_model/custom/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio Models\",value:\"/launch_model/custom/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Flexible Models\",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:\"Search for custom model name\",value:searchTerm,onChange:handleSearchChange,size:\"small\",hotkey:\"/\"})})}),/*#__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,onHandlecustomDelete:handlecustomDelete},filteredRegistration.model_name);})})]},item);})]})});};export default LaunchCustom;","map":{"version":3,"names":["TabContext","TabList","TabPanel","Box","FormControl","Tab","React","useContext","useEffect","useState","useNavigate","ApiContext","fetchWrapper","HotkeyFocusTextField","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","navigate","handleTabChange","_","newValue","type","split","getData","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","handlecustomDelete","item","style","display","gridTemplateColumns","paddingLeft","paddingBottom","gridGap","m","children","sx","borderBottom","borderColor","onChange","label","padding","margin","variant","id","size","hotkey","filteredRegistration","url","modelData","is_custom","modelType","onHandlecustomDelete"],"sources":["/home/runner/work/inference/inference/xinference/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 { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport HotkeyFocusTextField from '../../components/hotkeyFocusTextField'\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\n const navigate = useNavigate()\n const handleTabChange = (_, newValue) => {\n const type =\n newValue.split('/')[3] === 'llm' ? 'LLM' : newValue.split('/')[3]\n getData(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 getData(type === 'llm' ? 'LLM' : type)\n }, [])\n\n const getData = 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 handlecustomDelete = (model_name) => {\n setRegistrationData(\n registrationData.filter((item) => {\n return item.model_name !== model_name\n })\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 label=\"Language Models\" value=\"/launch_model/custom/llm\" />\n <Tab\n label=\"Embedding Models\"\n value=\"/launch_model/custom/embedding\"\n />\n <Tab label=\"Rerank Models\" value=\"/launch_model/custom/rerank\" />\n <Tab label=\"Image Models\" value=\"/launch_model/custom/image\" />\n <Tab label=\"Audio Models\" value=\"/launch_model/custom/audio\" />\n <Tab\n label=\"Flexible Models\"\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=\"Search for custom model name\"\n value={searchTerm}\n onChange={handleSearchChange}\n size=\"small\"\n hotkey=\"/\"\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 onHandlecustomDelete={handlecustomDelete}\n />\n ))}\n </div>\n </TabPanel>\n ))}\n </TabContext>\n </Box>\n )\n}\n\nexport default LaunchCustom\n"],"mappings":"mkBAAA,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,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,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,CAAGhB,UAAU,CAACI,UAAU,CAAC,CAACY,QAAQ,CAC9C,IAAAC,SAAA,CAAgDf,QAAQ,CAAC,EAAE,CAAC,CAAAgB,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAArDG,gBAAgB,CAAAF,UAAA,IAAEG,mBAAmB,CAAAH,UAAA,IAC5C,IAAAI,WAAA,CAA0C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AC,CAED,cAAe,CAAA9E,YAAY","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{CssBaseline,ThemeProvider}from'@mui/material';import Snackbar from'@mui/material/Snackbar';import React,{useEffect,useState}from'react';import{useCookies}from'react-cookie';import{HashRouter}from'react-router-dom';import{Alert}from'./components/alertComponent';import{ApiContextProvider}from'./components/apiContext';import AuthAlertDialog from'./components/authAlertDialog';import{getEndpoint}from'./components/utils';import WraperRoutes from'./router/index';import{useMode}from'./theme';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";function App(){var _useMode=useMode(),_useMode2=_slicedToArray(_useMode,1),theme=_useMode2[0];var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,3),cookie=_useCookies2[0],setCookie=_useCookies2[1],removeCookie=_useCookies2[2];var _useState=useState(''),_useState2=_slicedToArray(_useState,2),msg=_useState2[0],setMsg=_useState2[1];var endPoint=getEndpoint();useEffect(function(){// token possible value: no_auth / need_auth / <real bearer token>\nfetch(endPoint+'/v1/cluster/auth',{method:'GET',headers:{'Content-Type':'application/json'}}).then(function(res){if(!res.ok){res.json().then(function(errorData){setMsg(\"Server error: \".concat(res.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{res.json().then(function(data){if(!data.auth){setCookie('token','no_auth',{path:'/'});sessionStorage.setItem('token','no_auth');}else if(data.auth&&sessionStorage.getItem('token')==='no_auth'){removeCookie('token',{path:'/'});sessionStorage.removeItem('token');}sessionStorage.setItem('auth',String(data.auth));// sessionStorage only can set string value\n});}});},[cookie]);var handleClose=function handleClose(event,reason){if(reason==='clickaway'){return;}setMsg('');};return/*#__PURE__*/_jsxs(\"div\",{className:\"app\",children:[/*#__PURE__*/_jsx(Snackbar,{open:msg!=='',autoHideDuration:10000,anchorOrigin:{vertical:'top',horizontal:'center'},onClose:handleClose,children:/*#__PURE__*/_jsx(Alert,{severity:\"error\",onClose:handleClose,sx:{width:'100%'},children:msg})}),/*#__PURE__*/_jsx(HashRouter,{children:/*#__PURE__*/_jsx(ThemeProvider,{theme:theme,children:/*#__PURE__*/_jsxs(ApiContextProvider,{children:[/*#__PURE__*/_jsx(CssBaseline,{}),/*#__PURE__*/_jsx(AuthAlertDialog,{}),/*#__PURE__*/_jsx(WraperRoutes,{})]})})})]});}export default App;","map":{"version":3,"names":["CssBaseline","ThemeProvider","Snackbar","React","useEffect","useState","useCookies","HashRouter","Alert","ApiContextProvider","AuthAlertDialog","getEndpoint","WraperRoutes","useMode","jsx","_jsx","jsxs","_jsxs","App","_useMode","_useMode2","_slicedToArray","theme","_useCookies","_useCookies2","cookie","setCookie","removeCookie","_useState","_useState2","msg","setMsg","endPoint","fetch","method","headers","then","res","ok","json","errorData","concat","status","detail","data","auth","path","sessionStorage","setItem","getItem","removeItem","String","handleClose","event","reason","className","children","open","autoHideDuration","anchorOrigin","vertical","horizontal","onClose","severity","sx","width"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/App.js"],"sourcesContent":["import { CssBaseline, ThemeProvider } from '@mui/material'\nimport Snackbar from '@mui/material/Snackbar'\nimport React, { useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { HashRouter } from 'react-router-dom'\n\nimport { Alert } from './components/alertComponent'\nimport { ApiContextProvider } from './components/apiContext'\nimport AuthAlertDialog from './components/authAlertDialog'\nimport { getEndpoint } from './components/utils'\nimport WraperRoutes from './router/index'\nimport { useMode } from './theme'\n\nfunction App() {\n const [theme] = useMode()\n const [cookie, setCookie, removeCookie] = useCookies(['token'])\n const [msg, setMsg] = useState('')\n\n const endPoint = getEndpoint()\n\n useEffect(() => {\n // token possible value: no_auth / need_auth / <real bearer token>\n fetch(endPoint + '/v1/cluster/auth', {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n }).then((res) => {\n if (!res.ok) {\n res.json().then((errorData) => {\n setMsg(\n `Server error: ${res.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n res.json().then((data) => {\n if (!data.auth) {\n setCookie('token', 'no_auth', { path: '/' })\n sessionStorage.setItem('token', 'no_auth')\n } else if (\n data.auth &&\n sessionStorage.getItem('token') === 'no_auth'\n ) {\n removeCookie('token', { path: '/' })\n sessionStorage.removeItem('token')\n }\n sessionStorage.setItem('auth', String(data.auth)) // sessionStorage only can set string value\n })\n }\n })\n }, [cookie])\n\n const handleClose = (event, reason) => {\n if (reason === 'clickaway') {\n return\n }\n setMsg('')\n }\n\n return (\n <div className=\"app\">\n <Snackbar\n open={msg !== ''}\n autoHideDuration={10000}\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n onClose={handleClose}\n >\n <Alert severity=\"error\" onClose={handleClose} sx={{ width: '100%' }}>\n {msg}\n </Alert>\n </Snackbar>\n <HashRouter>\n <ThemeProvider theme={theme}>\n <ApiContextProvider>\n <CssBaseline />\n <AuthAlertDialog />\n <WraperRoutes />\n </ApiContextProvider>\n </ThemeProvider>\n </HashRouter>\n </div>\n )\n}\n\nexport default App\n"],"mappings":"6IAAA,OAASA,WAAW,CAAEC,aAAa,KAAQ,eAAe,CAC1D,MAAO,CAAAC,QAAQ,KAAM,wBAAwB,CAC7C,MAAO,CAAAC,KAAK,EAAIC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAClD,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,UAAU,KAAQ,kBAAkB,CAE7C,OAASC,KAAK,KAAQ,6BAA6B,CACnD,OAASC,kBAAkB,KAAQ,yBAAyB,CAC5D,MAAO,CAAAC,eAAe,KAAM,8BAA8B,CAC1D,OAASC,WAAW,KAAQ,oBAAoB,CAChD,MAAO,CAAAC,YAAY,KAAM,gBAAgB,CACzC,OAASC,OAAO,KAAQ,SAAS,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,K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AW,GAAE,CAAC,cACfe,IAAA,CAACL,eAAe,GAAE,CAAC,cACnBK,IAAA,CAACH,YAAY,GAAE,CAAC,EACE,CAAC,CACR,CAAC,CACN,CAAC,EACV,CAAC,CAEV,CAEA,cAAe,CAAAM,GAAG","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{TabContext,TabList,TabPanel}from'@mui/lab';import{Box,Tab}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import ErrorMessageSnackBar from'../../components/errorMessageSnackBar';import fetchWrapper from'../../components/fetchWrapper';import Title from'../../components/Title';import{isValidBearerToken}from'../../components/utils';import LaunchCustom from'./launchCustom';import LaunchLLM from'./launchLLM';import LaunchModelComponent from'./LaunchModelComponent';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var LaunchModel=function LaunchModel(){var _React$useState=React.useState(sessionStorage.getItem('modelType')?sessionStorage.getItem('modelType'):'/launch_model/llm'),_React$useState2=_slicedToArray(_React$useState,2),value=_React$useState2[0],setValue=_React$useState2[1];var _useState=useState(-1),_useState2=_slicedToArray(_useState,2),gpuAvailable=_useState2[0],setGPUAvailable=_useState2[1];var _useContext=useContext(ApiContext),setErrorMsg=_useContext.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();var handleTabChange=function handleTabChange(event,newValue){setValue(newValue);navigate(newValue);sessionStorage.setItem('modelType',newValue);newValue==='/launch_model/custom/llm'?sessionStorage.setItem('subType',newValue):'';};useEffect(function(){if(sessionStorage.getItem('auth')==='true'&&!isValidBearerToken(sessionStorage.getItem('token'))&&!isValidBearerToken(cookie.token)){navigate('/login',{replace:true});}if(gpuAvailable===-1){fetchWrapper.get('/v1/cluster/devices').then(function(data){return setGPUAvailable(parseInt(data,10));}).catch(function(error){console.error('Error:',error);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}},[cookie.token]);useEffect(function(){});return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsx(Title,{title:\"Launch Model\"}),/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__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:\"Language Models\",value:\"/launch_model/llm\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"/launch_model/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank Models\",value:\"/launch_model/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image Models\",value:\"/launch_model/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio Models\",value:\"/launch_model/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Video Models\",value:\"/launch_model/video\"}),/*#__PURE__*/_jsx(Tab,{label:\"Custom Models\",value:\"/launch_model/custom/llm\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchLLM,{gpuAvailable:gpuAvailable})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/embedding\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'embedding',gpuAvailable:gpuAvailable})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'rerank',gpuAvailable:gpuAvailable})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/image\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'image'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/audio\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'audio'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/video\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchModelComponent,{modelType:'video'})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/launch_model/custom/llm\",sx:{padding:0},children:/*#__PURE__*/_jsx(LaunchCustom,{gpuAvailable:gpuAvailable})})]})]});};export default LaunchModel;","map":{"version":3,"names":["TabContext","TabList","TabPanel","Box","Tab","React","useContext","useEffect","useState","useCookies","useNavigate","ApiContext","ErrorMessageSnackBar","fetchWrapper","Title","isValidBearerToken","LaunchCustom","LaunchLLM","LaunchModelComponent","jsx","_jsx","jsxs","_jsxs","LaunchModel","_React$useState","sessionStorage","getItem","_React$useState2","_slicedToArray","value","setValue","_useState","_useState2","gpuAvailable","setGPUAvailable","_useContext","setErrorMsg","_useCookies","_useCookies2","cookie","navigate","handleTabChange","event","newValue","setItem","token","replace","get","then","data","parseInt","catch","error","console","response","status","message","m","children","title","sx","borderBottom","borderColor","onChange","label","padding","modelType"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/index.js"],"sourcesContent":["import { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, Tab } from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport Title from '../../components/Title'\nimport { isValidBearerToken } from '../../components/utils'\nimport LaunchCustom from './launchCustom'\nimport LaunchLLM from './launchLLM'\nimport LaunchModelComponent from './LaunchModelComponent'\n\nconst LaunchModel = () => {\n const [value, setValue] = React.useState(\n sessionStorage.getItem('modelType')\n ? sessionStorage.getItem('modelType')\n : '/launch_model/llm'\n )\n const [gpuAvailable, setGPUAvailable] = useState(-1)\n\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n const handleTabChange = (event, newValue) => {\n setValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('modelType', newValue)\n newValue === '/launch_model/custom/llm'\n ? sessionStorage.setItem('subType', newValue)\n : ''\n }\n\n useEffect(() => {\n if (\n sessionStorage.getItem('auth') === 'true' &&\n !isValidBearerToken(sessionStorage.getItem('token')) &&\n !isValidBearerToken(cookie.token)\n ) {\n navigate('/login', { replace: true })\n }\n\n if (gpuAvailable === -1) {\n fetchWrapper\n .get('/v1/cluster/devices')\n .then((data) => setGPUAvailable(parseInt(data, 10)))\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 }\n }, [cookie.token])\n\n useEffect(() => {})\n return (\n <Box m=\"20px\">\n <Title title=\"Launch Model\" />\n <ErrorMessageSnackBar />\n <TabContext value={value}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList value={value} onChange={handleTabChange} aria-label=\"tabs\">\n <Tab label=\"Language Models\" value=\"/launch_model/llm\" />\n <Tab label=\"Embedding Models\" value=\"/launch_model/embedding\" />\n <Tab label=\"Rerank Models\" value=\"/launch_model/rerank\" />\n <Tab label=\"Image Models\" value=\"/launch_model/image\" />\n <Tab label=\"Audio Models\" value=\"/launch_model/audio\" />\n <Tab label=\"Video Models\" value=\"/launch_model/video\" />\n <Tab label=\"Custom Models\" value=\"/launch_model/custom/llm\" />\n </TabList>\n </Box>\n <TabPanel value=\"/launch_model/llm\" sx={{ padding: 0 }}>\n <LaunchLLM gpuAvailable={gpuAvailable} />\n </TabPanel>\n <TabPanel value=\"/launch_model/embedding\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'embedding'}\n gpuAvailable={gpuAvailable}\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/rerank\" sx={{ padding: 0 }}>\n <LaunchModelComponent\n modelType={'rerank'}\n gpuAvailable={gpuAvailable}\n />\n </TabPanel>\n <TabPanel value=\"/launch_model/image\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'image'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/audio\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'audio'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/video\" sx={{ padding: 0 }}>\n <LaunchModelComponent modelType={'video'} />\n </TabPanel>\n <TabPanel value=\"/launch_model/custom/llm\" sx={{ padding: 0 }}>\n <LaunchCustom gpuAvailable={gpuAvailable} />\n </TabPanel>\n </TabContext>\n </Box>\n )\n}\n\nexport default LaunchModel\n"],"mappings":"6IAAA,OAASA,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,GAAG,KAAQ,eAAe,CACxC,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,MAAO,CAAAC,YAAY,KAAM,+BAA+B,CACxD,MAAO,CAAAC,KAAK,KAAM,wBAAwB,CAC1C,OAASC,kBAAkB,KAAQ,wBAAwB,CAC3D,MAAO,CAAAC,YAAY,KAAM,gBAAgB,CACzC,MAAO,CAAAC,SAAS,KAAM,aAAa,CACnC,MAAO,CAAAC,oBAAoB,KAAM,wBAAwB,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEzD,GAAM,CAAAC,WAAW,CAAG,QAAd,CAAAA,WAAWA,CAAA,CAAS,CACxB,IAAAC,eAAA,CAA0Bn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B,QAAQ,EAAC2B,KAAK,CAAC,qBAAqB,CAAC+B,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACvDtC,IAAA,CAACF,oBAAoB,EAACgD,SAAS,CAAE,OAAQ,CAAE,CAAC,CACpC,CAAC,cACX9C,IAAA,CAAClB,QAAQ,EAAC2B,KAAK,CAAC,qBAAqB,CAAC+B,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACvDtC,IAAA,CAACF,oBAAoB,EAACgD,SAAS,CAAE,OAAQ,CAAE,CAAC,CACpC,CAAC,cACX9C,IAAA,CAAClB,QAAQ,EAAC2B,KAAK,CAAC,qBAAqB,CAAC+B,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cACvDtC,IAAA,CAACF,oBAAoB,EAACgD,SAAS,CAAE,OAAQ,CAAE,CAAC,CACpC,CAAC,cACX9C,IAAA,CAAClB,QAAQ,EAAC2B,KAAK,CAAC,0BAA0B,CAAC+B,EAAE,CAAE,CAAEK,OAAO,CAAE,CAAE,CAAE,CAAAP,QAAA,cAC5DtC,IAAA,CAACJ,YAAY,EAACiB,YAAY,CAAEA,YAAa,CAAE,CAAC,CACpC,CAAC,EACD,CAAC,EACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAAV,WAAW","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import React from'react';import{CookiesProvider}from'react-cookie';import ReactDOM from'react-dom/client';import App from'./App';import{jsx as _jsx}from\"react/jsx-runtime\";var root=ReactDOM.createRoot(document.getElementById('root'));root.render(/*#__PURE__*/_jsx(React.StrictMode,{children:/*#__PURE__*/_jsx(CookiesProvider,{children:/*#__PURE__*/_jsx(App,{})})}));","map":{"version":3,"names":["React","CookiesProvider","ReactDOM","App","jsx","_jsx","root","createRoot","document","getElementById","render","StrictMode","children"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/index.js"],"sourcesContent":["import React from 'react'\nimport { CookiesProvider } from 'react-cookie'\nimport ReactDOM from 'react-dom/client'\n\nimport App from './App'\n\nconst root = ReactDOM.createRoot(document.getElementById('root'))\nroot.render(\n <React.StrictMode>\n <CookiesProvider>\n <App />\n </CookiesProvider>\n </React.StrictMode>\n)\n"],"mappings":"AAAA,MAAO,CAAAA,KAAK,KAAM,OAAO,CACzB,OAASC,eAAe,KAAQ,cAAc,CAC9C,MAAO,CAAAC,QAAQ,KAAM,kBAAkB,CAEvC,MAAO,CAAAC,GAAG,KAAM,OAAO,QAAAC,GAAA,IAAAC,IAAA,yBAEvB,GAAM,CAAAC,IAAI,CAAGJ,QAAQ,CAACK,UAAU,CAACC,QAAQ,CAACC,cAAc,CAAC,MAAM,CAAC,CAAC,CACjEH,IAAI,CAACI,MAAM,cACTL,IAAA,CAACL,KAAK,CAACW,UAAU,EAAAC,QAAA,cACfP,IAAA,CAACJ,eAAe,EAAAW,QAAA,cACdP,IAAA,CAACF,GAAG,GAAE,CAAC,CACQ,CAAC,CACF,CACpB,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _defineProperty from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{AddBoxOutlined,ChevronRightOutlined,DnsOutlined,GitHub,RocketLaunchOutlined,SmartToyOutlined}from'@mui/icons-material';import{Box,Drawer,List,ListItem,ListItemButton,ListItemIcon,ListItemText,Typography,useTheme}from'@mui/material';import{useEffect,useState}from'react';import{useLocation,useNavigate}from'react-router-dom';import icon from'../media/icon.webp';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var navItems=[{text:'Launch Model',icon:/*#__PURE__*/_jsx(RocketLaunchOutlined,{})},{text:'Running Models',icon:/*#__PURE__*/_jsx(SmartToyOutlined,{})},{text:'Register Model',icon:/*#__PURE__*/_jsx(AddBoxOutlined,{})},{text:'Cluster Information',icon:/*#__PURE__*/_jsx(DnsOutlined,{})},{text:'Contact Us',icon:/*#__PURE__*/_jsx(GitHub,{})}];var MenuSide=function MenuSide(){var theme=useTheme();var _useLocation=useLocation(),pathname=_useLocation.pathname;var _useState=useState(''),_useState2=_slicedToArray(_useState,2),active=_useState2[0],setActive=_useState2[1];var navigate=useNavigate();var _useState3=useState(\"\".concat(Math.min(Math.max(window.innerWidth*0.2,287),320),\"px\")),_useState4=_slicedToArray(_useState3,2),drawerWidth=_useState4[0],setDrawerWidth=_useState4[1];useEffect(function(){setActive(pathname.substring(1));},[pathname]);useEffect(function(){var screenWidth=window.innerWidth;var maxDrawerWidth=Math.min(Math.max(screenWidth*0.2,287),320);setDrawerWidth(\"\".concat(maxDrawerWidth,\"px\"));// Update the drawer width on window resize\nvar handleResize=function handleResize(){var newScreenWidth=window.innerWidth;var newMaxDrawerWidth=Math.min(Math.max(newScreenWidth*0.2,287),320);setDrawerWidth(\"\".concat(newMaxDrawerWidth,\"px\"));};window.addEventListener('resize',handleResize);return function(){window.removeEventListener('resize',handleResize);};},[]);return/*#__PURE__*/_jsxs(Drawer,{variant:\"permanent\",sx:_objectSpread(_objectSpread({width:drawerWidth},theme.mixins.toolbar),{},_defineProperty({flexShrink:0},\"& .MuiDrawer-paper\",{width:drawerWidth,boxSizing:'border-box'})),children:[/*#__PURE__*/_jsx(Box,{display:\"flex\",justifyContent:\"center\",alignItems:\"center\",width:\"100%\",children:/*#__PURE__*/_jsx(Box,{display:\"flex\",m:\"2rem 1rem 0rem 1rem\",width:\"217px\",children:/*#__PURE__*/_jsxs(Box,{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",textTransform:\"none\",children:[/*#__PURE__*/_jsx(Box,{component:\"img\",alt:\"profile\",src:icon,height:\"60px\",width:\"60px\",borderRadius:\"50%\",sx:{objectFit:'cover',mr:1.5}}),/*#__PURE__*/_jsx(Box,{textAlign:\"left\",children:/*#__PURE__*/_jsx(Typography,{fontWeight:\"bold\",fontSize:\"1.7rem\",children:'Xinference'})})]})})}),/*#__PURE__*/_jsx(Box,{children:/*#__PURE__*/_jsxs(Box,{width:\"100%\",children:[/*#__PURE__*/_jsx(Box,{m:\"1.5rem 2rem 2rem 3rem\"}),/*#__PURE__*/_jsx(List,{children:navItems.map(function(_ref){var text=_ref.text,icon=_ref.icon;if(!icon){return/*#__PURE__*/_jsx(Typography,{sx:{m:'2.25rem 0 1rem 3rem'},children:text},text);}var link=text.toLowerCase().replace(' ','_');return/*#__PURE__*/_jsx(ListItem,{children:/*#__PURE__*/_jsxs(ListItemButton,{onClick:function onClick(){if(link==='contact_us'){window.open('https://github.com/xorbitsai/inference','_blank','noreferrer');}else if(link==='launch_model'){sessionStorage.setItem('modelType','/launch_model/llm');navigate('/launch_model/llm');setActive(link);sessionStorage.setItem('lastActiveUrl',link);console.log(active);}else if(link==='cluster_information'){navigate('/cluster_info');setActive(link);}else if(link==='running_models'){navigate('/running_models/LLM');sessionStorage.setItem('runningModelType','/running_models/LLM');setActive(link);sessionStorage.setItem('lastActiveUrl',link);console.log(active);}else if(link==='register_model'){sessionStorage.setItem('registerModelType','/register_model/llm');navigate('/register_model/llm');setActive(link);sessionStorage.setItem('lastActiveUrl',link);console.log(active);}else{navigate(\"/\".concat(link));setActive(link);console.log(active);}},children:[/*#__PURE__*/_jsx(ListItemIcon,{sx:{ml:'2rem'},children:icon}),/*#__PURE__*/_jsx(ListItemText,{primary:text}),/*#__PURE__*/_jsx(ChevronRightOutlined,{sx:{ml:'auto'}})]})},text);})})]})})]});};export default MenuSide;","map":{"version":3,"names":["AddBoxOutlined","ChevronRightOutlined","DnsOutlined","GitHub","RocketLaunchOutlined","SmartToyOutlined","Box","Drawer","List","ListItem","ListItemButton","ListItemIcon","ListItemText","Typography","useTheme","useEffect","useState","useLocation","useNavigate","icon","jsx","_jsx","jsxs","_jsxs","navItems","text","MenuSide","theme","_useLocation","pathname","_useState","_useState2","_slicedToArray","active","setActive","navigate","_useState3","concat","Math","min","max","window","innerWidth","_useState4","drawerWidth","setDrawerWidth","substring","screenWidth","maxDrawerWidth","handleResize","newScreenWidth","newMaxDrawerWidth","addEventListener","removeEventListener","variant","sx","_objectSpread","width","mixins","toolbar","_defineProperty","flexShrink","boxSizing","children","display","justifyContent","alignItems","m","textTransform","component","alt","src","height","borderRadius","objectFit","mr","textAlign","fontWeight","fontSize","map","_ref","link","toLowerCase","replace","onClick","open","sessionStorage","setItem","console","log","ml","primary"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/MenuSide.js"],"sourcesContent":["import {\n AddBoxOutlined,\n ChevronRightOutlined,\n DnsOutlined,\n GitHub,\n RocketLaunchOutlined,\n SmartToyOutlined,\n} from '@mui/icons-material'\nimport {\n Box,\n Drawer,\n List,\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Typography,\n useTheme,\n} from '@mui/material'\nimport { useEffect, useState } from 'react'\nimport { useLocation, useNavigate } from 'react-router-dom'\n\nimport icon from '../media/icon.webp'\n\nconst navItems = [\n {\n text: 'Launch Model',\n icon: <RocketLaunchOutlined />,\n },\n {\n text: 'Running Models',\n icon: <SmartToyOutlined />,\n },\n {\n text: 'Register Model',\n icon: <AddBoxOutlined />,\n },\n {\n text: 'Cluster Information',\n icon: <DnsOutlined />,\n },\n {\n text: 'Contact Us',\n icon: <GitHub />,\n },\n]\n\nconst MenuSide = () => {\n const theme = useTheme()\n const { pathname } = useLocation()\n const [active, setActive] = useState('')\n const navigate = useNavigate()\n const [drawerWidth, setDrawerWidth] = useState(\n `${Math.min(Math.max(window.innerWidth * 0.2, 287), 320)}px`\n )\n\n useEffect(() => {\n setActive(pathname.substring(1))\n }, [pathname])\n\n useEffect(() => {\n const screenWidth = window.innerWidth\n const maxDrawerWidth = Math.min(Math.max(screenWidth * 0.2, 287), 320)\n setDrawerWidth(`${maxDrawerWidth}px`)\n\n // Update the drawer width on window resize\n const handleResize = () => {\n const newScreenWidth = window.innerWidth\n const newMaxDrawerWidth = Math.min(\n Math.max(newScreenWidth * 0.2, 287),\n 320\n )\n setDrawerWidth(`${newMaxDrawerWidth}px`)\n }\n\n window.addEventListener('resize', handleResize)\n return () => {\n window.removeEventListener('resize', handleResize)\n }\n }, [])\n\n return (\n <Drawer\n variant=\"permanent\"\n sx={{\n width: drawerWidth,\n ...theme.mixins.toolbar,\n flexShrink: 0,\n [`& .MuiDrawer-paper`]: {\n width: drawerWidth,\n boxSizing: 'border-box',\n },\n }}\n >\n {/* Title */}\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n width=\"100%\"\n >\n <Box display=\"flex\" m=\"2rem 1rem 0rem 1rem\" width=\"217px\">\n <Box\n display=\"flex\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n textTransform=\"none\"\n >\n <Box\n component=\"img\"\n alt=\"profile\"\n src={icon}\n height=\"60px\"\n width=\"60px\"\n borderRadius=\"50%\"\n sx={{ objectFit: 'cover', mr: 1.5 }}\n />\n <Box textAlign=\"left\">\n <Typography fontWeight=\"bold\" fontSize=\"1.7rem\">\n {'Xinference'}\n </Typography>\n </Box>\n </Box>\n </Box>\n </Box>\n\n <Box>\n <Box width=\"100%\">\n <Box m=\"1.5rem 2rem 2rem 3rem\"></Box>\n <List>\n {navItems.map(({ text, icon }) => {\n if (!icon) {\n return (\n <Typography key={text} sx={{ m: '2.25rem 0 1rem 3rem' }}>\n {text}\n </Typography>\n )\n }\n\n const link = text.toLowerCase().replace(' ', '_')\n\n return (\n <ListItem key={text}>\n <ListItemButton\n onClick={() => {\n if (link === 'contact_us') {\n window.open(\n 'https://github.com/xorbitsai/inference',\n '_blank',\n 'noreferrer'\n )\n } else if (link === 'launch_model') {\n sessionStorage.setItem('modelType', '/launch_model/llm')\n navigate('/launch_model/llm')\n setActive(link)\n sessionStorage.setItem('lastActiveUrl', link)\n console.log(active)\n } else if (link === 'cluster_information') {\n navigate('/cluster_info')\n setActive(link)\n } else if (link === 'running_models') {\n navigate('/running_models/LLM')\n sessionStorage.setItem(\n 'runningModelType',\n '/running_models/LLM'\n )\n setActive(link)\n sessionStorage.setItem('lastActiveUrl', link)\n console.log(active)\n } else if (link === 'register_model') {\n sessionStorage.setItem(\n 'registerModelType',\n '/register_model/llm'\n )\n navigate('/register_model/llm')\n setActive(link)\n sessionStorage.setItem('lastActiveUrl', link)\n console.log(active)\n } else {\n navigate(`/${link}`)\n setActive(link)\n console.log(active)\n }\n }}\n >\n <ListItemIcon\n sx={{\n ml: '2rem',\n }}\n >\n {icon}\n </ListItemIcon>\n <ListItemText primary={text} />\n <ChevronRightOutlined sx={{ ml: 'auto' }} />\n </ListItemButton>\n </ListItem>\n )\n })}\n </List>\n </Box>\n </Box>\n </Drawer>\n )\n}\n\nexport default MenuSide\n"],"mappings":"waAAA,OACEA,cAAc,CACdC,oBAAoB,CACpBC,WAAW,CACXC,MAAM,CACNC,oBAAoB,CACpBC,gBAAgB,KACX,qBAAqB,CAC5B,OACEC,GAAG,CACHC,MAAM,CACNC,IAAI,CACJC,QAAQ,CACRC,cAAc,CACdC,YAAY,CACZC,YAAY,CACZC,UAAU,CACVC,QAAQ,KACH,eAAe,CACtB,OAASC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC3C,OAASC,WAAW,CAAEC,WAAW,KAAQ,kBAAkB,CAE3D,MAAO,CAAAC,IAAI,KAAM,oBAAoB,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAErC,GAAM,CAAAC,QAAQ,CAAG,CACf,CACEC,IAAI,CAAE,cAAc,CACpBN,IAAI,cAAEE,IAAA,CAACjB,oBAAoB,GAAE,CAC/B,CAAC,CACD,CACEqB,IAAI,CAAE,gBAAgB,CACt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CAAC,IAAM,CACLE,QAAQ,KAAAE,MAAA,CAAK4C,IAAI,CAAE,CAAC,CACpB/C,SAAS,CAAC+C,IAAI,CAAC,CACfO,OAAO,CAACC,GAAG,CAACxD,MAAM,CAAC,CACrB,CACF,CAAE,CAAA8B,QAAA,eAEF1C,IAAA,CAACV,YAAY,EACX4C,EAAE,CAAE,CACFmC,EAAE,CAAE,MACN,CAAE,CAAA3B,QAAA,CAED5C,IAAI,CACO,CAAC,cACfE,IAAA,CAACT,YAAY,EAAC+E,OAAO,CAAElE,IAAK,CAAE,CAAC,cAC/BJ,IAAA,CAACpB,oBAAoB,EAACsD,EAAE,CAAE,CAAEmC,EAAE,CAAE,MAAO,CAAE,CAAE,CAAC,EAC9B,CAAC,EApDJjE,IAqDL,CAAC,CAEf,CAAC,CAAC,CACE,CAAC,EACJ,CAAC,CACH,CAAC,EACA,CAAC,CAEb,CAAC,CAED,cAAe,CAAAC,QAAQ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import{createTheme}from'@mui/material/styles';// mui theme settings\nexport var themeSettings=function themeSettings(){return{ERROR_COLOR:'#d8342c',typography:{fontFamily:['Source Sans Pro','sans-serif'].join(','),fontSize:12,h1:{fontFamily:['Source Sans Pro','sans-serif'].join(','),fontSize:40},h2:{fontFamily:['Source Sans Pro','sans-serif'].join(','),fontSize:32},h3:{fontFamily:['Source Sans Pro','sans-serif'].join(','),fontSize:24},h4:{fontFamily:['Source Sans Pro','sans-serif'].join(','),fontSize:20},h5:{fontFamily:['Source Sans Pro','sans-serif'].join(','),fontSize:16},h6:{fontFamily:['Source Sans Pro','sans-serif'].join(','),fontSize:14}}};};export var useMode=function useMode(){var theme=createTheme(themeSettings());return[theme];};","map":{"version":3,"names":["createTheme","themeSettings","ERROR_COLOR","typography","fontFamily","join","fontSize","h1","h2","h3","h4","h5","h6","useMode","theme"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/theme.js"],"sourcesContent":["import { createTheme } from '@mui/material/styles'\n\n// mui theme settings\nexport const themeSettings = () => {\n return {\n ERROR_COLOR: '#d8342c',\n typography: {\n fontFamily: ['Source Sans Pro', 'sans-serif'].join(','),\n fontSize: 12,\n h1: {\n fontFamily: ['Source Sans Pro', 'sans-serif'].join(','),\n fontSize: 40,\n },\n h2: {\n fontFamily: ['Source Sans Pro', 'sans-serif'].join(','),\n fontSize: 32,\n },\n h3: {\n fontFamily: ['Source Sans Pro', 'sans-serif'].join(','),\n fontSize: 24,\n },\n h4: {\n fontFamily: ['Source Sans Pro', 'sans-serif'].join(','),\n fontSize: 20,\n },\n h5: {\n fontFamily: ['Source Sans Pro', 'sans-serif'].join(','),\n fontSize: 16,\n },\n h6: {\n fontFamily: ['Source Sans Pro', 'sans-serif'].join(','),\n fontSize: 14,\n },\n },\n }\n}\n\nexport const useMode = () => {\n const theme = createTheme(themeSettings())\n return [theme]\n}\n"],"mappings":"AAAA,OAASA,WAAW,KAAQ,sBAAsB,CAElD;AACA,MAAO,IAAM,CAAAC,aAAa,CAAG,QAAhB,CAAAA,aAAaA,CAAA,CAAS,CACjC,MAAO,CACLC,WAAW,CAAE,SAAS,CACtBC,UAAU,CAAE,CACVC,UAAU,CAAE,CAAC,iBAAiB,CAAE,YAAY,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CACvDC,QAAQ,CAAE,EAAE,CACZC,EAAE,CAAE,CACFH,UAAU,CAAE,CAAC,iBAAiB,CAAE,YAAY,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CACvDC,QAAQ,CAAE,EACZ,CAAC,CACDE,EAAE,CAAE,CACFJ,UAAU,CAAE,CAAC,iBAAiB,CAAE,YAAY,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CACvDC,QAAQ,CAAE,EACZ,CAAC,CACDG,EAAE,CAAE,CACFL,UAAU,CAAE,CAAC,iBAAiB,CAAE,YAAY,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CACvDC,QAAQ,CAAE,EACZ,CAAC,CACDI,EAAE,CAAE,CACFN,UAAU,CAAE,CAAC,iBAAiB,CAAE,YAAY,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CACvDC,QAAQ,CAAE,EACZ,CAAC,CACDK,EAAE,CAAE,CACFP,UAAU,CAAE,CAAC,iBAAiB,CAAE,YAAY,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CACvDC,QAAQ,CAAE,EACZ,CAAC,CACDM,EAAE,CAAE,CACFR,UAAU,CAAE,CAAC,iBAAiB,CAAE,YAAY,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC,CACvDC,QAAQ,CAAE,EACZ,CACF,CACF,CAAC,CACH,CAAC,CAED,MAAO,IAAM,CAAAO,OAAO,CAAG,QAAV,CAAAA,OAAOA,CAAA,CAAS,CAC3B,GAAM,CAAAC,KAAK,CAAGd,WAAW,CAACC,aAAa,CAAC,CAAC,CAAC,CAC1C,MAAO,CAACa,KAAK,CAAC,CAChB,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -1 +0,0 @@
1
- {"ast":null,"code":"import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import DeleteOutlineOutlinedIcon from'@mui/icons-material/DeleteOutlineOutlined';import OpenInBrowserOutlinedIcon from'@mui/icons-material/OpenInBrowserOutlined';import{TabContext,TabList,TabPanel}from'@mui/lab';import{Box,Stack,Tab}from'@mui/material';import{DataGrid}from'@mui/x-data-grid';import React,{useContext,useEffect,useState}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import ErrorMessageSnackBar from'../../components/errorMessageSnackBar';import fetcher from'../../components/fetcher';import fetchWrapper from'../../components/fetchWrapper';import Title from'../../components/Title';import{isValidBearerToken}from'../../components/utils';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var RunningModels=function RunningModels(){var _React$useState=React.useState(sessionStorage.getItem('runningModelType')),_React$useState2=_slicedToArray(_React$useState,2),tabValue=_React$useState2[0],setTabValue=_React$useState2[1];var _useState=useState([]),_useState2=_slicedToArray(_useState,2),llmData=_useState2[0],setLlmData=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),embeddingModelData=_useState4[0],setEmbeddingModelData=_useState4[1];var _useState5=useState([]),_useState6=_slicedToArray(_useState5,2),imageModelData=_useState6[0],setImageModelData=_useState6[1];var _useState7=useState([]),_useState8=_slicedToArray(_useState7,2),audioModelData=_useState8[0],setAudioModelData=_useState8[1];var _useState9=useState([]),_useState10=_slicedToArray(_useState9,2),videoModelData=_useState10[0],setVideoModelData=_useState10[1];var _useState11=useState([]),_useState12=_slicedToArray(_useState11,2),rerankModelData=_useState12[0],setRerankModelData=_useState12[1];var _useState13=useState([]),_useState14=_slicedToArray(_useState13,2),flexibleModelData=_useState14[0],setFlexibleModelData=_useState14[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel,setIsUpdatingModel=_useContext2.setIsUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,1),cookie=_useCookies2[0];var navigate=useNavigate();var endPoint=useContext(ApiContext).endPoint;var handleTabChange=function handleTabChange(event,newValue){setTabValue(newValue);navigate(newValue);sessionStorage.setItem('runningModelType',newValue);};var update=function update(isCallingApi){if(sessionStorage.getItem('auth')==='true'&&!isValidBearerToken(sessionStorage.getItem('token'))&&!isValidBearerToken(cookie.token)){navigate('/login',{replace:true});return;}if(isCallingApi){setLlmData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setEmbeddingModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setAudioModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setVideoModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setImageModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setRerankModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setFlexibleModelData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);}else{setIsUpdatingModel(true);fetchWrapper.get('/v1/models').then(function(response){var newLlmData=[];var newEmbeddingModelData=[];var newImageModelData=[];var newAudioModelData=[];var newVideoModelData=[];var newRerankModelData=[];var newFlexibleModelData=[];response.data.forEach(function(model){var newValue=_objectSpread(_objectSpread({},model),{},{id:model.id,url:model.id});if(newValue.model_type==='LLM'){newLlmData.push(newValue);}else if(newValue.model_type==='embedding'){newEmbeddingModelData.push(newValue);}else if(newValue.model_type==='audio'){newAudioModelData.push(newValue);}else if(newValue.model_type==='video'){newVideoModelData.push(newValue);}else if(newValue.model_type==='image'){newImageModelData.push(newValue);}else if(newValue.model_type==='rerank'){newRerankModelData.push(newValue);}else if(newValue.model_type==='flexible'){newFlexibleModelData.push(newValue);}});setLlmData(newLlmData);setEmbeddingModelData(newEmbeddingModelData);setAudioModelData(newAudioModelData);setVideoModelData(newVideoModelData);setImageModelData(newImageModelData);setRerankModelData(newRerankModelData);setFlexibleModelData(newFlexibleModelData);setIsUpdatingModel(false);}).catch(function(error){console.error('Error:',error);setIsUpdatingModel(false);if(error.response.status!==403&&error.response.status!==401){setErrorMsg(error.message);}});}};useEffect(function(){update(isCallingApi);// eslint-disable-next-line\n},[isCallingApi,cookie.token]);var llmColumns=[{field:'id',headerName:'ID',flex:1,minWidth:250},{field:'model_name',headerName:'Name',flex:1},{field:'address',headerName:'Address',flex:1},{field:'accelerators',headerName:'GPU Indexes',flex:1},{field:'model_size_in_billions',headerName:'Size',flex:1},{field:'quantization',headerName:'Quantization',flex:1},{field:'replica',headerName:'Replica',flex:1},{field:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref){var row=_ref.row;var url=row.url;var openUrl=\"\".concat(endPoint,\"/\")+url;var closeUrl=\"\".concat(endPoint,\"/v1/models/\")+url;var gradioUrl=\"\".concat(endPoint,\"/v1/ui/\")+url;if(url==='IS_LOADING'){return/*#__PURE__*/_jsx(\"div\",{});}return/*#__PURE__*/_jsxs(Box,{style:{width:'100%',display:'flex',justifyContent:'left',alignItems:'left'},children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch Web UI\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){// Make sure no ongoing call\nreturn;}setIsCallingApi(true);fetcher(openUrl,{method:'HEAD'}).then(function(response){if(response.status===404){// If web UI doesn't exist (404 Not Found)\nconsole.log('UI does not exist, creating new...');return fetcher(gradioUrl,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({model_type:row.model_type,model_name:row.model_family,model_size_in_billions:row.model_size_in_billions,model_format:row.model_format,quantization:row.quantization,context_length:row.context_length,model_ability:row.model_ability,model_description:row.model_description,model_lang:row.model_lang})}).then(function(response){return response.json();}).then(function(){return window.open(openUrl,'_blank','noopener noreferrer');}).finally(function(){return setIsCallingApi(false);});}else if(response.ok){// If web UI does exist\nconsole.log('UI exists, opening...');window.open(openUrl,'_blank','noopener noreferrer');setIsCallingApi(false);}else{// Other HTTP errors\nconsole.error(\"Unexpected response status: \".concat(response.status));setIsCallingApi(false);}}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(OpenInBrowserOutlinedIcon,{})})}),/*#__PURE__*/_jsx(\"button\",{title:\"Terminate Model\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);fetcher(closeUrl,{method:'DELETE'}).then(function(response){response.json();}).then(function(){setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(DeleteOutlineOutlinedIcon,{})})})]});}}];var embeddingModelColumns=[{field:'id',headerName:'ID',flex:1,minWidth:250},{field:'model_name',headerName:'Name',flex:1},{field:'address',headerName:'Address',flex:1},{field:'accelerators',headerName:'GPU Indexes',flex:1},{field:'replica',headerName:'Replica',flex:1},{field:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref2){var row=_ref2.row;var url=row.url;var closeUrl=\"\".concat(endPoint,\"/v1/models/\")+url;if(url==='IS_LOADING'){return/*#__PURE__*/_jsx(\"div\",{});}return/*#__PURE__*/_jsx(Box,{style:{width:'100%',display:'flex',justifyContent:'left',alignItems:'left'},children:/*#__PURE__*/_jsx(\"button\",{title:\"Terminate Model\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);fetcher(closeUrl,{method:'DELETE'}).then(function(response){response.json();}).then(function(){setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(DeleteOutlineOutlinedIcon,{})})})});}}];var imageModelColumns=[{field:'id',headerName:'ID',flex:1,minWidth:250},{field:'model_name',headerName:'Name',flex:1},{field:'address',headerName:'Address',flex:1},{field:'accelerators',headerName:'GPU Indexes',flex:1},{field:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref3){var row=_ref3.row;//这个url指的是model_uid\nvar url=row.url;console.log('url: '+url);var openUrl=\"\".concat(endPoint,\"/\")+url;var closeUrl=\"\".concat(endPoint,\"/v1/models/\")+url;var gradioUrl=\"\".concat(endPoint,\"/v1/ui/images/\")+url;if(url==='IS_LOADING'){return/*#__PURE__*/_jsx(\"div\",{});}return/*#__PURE__*/_jsxs(Box,{style:{width:'100%',display:'flex',justifyContent:'left',alignItems:'left'},children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch Web UI\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){// Make sure no ongoing call\nreturn;}setIsCallingApi(true);fetcher(openUrl,{method:'HEAD'}).then(function(response){if(response.status===404){// If web UI doesn't exist (404 Not Found)\nconsole.log('UI does not exist, creating new...');return fetcher(gradioUrl,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({model_type:row.model_type,model_family:row.model_family,model_id:row.id,controlnet:row.controlnet,model_revision:row.model_revision,model_name:row.model_name,model_ability:row.model_ability})}).then(function(response){return response.json();}).then(function(){return window.open(openUrl,'_blank','noopener noreferrer');}).finally(function(){return setIsCallingApi(false);});}else if(response.ok){// If web UI does exist\nconsole.log('UI exists, opening...');window.open(openUrl,'_blank','noopener noreferrer');setIsCallingApi(false);}else{// Other HTTP errors\nconsole.error(\"Unexpected response status: \".concat(response.status));setIsCallingApi(false);}}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(OpenInBrowserOutlinedIcon,{})})}),/*#__PURE__*/_jsx(\"button\",{title:\"Terminate Model\",style:{borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'10px'},onClick:function onClick(){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);fetcher(closeUrl,{method:'DELETE'}).then(function(response){response.json();}).then(function(){setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});},children:/*#__PURE__*/_jsx(Box,{width:\"40px\",m:\"0 auto\",p:\"5px\",display:\"flex\",justifyContent:\"center\",borderRadius:\"4px\",style:{border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},children:/*#__PURE__*/_jsx(DeleteOutlineOutlinedIcon,{})})})]});}}];var audioModelColumns=embeddingModelColumns;var videoModelColumns=embeddingModelColumns;var rerankModelColumns=embeddingModelColumns;var flexibleModelColumns=embeddingModelColumns;var dataGridStyle={'& .MuiDataGrid-cell':{borderBottom:'none'},'& .MuiDataGrid-columnHeaders':{borderBottom:'none'},'& .MuiDataGrid-columnHeaderTitle':{fontWeight:'bold'},'& .MuiDataGrid-virtualScroller':{overflowX:'visible !important',overflow:'visible'},'& .MuiDataGrid-footerContainer':{borderTop:'none'},'border-width':'0px'};var noRowsOverlay=function noRowsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models\"});};var noResultsOverlay=function noResultsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models Matches\"});};return/*#__PURE__*/_jsxs(Box,{sx:{height:'100%',width:'100%',padding:'20px 20px 0 20px'},children:[/*#__PURE__*/_jsx(Title,{title:\"Running Models\"}),/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__PURE__*/_jsxs(TabContext,{value:tabValue,children:[/*#__PURE__*/_jsx(Box,{sx:{borderBottom:1,borderColor:'divider'},children:/*#__PURE__*/_jsxs(TabList,{value:tabValue,onChange:handleTabChange,\"aria-label\":\"tabs\",children:[/*#__PURE__*/_jsx(Tab,{label:\"Language Models\",value:\"/running_models/LLM\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"/running_models/embedding\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank models\",value:\"/running_models/rerank\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image models\",value:\"/running_models/image\"}),/*#__PURE__*/_jsx(Tab,{label:\"Audio models\",value:\"/running_models/audio\"}),/*#__PURE__*/_jsx(Tab,{label:\"Video models\",value:\"/running_models/video\"}),/*#__PURE__*/_jsx(Tab,{label:\"Flexible models\",value:\"/running_models/flexible\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/LLM\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:llmData,columns:llmColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/embedding\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:embeddingModelData,columns:embeddingModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/rerank\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:rerankModelData,columns:rerankModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/image\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:imageModelData,columns:imageModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/audio\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:audioModelData,columns:audioModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/video\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:videoModelData,columns:videoModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"/running_models/flexible\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{sx:{height:'100%',width:'100%'},children:/*#__PURE__*/_jsx(DataGrid,{rows:flexibleModelData,columns:flexibleModelColumns,autoHeight:true,sx:dataGridStyle,slots:{noRowsOverlay:noRowsOverlay,noResultsOverlay:noResultsOverlay}})})})]})]});};export default RunningModels;","map":{"version":3,"names":["DeleteOutlineOutlinedIcon","OpenInBrowserOutlinedIcon","TabContext","TabList","TabPanel","Box","Stack","Tab","DataGrid","React","useContext","useEffect","useState","useCookies","useNavigate","ApiContext","ErrorMessageSnackBar","fetcher","fetchWrapper","Title","isValidBearerToken","jsx","_jsx","jsxs","_jsxs","RunningModels","_React$useState","sessionStorage","getItem","_React$useState2","_slicedToArray","tabValue","setTabValue","_useState","_useState2","llmData","setLlmData","_useState3","_useState4","embeddingModelData","setEmbeddingModelData","_useState5","_useState6","imageModelData","setImageModelData","_useState7","_useState8","audioModelData","setAudioModelData","_useState9","_useState10","videoModelData","setVideoModelData","_useState11","_useState12","rerankModelData","setRerankModelData","_useState13","_useState14","flexibleModelData","setFlexibleModelData","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","setIsUpdatingModel","_useContext3","setErrorMsg","_useCookies","_useCookies2","cookie","navigate","endPoint","handleTabChange","event","newValue","setItem","update","token","replace","id","url","get","then","response","newLlmData","newEmbeddingModelData","newImageModelData","newAudioModelData","newVideoModelData","newRerankModelData","newFlexibleModelData","data","forEach","model","_objectSpread","model_type","push","catch","error","console","status","message","llmColumns","field","headerName","flex","minWidth","sortable","filterable","disableColumnMenu","renderCell","_ref","row","openUrl","concat","closeUrl","gradioUrl","style","width","display","justifyContent","alignItems","children","title","borderWidth","backgroundColor","paddingLeft","paddingRight","onClick","method","log","headers","body","JSON","stringify","model_name","model_family","model_size_in_billions","model_format","quantization","context_length","model_ability","model_description","model_lang","json","window","open","finally","ok","m","p","borderRadius","border","borderColor","embeddingModelColumns","_ref2","imageModelColumns","_ref3","model_id","controlnet","model_revision","audioModelColumns","videoModelColumns","rerankModelColumns","flexibleModelColumns","dataGridStyle","borderBottom","fontWeight","overflowX","overflow","borderTop","noRowsOverlay","height","noResultsOverlay","sx","padding","value","onChange","label","rows","columns","autoHeight","slots"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/running_models/index.js"],"sourcesContent":["import DeleteOutlineOutlinedIcon from '@mui/icons-material/DeleteOutlineOutlined'\nimport OpenInBrowserOutlinedIcon from '@mui/icons-material/OpenInBrowserOutlined'\nimport { TabContext, TabList, TabPanel } from '@mui/lab'\nimport { Box, Stack, Tab } from '@mui/material'\nimport { DataGrid } from '@mui/x-data-grid'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport fetcher from '../../components/fetcher'\nimport fetchWrapper from '../../components/fetchWrapper'\nimport Title from '../../components/Title'\nimport { isValidBearerToken } from '../../components/utils'\n\nconst RunningModels = () => {\n const [tabValue, setTabValue] = React.useState(\n sessionStorage.getItem('runningModelType')\n )\n const [llmData, setLlmData] = useState([])\n const [embeddingModelData, setEmbeddingModelData] = useState([])\n const [imageModelData, setImageModelData] = useState([])\n const [audioModelData, setAudioModelData] = useState([])\n const [videoModelData, setVideoModelData] = useState([])\n const [rerankModelData, setRerankModelData] = useState([])\n const [flexibleModelData, setFlexibleModelData] = useState([])\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel, setIsUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const [cookie] = useCookies(['token'])\n const navigate = useNavigate()\n const endPoint = useContext(ApiContext).endPoint\n\n const handleTabChange = (event, newValue) => {\n setTabValue(newValue)\n navigate(newValue)\n sessionStorage.setItem('runningModelType', newValue)\n }\n\n const update = (isCallingApi) => {\n if (\n sessionStorage.getItem('auth') === 'true' &&\n !isValidBearerToken(sessionStorage.getItem('token')) &&\n !isValidBearerToken(cookie.token)\n ) {\n navigate('/login', { replace: true })\n return\n }\n if (isCallingApi) {\n setLlmData([{ id: 'Loading, do not refresh page...', url: 'IS_LOADING' }])\n setEmbeddingModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setAudioModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setVideoModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setImageModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setRerankModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n setFlexibleModelData([\n { id: 'Loading, do not refresh page...', url: 'IS_LOADING' },\n ])\n } else {\n setIsUpdatingModel(true)\n\n fetchWrapper\n .get('/v1/models')\n .then((response) => {\n const newLlmData = []\n const newEmbeddingModelData = []\n const newImageModelData = []\n const newAudioModelData = []\n const newVideoModelData = []\n const newRerankModelData = []\n const newFlexibleModelData = []\n response.data.forEach((model) => {\n let newValue = {\n ...model,\n id: model.id,\n url: model.id,\n }\n if (newValue.model_type === 'LLM') {\n newLlmData.push(newValue)\n } else if (newValue.model_type === 'embedding') {\n newEmbeddingModelData.push(newValue)\n } else if (newValue.model_type === 'audio') {\n newAudioModelData.push(newValue)\n } else if (newValue.model_type === 'video') {\n newVideoModelData.push(newValue)\n } else if (newValue.model_type === 'image') {\n newImageModelData.push(newValue)\n } else if (newValue.model_type === 'rerank') {\n newRerankModelData.push(newValue)\n } else if (newValue.model_type === 'flexible') {\n newFlexibleModelData.push(newValue)\n }\n })\n setLlmData(newLlmData)\n setEmbeddingModelData(newEmbeddingModelData)\n setAudioModelData(newAudioModelData)\n setVideoModelData(newVideoModelData)\n setImageModelData(newImageModelData)\n setRerankModelData(newRerankModelData)\n setFlexibleModelData(newFlexibleModelData)\n setIsUpdatingModel(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsUpdatingModel(false)\n if (error.response.status !== 403 && error.response.status !== 401) {\n setErrorMsg(error.message)\n }\n })\n }\n }\n\n useEffect(() => {\n update(isCallingApi)\n // eslint-disable-next-line\n }, [isCallingApi, cookie.token])\n\n const llmColumns = [\n {\n field: 'id',\n headerName: 'ID',\n flex: 1,\n minWidth: 250,\n },\n {\n field: 'model_name',\n headerName: 'Name',\n flex: 1,\n },\n {\n field: 'address',\n headerName: 'Address',\n flex: 1,\n },\n {\n field: 'accelerators',\n headerName: 'GPU Indexes',\n flex: 1,\n },\n {\n field: 'model_size_in_billions',\n headerName: 'Size',\n flex: 1,\n },\n {\n field: 'quantization',\n headerName: 'Quantization',\n flex: 1,\n },\n {\n field: 'replica',\n headerName: 'Replica',\n flex: 1,\n },\n {\n field: 'url',\n headerName: 'Actions',\n flex: 1,\n minWidth: 200,\n sortable: false,\n filterable: false,\n disableColumnMenu: true,\n renderCell: ({ row }) => {\n const url = row.url\n const openUrl = `${endPoint}/` + url\n const closeUrl = `${endPoint}/v1/models/` + url\n const gradioUrl = `${endPoint}/v1/ui/` + url\n\n if (url === 'IS_LOADING') {\n return <div></div>\n }\n\n return (\n <Box\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'left',\n alignItems: 'left',\n }}\n >\n <button\n title=\"Launch Web UI\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n // Make sure no ongoing call\n return\n }\n\n setIsCallingApi(true)\n\n fetcher(openUrl, {\n method: 'HEAD',\n })\n .then((response) => {\n if (response.status === 404) {\n // If web UI doesn't exist (404 Not Found)\n console.log('UI does not exist, creating new...')\n return fetcher(gradioUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n model_type: row.model_type,\n model_name: row.model_family,\n model_size_in_billions: row.model_size_in_billions,\n model_format: row.model_format,\n quantization: row.quantization,\n context_length: row.context_length,\n model_ability: row.model_ability,\n model_description: row.model_description,\n model_lang: row.model_lang,\n }),\n })\n .then((response) => response.json())\n .then(() =>\n window.open(openUrl, '_blank', 'noopener noreferrer')\n )\n .finally(() => setIsCallingApi(false))\n } else if (response.ok) {\n // If web UI does exist\n console.log('UI exists, opening...')\n window.open(openUrl, '_blank', 'noopener noreferrer')\n setIsCallingApi(false)\n } else {\n // Other HTTP errors\n console.error(\n `Unexpected response status: ${response.status}`\n )\n setIsCallingApi(false)\n }\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <OpenInBrowserOutlinedIcon />\n </Box>\n </button>\n <button\n title=\"Terminate Model\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n setIsCallingApi(true)\n fetcher(closeUrl, {\n method: 'DELETE',\n })\n .then((response) => {\n response.json()\n })\n .then(() => {\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <DeleteOutlineOutlinedIcon />\n </Box>\n </button>\n </Box>\n )\n },\n },\n ]\n\n const embeddingModelColumns = [\n {\n field: 'id',\n headerName: 'ID',\n flex: 1,\n minWidth: 250,\n },\n {\n field: 'model_name',\n headerName: 'Name',\n flex: 1,\n },\n {\n field: 'address',\n headerName: 'Address',\n flex: 1,\n },\n {\n field: 'accelerators',\n headerName: 'GPU Indexes',\n flex: 1,\n },\n {\n field: 'replica',\n headerName: 'Replica',\n flex: 1,\n },\n {\n field: 'url',\n headerName: 'Actions',\n flex: 1,\n minWidth: 200,\n sortable: false,\n filterable: false,\n disableColumnMenu: true,\n renderCell: ({ row }) => {\n const url = row.url\n const closeUrl = `${endPoint}/v1/models/` + url\n\n if (url === 'IS_LOADING') {\n return <div></div>\n }\n\n return (\n <Box\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'left',\n alignItems: 'left',\n }}\n >\n <button\n title=\"Terminate Model\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n setIsCallingApi(true)\n fetcher(closeUrl, {\n method: 'DELETE',\n })\n .then((response) => {\n response.json()\n })\n .then(() => {\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <DeleteOutlineOutlinedIcon />\n </Box>\n </button>\n </Box>\n )\n },\n },\n ]\n const imageModelColumns = [\n {\n field: 'id',\n headerName: 'ID',\n flex: 1,\n minWidth: 250,\n },\n {\n field: 'model_name',\n headerName: 'Name',\n flex: 1,\n },\n {\n field: 'address',\n headerName: 'Address',\n flex: 1,\n },\n {\n field: 'accelerators',\n headerName: 'GPU Indexes',\n flex: 1,\n },\n {\n field: 'url',\n headerName: 'Actions',\n flex: 1,\n minWidth: 200,\n sortable: false,\n filterable: false,\n disableColumnMenu: true,\n renderCell: ({ row }) => {\n //这个url指的是model_uid\n const url = row.url\n console.log('url: ' + url)\n const openUrl = `${endPoint}/` + url\n const closeUrl = `${endPoint}/v1/models/` + url\n const gradioUrl = `${endPoint}/v1/ui/images/` + url\n\n if (url === 'IS_LOADING') {\n return <div></div>\n }\n\n return (\n <Box\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'left',\n alignItems: 'left',\n }}\n >\n <button\n title=\"Launch Web UI\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n // Make sure no ongoing call\n return\n }\n\n setIsCallingApi(true)\n\n fetcher(openUrl, {\n method: 'HEAD',\n })\n .then((response) => {\n if (response.status === 404) {\n // If web UI doesn't exist (404 Not Found)\n console.log('UI does not exist, creating new...')\n return fetcher(gradioUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n model_type: row.model_type,\n model_family: row.model_family,\n model_id: row.id,\n controlnet: row.controlnet,\n model_revision: row.model_revision,\n model_name: row.model_name,\n model_ability: row.model_ability,\n }),\n })\n .then((response) => response.json())\n .then(() =>\n window.open(openUrl, '_blank', 'noopener noreferrer')\n )\n .finally(() => setIsCallingApi(false))\n } else if (response.ok) {\n // If web UI does exist\n console.log('UI exists, opening...')\n window.open(openUrl, '_blank', 'noopener noreferrer')\n setIsCallingApi(false)\n } else {\n // Other HTTP errors\n console.error(\n `Unexpected response status: ${response.status}`\n )\n setIsCallingApi(false)\n }\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <OpenInBrowserOutlinedIcon />\n </Box>\n </button>\n <button\n title=\"Terminate Model\"\n style={{\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '10px',\n }}\n onClick={() => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n setIsCallingApi(true)\n fetcher(closeUrl, {\n method: 'DELETE',\n })\n .then((response) => {\n response.json()\n })\n .then(() => {\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }}\n >\n <Box\n width=\"40px\"\n m=\"0 auto\"\n p=\"5px\"\n display=\"flex\"\n justifyContent=\"center\"\n borderRadius=\"4px\"\n style={{\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n }}\n >\n <DeleteOutlineOutlinedIcon />\n </Box>\n </button>\n </Box>\n )\n },\n },\n ]\n const audioModelColumns = embeddingModelColumns\n const videoModelColumns = embeddingModelColumns\n const rerankModelColumns = embeddingModelColumns\n const flexibleModelColumns = embeddingModelColumns\n\n const dataGridStyle = {\n '& .MuiDataGrid-cell': {\n borderBottom: 'none',\n },\n '& .MuiDataGrid-columnHeaders': {\n borderBottom: 'none',\n },\n '& .MuiDataGrid-columnHeaderTitle': {\n fontWeight: 'bold',\n },\n '& .MuiDataGrid-virtualScroller': {\n overflowX: 'visible !important',\n overflow: 'visible',\n },\n '& .MuiDataGrid-footerContainer': {\n borderTop: 'none',\n },\n 'border-width': '0px',\n }\n\n const noRowsOverlay = () => {\n return (\n <Stack height=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n No Running Models\n </Stack>\n )\n }\n\n const noResultsOverlay = () => {\n return (\n <Stack height=\"100%\" alignItems=\"center\" justifyContent=\"center\">\n No Running Models Matches\n </Stack>\n )\n }\n\n return (\n <Box\n sx={{\n height: '100%',\n width: '100%',\n padding: '20px 20px 0 20px',\n }}\n >\n <Title title=\"Running Models\" />\n <ErrorMessageSnackBar />\n <TabContext value={tabValue}>\n <Box sx={{ borderBottom: 1, borderColor: 'divider' }}>\n <TabList\n value={tabValue}\n onChange={handleTabChange}\n aria-label=\"tabs\"\n >\n <Tab label=\"Language Models\" value=\"/running_models/LLM\" />\n <Tab label=\"Embedding Models\" value=\"/running_models/embedding\" />\n <Tab label=\"Rerank models\" value=\"/running_models/rerank\" />\n <Tab label=\"Image models\" value=\"/running_models/image\" />\n <Tab label=\"Audio models\" value=\"/running_models/audio\" />\n <Tab label=\"Video models\" value=\"/running_models/video\" />\n <Tab label=\"Flexible models\" value=\"/running_models/flexible\" />\n </TabList>\n </Box>\n <TabPanel value=\"/running_models/LLM\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={llmData}\n columns={llmColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/embedding\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={embeddingModelData}\n columns={embeddingModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/rerank\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={rerankModelData}\n columns={rerankModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/image\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={imageModelData}\n columns={imageModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/audio\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={audioModelData}\n columns={audioModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/video\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={videoModelData}\n columns={videoModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"/running_models/flexible\" sx={{ padding: 0 }}>\n <Box sx={{ height: '100%', width: '100%' }}>\n <DataGrid\n rows={flexibleModelData}\n columns={flexibleModelColumns}\n autoHeight={true}\n sx={dataGridStyle}\n slots={{\n noRowsOverlay: noRowsOverlay,\n noResultsOverlay: noResultsOverlay,\n }}\n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