xinference 0.6.4__py3-none-any.whl → 0.7.0__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 (258) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +49 -62
  3. xinference/client/restful/restful_client.py +10 -1
  4. xinference/conftest.py +2 -2
  5. xinference/constants.py +10 -0
  6. xinference/core/model.py +33 -10
  7. xinference/core/resource.py +12 -11
  8. xinference/core/supervisor.py +22 -2
  9. xinference/core/worker.py +44 -16
  10. xinference/deploy/cmdline.py +19 -9
  11. xinference/deploy/local.py +9 -1
  12. xinference/deploy/supervisor.py +16 -3
  13. xinference/deploy/utils.py +1 -0
  14. xinference/deploy/worker.py +1 -1
  15. xinference/model/embedding/__init__.py +10 -0
  16. xinference/model/embedding/core.py +3 -0
  17. xinference/model/embedding/custom.py +5 -4
  18. xinference/model/embedding/model_spec.json +16 -0
  19. xinference/model/embedding/model_spec_modelscope.json +16 -0
  20. xinference/model/llm/__init__.py +22 -2
  21. xinference/model/llm/core.py +2 -2
  22. xinference/model/llm/ggml/chatglm.py +79 -15
  23. xinference/model/llm/ggml/llamacpp.py +2 -2
  24. xinference/model/llm/llm_family.json +99 -4
  25. xinference/model/llm/llm_family.py +54 -8
  26. xinference/model/llm/llm_family_modelscope.json +81 -2
  27. xinference/model/llm/pytorch/chatglm.py +95 -2
  28. xinference/model/llm/utils.py +12 -8
  29. xinference/model/llm/vllm/core.py +26 -5
  30. xinference/model/utils.py +25 -0
  31. xinference/types.py +64 -5
  32. xinference/utils.py +20 -0
  33. xinference/web/ui/build/asset-manifest.json +3 -3
  34. xinference/web/ui/build/index.html +1 -1
  35. xinference/web/ui/build/static/js/main.8126d441.js +3 -0
  36. xinference/web/ui/build/static/js/main.8126d441.js.map +1 -0
  37. xinference/web/ui/node_modules/.cache/babel-loader/06eb9846159adb398d44df0b0debc256a9fd9e8171a7d68f5c4ee4d655acfa45.json +1 -0
  38. xinference/web/ui/node_modules/.cache/babel-loader/0cccfbe5d963b8e31eb679f9d9677392839cedd04aa2956ac6b33cf19599d597.json +1 -0
  39. xinference/web/ui/node_modules/.cache/babel-loader/2f651cf60b1bde50c0601c7110f77dd44819fb6e2501ff748a631724d91445d4.json +1 -0
  40. xinference/web/ui/node_modules/.cache/babel-loader/3bda436576ecb05f81f7b6ec475d1cfaf03e2b3066e3a75902fe6e8c4773b43b.json +1 -0
  41. xinference/web/ui/node_modules/.cache/babel-loader/47887a9524ffeecdc2a7839dace146b24f97a5564fc3d431d6179ad2b153cf1f.json +1 -0
  42. xinference/web/ui/node_modules/.cache/babel-loader/48878f5178bad1a47757e011af41c974a7946efa29485506c4d19f25bf5d522d.json +1 -0
  43. xinference/web/ui/node_modules/.cache/babel-loader/59574eb63cfe9ed2e58d2f5a420e1ae54354e243a602e9bc73deae3147ed4f98.json +1 -0
  44. xinference/web/ui/node_modules/.cache/babel-loader/6a60ae66b29c2f3634fd081d369b9e63b4522fe18eb9e43e9979d1ff264b68ad.json +1 -0
  45. xinference/web/ui/node_modules/.cache/babel-loader/75a5abcbc92da335fdde530f5689194ec79a4b2345b8cba594f8904d3b88e3c6.json +1 -0
  46. xinference/web/ui/node_modules/.cache/babel-loader/84bfe7afede38da1f8ad569d891276fe4d66cfb87bf5c9ff7a113788ba62bb88.json +1 -0
  47. xinference/web/ui/node_modules/.cache/babel-loader/940ed05006583b955894e2b8f65a4a5ebf34f8149d747f59fae5131f17d65482.json +1 -0
  48. xinference/web/ui/node_modules/.cache/babel-loader/9c5f03db9aa88582a9b69b25c7f1acc78ba7fc61f743c9ed7399abb292d5dbde.json +1 -0
  49. xinference/web/ui/node_modules/.cache/babel-loader/a158a9ffa0c9b169aee53dd4a0c44501a596755b4e4f6ede7746d65a72e2a71f.json +1 -0
  50. xinference/web/ui/node_modules/.cache/babel-loader/a5e2e9f707eb7039bea096ca117d996b8f9cbc2a5613fd8e0c5b0094444ce23c.json +1 -0
  51. xinference/web/ui/node_modules/.cache/babel-loader/c02e70e9b9efcf3bd056606308104308d6a6ac559f2bc0b4454c11fb5874457c.json +1 -0
  52. xinference/web/ui/node_modules/.cache/babel-loader/e26750d9556e9741912333349e4da454c53dbfddbfc6002ab49518dcf02af745.json +1 -0
  53. xinference/web/ui/node_modules/.cache/babel-loader/e610aefd7000a3f8542a25cb66c64671cc8da18350de4e5b577102ba4bb78d65.json +1 -0
  54. xinference/web/ui/node_modules/.cache/babel-loader/ef42ec014d7bc373b874b2a1ff0dcd785490f125e913698bc049b0bd778e4d66.json +1 -0
  55. xinference/web/ui/node_modules/.cache/babel-loader/fe3eb4d76c79ca98833f686d642224eeeb94cc83ad14300d281623796d087f0a.json +1 -0
  56. xinference/web/ui/node_modules/.package-lock.json +1077 -405
  57. xinference/web/ui/node_modules/@eslint/eslintrc/node_modules/globals/globals.json +163 -3
  58. xinference/web/ui/node_modules/@eslint/eslintrc/node_modules/globals/package.json +1 -1
  59. xinference/web/ui/node_modules/@eslint/eslintrc/node_modules/ignore/package.json +64 -0
  60. xinference/web/ui/node_modules/@eslint/eslintrc/package.json +18 -37
  61. xinference/web/ui/node_modules/@eslint/js/package.json +1 -1
  62. xinference/web/ui/node_modules/@eslint-community/regexpp/package.json +9 -4
  63. xinference/web/ui/node_modules/@humanwhocodes/config-array/package.json +14 -14
  64. xinference/web/ui/node_modules/@rushstack/eslint-patch/package.json +6 -4
  65. xinference/web/ui/node_modules/@types/semver/package.json +15 -15
  66. xinference/web/ui/node_modules/@ungap/structured-clone/cjs/package.json +1 -0
  67. xinference/web/ui/node_modules/@ungap/structured-clone/package.json +53 -0
  68. xinference/web/ui/node_modules/ansi-colors/package.json +129 -0
  69. xinference/web/ui/node_modules/array-includes/package.json +8 -8
  70. xinference/web/ui/node_modules/array.prototype.findlastindex/package.json +120 -0
  71. xinference/web/ui/node_modules/array.prototype.flat/package.json +8 -8
  72. xinference/web/ui/node_modules/array.prototype.flatmap/package.json +8 -8
  73. xinference/web/ui/node_modules/arraybuffer.prototype.slice/package.json +103 -0
  74. xinference/web/ui/node_modules/ast-types-flow/package.json +2 -2
  75. xinference/web/ui/node_modules/astral-regex/package.json +33 -0
  76. xinference/web/ui/node_modules/asynciterator.prototype/package.json +72 -0
  77. xinference/web/ui/node_modules/axe-core/locales/_template.json +0 -12
  78. xinference/web/ui/node_modules/axe-core/package.json +1 -2
  79. xinference/web/ui/node_modules/axe-core/sri-history.json +0 -8
  80. xinference/web/ui/node_modules/call-bind/package.json +33 -23
  81. xinference/web/ui/node_modules/define-data-property/package.json +113 -0
  82. xinference/web/ui/node_modules/define-data-property/tsconfig.json +59 -0
  83. xinference/web/ui/node_modules/define-properties/package.json +5 -4
  84. xinference/web/ui/node_modules/enquirer/package.json +112 -0
  85. xinference/web/ui/node_modules/es-abstract/helpers/caseFolding.json +1430 -0
  86. xinference/web/ui/node_modules/es-abstract/package.json +29 -23
  87. xinference/web/ui/node_modules/es-iterator-helpers/index.json +17 -0
  88. xinference/web/ui/node_modules/es-iterator-helpers/package.json +185 -0
  89. xinference/web/ui/node_modules/eslint/conf/{rule-type-list.json → category-list.json} +9 -6
  90. xinference/web/ui/node_modules/eslint/node_modules/@babel/code-frame/package.json +25 -0
  91. xinference/web/ui/node_modules/eslint/node_modules/eslint-visitor-keys/lib/visitor-keys.json +289 -0
  92. xinference/web/ui/node_modules/eslint/node_modules/eslint-visitor-keys/package.json +39 -0
  93. xinference/web/ui/node_modules/eslint/node_modules/glob-parent/package.json +48 -0
  94. xinference/web/ui/node_modules/eslint/node_modules/ignore/package.json +64 -0
  95. xinference/web/ui/node_modules/eslint/package.json +53 -82
  96. xinference/web/ui/node_modules/eslint-config-prettier/package.json +13 -0
  97. xinference/web/ui/node_modules/eslint-import-resolver-node/package.json +3 -3
  98. xinference/web/ui/node_modules/eslint-plugin-import/package.json +22 -17
  99. xinference/web/ui/node_modules/eslint-plugin-jsx-a11y/package.json +25 -24
  100. xinference/web/ui/node_modules/eslint-plugin-simple-import-sort/package.json +23 -0
  101. xinference/web/ui/node_modules/eslint-plugin-testing-library/package.json +1 -1
  102. xinference/web/ui/node_modules/eslint-scope/package.json +19 -34
  103. xinference/web/ui/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.json +284 -0
  104. xinference/web/ui/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json +40 -0
  105. xinference/web/ui/node_modules/eslint-utils/package.json +65 -0
  106. xinference/web/ui/node_modules/eslint-visitor-keys/package.json +15 -15
  107. xinference/web/ui/node_modules/espree/node_modules/acorn/package.json +35 -0
  108. xinference/web/ui/node_modules/espree/node_modules/eslint-visitor-keys/lib/visitor-keys.json +284 -0
  109. xinference/web/ui/node_modules/espree/node_modules/eslint-visitor-keys/package.json +40 -0
  110. xinference/web/ui/node_modules/espree/package.json +27 -51
  111. xinference/web/ui/node_modules/function-bind/package.json +38 -14
  112. xinference/web/ui/node_modules/function.prototype.name/package.json +32 -13
  113. xinference/web/ui/node_modules/functional-red-black-tree/package.json +40 -0
  114. xinference/web/ui/node_modules/get-intrinsic/package.json +11 -11
  115. xinference/web/ui/node_modules/hasown/package.json +91 -0
  116. xinference/web/ui/node_modules/hasown/tsconfig.json +49 -0
  117. xinference/web/ui/node_modules/is-async-function/package.json +86 -0
  118. xinference/web/ui/node_modules/is-core-module/core.json +3 -3
  119. xinference/web/ui/node_modules/is-core-module/package.json +7 -7
  120. xinference/web/ui/node_modules/is-finalizationregistry/package.json +67 -0
  121. xinference/web/ui/node_modules/is-generator-function/package.json +87 -0
  122. xinference/web/ui/node_modules/is-typed-array/package.json +8 -10
  123. xinference/web/ui/node_modules/iterator.prototype/package.json +73 -0
  124. xinference/web/ui/node_modules/jsx-ast-utils/package.json +5 -5
  125. xinference/web/ui/node_modules/language-tags/package.json +48 -8
  126. xinference/web/ui/node_modules/lodash.truncate/package.json +17 -0
  127. xinference/web/ui/node_modules/object-inspect/package.json +8 -6
  128. xinference/web/ui/node_modules/object.entries/package.json +7 -7
  129. xinference/web/ui/node_modules/object.fromentries/package.json +7 -7
  130. xinference/web/ui/node_modules/object.groupby/package.json +83 -0
  131. xinference/web/ui/node_modules/object.values/package.json +7 -7
  132. xinference/web/ui/node_modules/prettier/package.json +21 -0
  133. xinference/web/ui/node_modules/progress/package.json +26 -0
  134. xinference/web/ui/node_modules/react-scripts/node_modules/@eslint/eslintrc/package.json +82 -0
  135. xinference/web/ui/node_modules/react-scripts/node_modules/@humanwhocodes/config-array/package.json +61 -0
  136. xinference/web/ui/node_modules/react-scripts/node_modules/@humanwhocodes/object-schema/package.json +33 -0
  137. xinference/web/ui/node_modules/react-scripts/node_modules/ansi-styles/package.json +56 -0
  138. xinference/web/ui/node_modules/react-scripts/node_modules/chalk/package.json +68 -0
  139. xinference/web/ui/node_modules/react-scripts/node_modules/color-convert/package.json +48 -0
  140. xinference/web/ui/node_modules/react-scripts/node_modules/color-name/package.json +28 -0
  141. xinference/web/ui/node_modules/react-scripts/node_modules/escape-string-regexp/package.json +38 -0
  142. xinference/web/ui/node_modules/react-scripts/node_modules/eslint/conf/replacements.json +22 -0
  143. xinference/web/ui/node_modules/react-scripts/node_modules/eslint/conf/rule-type-list.json +28 -0
  144. xinference/web/ui/node_modules/react-scripts/node_modules/eslint/package.json +179 -0
  145. xinference/web/ui/node_modules/react-scripts/node_modules/eslint-scope/package.json +63 -0
  146. xinference/web/ui/node_modules/react-scripts/node_modules/espree/package.json +88 -0
  147. xinference/web/ui/node_modules/react-scripts/node_modules/globals/globals.json +1974 -0
  148. xinference/web/ui/node_modules/react-scripts/node_modules/globals/package.json +55 -0
  149. xinference/web/ui/node_modules/react-scripts/node_modules/has-flag/package.json +46 -0
  150. xinference/web/ui/node_modules/react-scripts/node_modules/supports-color/package.json +53 -0
  151. xinference/web/ui/node_modules/react-scripts/node_modules/type-fest/package.json +58 -0
  152. xinference/web/ui/node_modules/reflect.getprototypeof/package.json +99 -0
  153. xinference/web/ui/node_modules/regexp.prototype.flags/package.json +8 -7
  154. xinference/web/ui/node_modules/regexpp/package.json +91 -0
  155. xinference/web/ui/node_modules/resolve/lib/core.json +4 -1
  156. xinference/web/ui/node_modules/resolve/package.json +9 -8
  157. xinference/web/ui/node_modules/resolve/test/resolver/multirepo/package.json +1 -1
  158. xinference/web/ui/node_modules/safe-array-concat/package.json +5 -5
  159. xinference/web/ui/node_modules/set-function-length/package.json +84 -0
  160. xinference/web/ui/node_modules/set-function-name/package.json +80 -0
  161. xinference/web/ui/node_modules/slice-ansi/node_modules/ansi-styles/package.json +56 -0
  162. xinference/web/ui/node_modules/slice-ansi/node_modules/color-convert/package.json +48 -0
  163. xinference/web/ui/node_modules/slice-ansi/node_modules/color-name/package.json +28 -0
  164. xinference/web/ui/node_modules/slice-ansi/package.json +52 -0
  165. xinference/web/ui/node_modules/string.prototype.trim/package.json +7 -7
  166. xinference/web/ui/node_modules/string.prototype.trimend/package.json +7 -7
  167. xinference/web/ui/node_modules/string.prototype.trimstart/package.json +7 -7
  168. xinference/web/ui/node_modules/table/dist/src/schemas/config.json +95 -0
  169. xinference/web/ui/node_modules/table/dist/src/schemas/shared.json +139 -0
  170. xinference/web/ui/node_modules/table/dist/src/schemas/streamConfig.json +25 -0
  171. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/data.json +13 -0
  172. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
  173. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
  174. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
  175. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
  176. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  177. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
  178. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
  179. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
  180. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
  181. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
  182. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  183. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  184. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  185. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
  186. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
  187. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
  188. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
  189. xinference/web/ui/node_modules/table/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
  190. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/data.json +13 -0
  191. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
  192. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
  193. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
  194. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
  195. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  196. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
  197. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
  198. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
  199. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
  200. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
  201. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  202. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  203. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  204. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
  205. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
  206. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
  207. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
  208. xinference/web/ui/node_modules/table/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
  209. xinference/web/ui/node_modules/table/node_modules/ajv/package.json +126 -0
  210. xinference/web/ui/node_modules/table/node_modules/json-schema-traverse/package.json +43 -0
  211. xinference/web/ui/node_modules/table/package.json +77 -0
  212. xinference/web/ui/node_modules/typed-array-buffer/package.json +73 -0
  213. xinference/web/ui/node_modules/typed-array-byte-length/package.json +98 -0
  214. xinference/web/ui/node_modules/v8-compile-cache/package.json +34 -0
  215. xinference/web/ui/node_modules/which-builtin-type/package.json +93 -0
  216. xinference/web/ui/node_modules/which-typed-array/package.json +4 -5
  217. xinference/web/ui/package-lock.json +1085 -406
  218. xinference/web/ui/package.json +10 -2
  219. {xinference-0.6.4.dist-info → xinference-0.7.0.dist-info}/METADATA +53 -36
  220. {xinference-0.6.4.dist-info → xinference-0.7.0.dist-info}/RECORD +232 -124
  221. {xinference-0.6.4.dist-info → xinference-0.7.0.dist-info}/WHEEL +1 -1
  222. xinference/web/ui/build/static/js/main.8ae3b6d9.js +0 -3
  223. xinference/web/ui/build/static/js/main.8ae3b6d9.js.map +0 -1
  224. xinference/web/ui/node_modules/.cache/babel-loader/06363becf51869c421a8b3e34b4e3f50aa0aac3d590446044f9412e379f4ebbe.json +0 -1
  225. xinference/web/ui/node_modules/.cache/babel-loader/2849edddeb99a8ecdda577e810eead74b8f8a291cdfbd987839d604666ed79d0.json +0 -1
  226. xinference/web/ui/node_modules/.cache/babel-loader/2c774712d327cdf0b192aaa22785ec380e9427c587350c33289828d99e9c4abc.json +0 -1
  227. xinference/web/ui/node_modules/.cache/babel-loader/34c578e50d3040519ca8dc28bf0f7fec8674c2d6c0fcc3e98401c0a3f9f013cf.json +0 -1
  228. xinference/web/ui/node_modules/.cache/babel-loader/5933910e7c33febbabc0297ef7ba80f5e53ed96aa125b6a44ff2910aec29ced1.json +0 -1
  229. xinference/web/ui/node_modules/.cache/babel-loader/5e18a8354ea03d22a967fd8cb2171aa798edcb3da5d66ab1fd3b9663affd0abe.json +0 -1
  230. xinference/web/ui/node_modules/.cache/babel-loader/717cd7c186ace4812d1e602bdd299d8dc507f072670cc43974d53aac2574df5d.json +0 -1
  231. xinference/web/ui/node_modules/.cache/babel-loader/82dd896a6674286c48c1ab9f9147dd6e542dccd99848d5b3133a38efba8bd7ee.json +0 -1
  232. xinference/web/ui/node_modules/.cache/babel-loader/a178cfde289ffd15fd54b1c80fd9d231ae0f9644db33acb02084e69b32bfee37.json +0 -1
  233. xinference/web/ui/node_modules/.cache/babel-loader/adaec65f73accce3171b51b0fbcbfd8d0cd83f81a2e1b28eb34148644875499a.json +0 -1
  234. xinference/web/ui/node_modules/.cache/babel-loader/ae8f44c77c2e6f79680fe32fb00174183cd867093ebbda967b8985c33cc10fa2.json +0 -1
  235. xinference/web/ui/node_modules/.cache/babel-loader/b10bd04b4d6e28bfcaaaab37b0a4c1986e87a5b7e62e5ce4d56019880ef26990.json +0 -1
  236. xinference/web/ui/node_modules/.cache/babel-loader/cfc5da1cedee985a556e04865affccb72d0f624cbfb73da348bbe8693e8a4983.json +0 -1
  237. xinference/web/ui/node_modules/.cache/babel-loader/eebd0123c4b4396737e56b9181406a9fd76b107dd32971d23b0de99f51dd38d6.json +0 -1
  238. xinference/web/ui/node_modules/@nicolo-ribaudo/eslint-scope-5-internals/node_modules/eslint-scope/package.json +0 -48
  239. xinference/web/ui/node_modules/@typescript-eslint/utils/node_modules/eslint-scope/package.json +0 -48
  240. xinference/web/ui/node_modules/@typescript-eslint/utils/node_modules/estraverse/package.json +0 -40
  241. xinference/web/ui/node_modules/eslint/node_modules/argparse/package.json +0 -31
  242. xinference/web/ui/node_modules/eslint/node_modules/js-yaml/package.json +0 -66
  243. xinference/web/ui/node_modules/eslint-plugin-jsx-a11y/node_modules/semver/package.json +0 -38
  244. xinference/web/ui/node_modules/function-bind/.jscs.json +0 -176
  245. xinference/web/ui/node_modules/resolve/test/resolver/malformed_package_json/package.json +0 -1
  246. xinference/web/ui/node_modules/webpack/node_modules/eslint-scope/package.json +0 -48
  247. xinference/web/ui/node_modules/webpack/node_modules/estraverse/package.json +0 -40
  248. /xinference/web/ui/build/static/js/{main.8ae3b6d9.js.LICENSE.txt → main.8126d441.js.LICENSE.txt} +0 -0
  249. /xinference/web/ui/node_modules/{@nicolo-ribaudo/eslint-scope-5-internals → eslint-scope}/node_modules/estraverse/package.json +0 -0
  250. /xinference/web/ui/node_modules/{@eslint/eslintrc → react-scripts}/node_modules/argparse/package.json +0 -0
  251. /xinference/web/ui/node_modules/{eslint → react-scripts/node_modules/eslint}/lib/cli-engine/formatters/formatters-meta.json +0 -0
  252. /xinference/web/ui/node_modules/{eslint-config-react-app → react-scripts/node_modules/eslint-config-react-app}/package.json +0 -0
  253. /xinference/web/ui/node_modules/{eslint-plugin-flowtype → react-scripts/node_modules/eslint-plugin-flowtype}/dist/configs/recommended.json +0 -0
  254. /xinference/web/ui/node_modules/{eslint-plugin-flowtype → react-scripts/node_modules/eslint-plugin-flowtype}/package.json +0 -0
  255. /xinference/web/ui/node_modules/{@eslint/eslintrc → react-scripts}/node_modules/js-yaml/package.json +0 -0
  256. {xinference-0.6.4.dist-info → xinference-0.7.0.dist-info}/LICENSE +0 -0
  257. {xinference-0.6.4.dist-info → xinference-0.7.0.dist-info}/entry_points.txt +0 -0
  258. {xinference-0.6.4.dist-info → xinference-0.7.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
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{ApiContext}from'../../components/apiContext';import Title from'../../components/Title';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('1'),_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),rerankModelData=_useState8[0],setRerankModelData=_useState8[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel,setIsUpdatingModel=_useContext2.setIsUpdatingModel;var endPoint=useContext(ApiContext).endPoint;var handleTabChange=function handleTabChange(event,newValue){setTabValue(newValue);};var update=function update(isCallingApi){if(isCallingApi){setLlmData([{id:'Loading, do not refresh page...',url:'IS_LOADING'}]);setEmbeddingModelData([{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'}]);}else{setIsUpdatingModel(true);fetch(\"\".concat(endPoint,\"/v1/models/\"),{method:'GET'}).then(function(response){return response.json();}).then(function(data){var newLlmData=[];var newEmbeddingModelData=[];var newImageModelData=[];var newRerankModelData=[];Object.entries(data).forEach(function(_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],value=_ref2[1];var newValue=_objectSpread(_objectSpread({},value),{},{id:key,url:key});if(newValue.model_type==='LLM'){newLlmData.push(newValue);}else if(newValue.model_type==='embedding'){newEmbeddingModelData.push(newValue);}else if(newValue.model_type==='image'){newImageModelData.push(newValue);}else if(newValue.model_type==='rerank'){newRerankModelData.push(newValue);}});setLlmData(newLlmData);setEmbeddingModelData(newEmbeddingModelData);setImageModelData(newImageModelData);setRerankModelData(newRerankModelData);setIsUpdatingModel(false);}).catch(function(error){console.error('Error:',error);setIsUpdatingModel(false);});}};useEffect(function(){update(isCallingApi);// eslint-disable-next-line\n},[isCallingApi]);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:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref3){var row=_ref3.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);fetch(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 fetch(gradioUrl,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({model_type:row.model_type,model_name:row.model_name,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);fetch(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:'url',headerName:'Actions',flex:1,minWidth:200,sortable:false,filterable:false,disableColumnMenu:true,renderCell:function renderCell(_ref4){var row=_ref4.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);fetch(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=embeddingModelColumns;var rerankModelColumns=embeddingModelColumns;return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsx(Title,{title:\"Running Models\"}),/*#__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:\"1\"}),/*#__PURE__*/_jsx(Tab,{label:\"Embedding Models\",value:\"2\"}),/*#__PURE__*/_jsx(Tab,{label:\"Image models\",value:\"3\"}),/*#__PURE__*/_jsx(Tab,{label:\"Rerank models\",value:\"4\"})]})}),/*#__PURE__*/_jsx(TabPanel,{value:\"1\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{m:\"40px 0 0 0\",height:\"30vh\",children:/*#__PURE__*/_jsx(DataGrid,{rows:llmData,columns:llmColumns,sx:{'& .MuiDataGrid-main':{width:'95% !important',overflow:'visible'},'& .MuiDataGrid-row':{background:'white',margin:'10px 0px'},'& .MuiDataGrid-cell':{borderBottom:'none'},'& .CustomWide-cell':{minWidth:'250px !important'},'& .MuiDataGrid-columnHeaders':{borderBottom:'none'},'& .MuiDataGrid-columnHeaderTitle':{fontWeight:'bold'},'& .MuiDataGrid-virtualScroller':{overflowX:'visible !important',overflow:'visible'},'& .MuiDataGrid-footerContainer':{borderTop:'none'},'border-width':'0px'},slots:{noRowsOverlay:function noRowsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models\"});},noResultsOverlay:function noResultsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models Matches\"});}}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"2\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{m:\"40px 0 0 0\",height:\"30vh\",children:/*#__PURE__*/_jsx(DataGrid,{rows:embeddingModelData,columns:embeddingModelColumns,sx:{'& .MuiDataGrid-main':{width:'95% !important',overflow:'visible'},'& .MuiDataGrid-row':{background:'white',margin:'10px 0px'},'& .MuiDataGrid-cell':{borderBottom:'none'},'& .CustomWide-cell':{minWidth:'250px !important'},'& .MuiDataGrid-columnHeaders':{borderBottom:'none'},'& .MuiDataGrid-columnHeaderTitle':{fontWeight:'bold'},'& .MuiDataGrid-virtualScroller':{overflowX:'visible !important',overflow:'visible'},'& .MuiDataGrid-footerContainer':{borderTop:'none'},'border-width':'0px'},slots:{noRowsOverlay:function noRowsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models\"});},noResultsOverlay:function noResultsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models Matches\"});}}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"3\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{m:\"40px 0 0 0\",height:\"30vh\",children:/*#__PURE__*/_jsx(DataGrid,{rows:imageModelData,columns:imageModelColumns,sx:{'& .MuiDataGrid-main':{width:'95% !important',overflow:'visible'},'& .MuiDataGrid-row':{background:'white',margin:'10px 0px'},'& .MuiDataGrid-cell':{borderBottom:'none'},'& .CustomWide-cell':{minWidth:'250px !important'},'& .MuiDataGrid-columnHeaders':{borderBottom:'none'},'& .MuiDataGrid-columnHeaderTitle':{fontWeight:'bold'},'& .MuiDataGrid-virtualScroller':{overflowX:'visible !important',overflow:'visible'},'& .MuiDataGrid-footerContainer':{borderTop:'none'},'border-width':'0px'},slots:{noRowsOverlay:function noRowsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models\"});},noResultsOverlay:function noResultsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models Matches\"});}}})})}),/*#__PURE__*/_jsx(TabPanel,{value:\"4\",sx:{padding:0},children:/*#__PURE__*/_jsx(Box,{m:\"40px 0 0 0\",height:\"30vh\",children:/*#__PURE__*/_jsx(DataGrid,{rows:rerankModelData,columns:rerankModelColumns,sx:{'& .MuiDataGrid-main':{width:'95% !important',overflow:'visible'},'& .MuiDataGrid-row':{background:'white',margin:'10px 0px'},'& .MuiDataGrid-cell':{borderBottom:'none'},'& .CustomWide-cell':{minWidth:'250px !important'},'& .MuiDataGrid-columnHeaders':{borderBottom:'none'},'& .MuiDataGrid-columnHeaderTitle':{fontWeight:'bold'},'& .MuiDataGrid-virtualScroller':{overflowX:'visible !important',overflow:'visible'},'& .MuiDataGrid-footerContainer':{borderTop:'none'},'border-width':'0px'},slots:{noRowsOverlay:function noRowsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models\"});},noResultsOverlay:function noResultsOverlay(){return/*#__PURE__*/_jsx(Stack,{height:\"100%\",alignItems:\"center\",justifyContent:\"center\",children:\"No Running Models Matches\"});}}})})})]})]});};export default RunningModels;","map":{"version":3,"names":["DeleteOutlineOutlinedIcon","OpenInBrowserOutlinedIcon","TabContext","TabList","TabPanel","Box","Stack","Tab","DataGrid","React","useContext","useEffect","useState","ApiContext","Title","jsx","_jsx","jsxs","_jsxs","RunningModels","_React$useState","_React$useState2","_slicedToArray","tabValue","setTabValue","_useState","_useState2","llmData","setLlmData","_useState3","_useState4","embeddingModelData","setEmbeddingModelData","_useState5","_useState6","imageModelData","setImageModelData","_useState7","_useState8","rerankModelData","setRerankModelData","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","setIsUpdatingModel","endPoint","handleTabChange","event","newValue","update","id","url","fetch","concat","method","then","response","json","data","newLlmData","newEmbeddingModelData","newImageModelData","newRerankModelData","Object","entries","forEach","_ref","_ref2","key","value","_objectSpread","model_type","push","catch","error","console","llmColumns","field","headerName","flex","minWidth","sortable","filterable","disableColumnMenu","renderCell","_ref3","row","openUrl","closeUrl","gradioUrl","style","width","display","justifyContent","alignItems","children","title","borderWidth","backgroundColor","paddingLeft","paddingRight","onClick","status","log","headers","body","JSON","stringify","model_name","model_size_in_billions","model_format","quantization","context_length","model_ability","model_description","model_lang","window","open","finally","ok","m","p","borderRadius","border","borderColor","embeddingModelColumns","_ref4","imageModelColumns","rerankModelColumns","sx","borderBottom","onChange","label","padding","height","rows","columns","overflow","background","margin","fontWeight","overflowX","borderTop","slots","noRowsOverlay","noResultsOverlay"],"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'\n\nimport { ApiContext } from '../../components/apiContext'\nimport Title from '../../components/Title'\n\nconst RunningModels = () => {\n const [tabValue, setTabValue] = React.useState('1')\n const [llmData, setLlmData] = useState([])\n const [embeddingModelData, setEmbeddingModelData] = useState([])\n const [imageModelData, setImageModelData] = useState([])\n const [rerankModelData, setRerankModelData] = useState([])\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel, setIsUpdatingModel } = useContext(ApiContext)\n const endPoint = useContext(ApiContext).endPoint\n\n const handleTabChange = (event, newValue) => {\n setTabValue(newValue)\n }\n\n const update = (isCallingApi) => {\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 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 } else {\n setIsUpdatingModel(true)\n fetch(`${endPoint}/v1/models/`, {\n method: 'GET',\n })\n .then((response) => response.json())\n .then((data) => {\n const newLlmData = []\n const newEmbeddingModelData = []\n const newImageModelData = []\n const newRerankModelData = []\n Object.entries(data).forEach(([key, value]) => {\n let newValue = {\n ...value,\n id: key,\n url: key,\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 === 'image') {\n newImageModelData.push(newValue)\n } else if (newValue.model_type === 'rerank') {\n newRerankModelData.push(newValue)\n }\n })\n setLlmData(newLlmData)\n setEmbeddingModelData(newEmbeddingModelData)\n setImageModelData(newImageModelData)\n setRerankModelData(newRerankModelData)\n setIsUpdatingModel(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsUpdatingModel(false)\n })\n }\n }\n\n useEffect(() => {\n update(isCallingApi)\n // eslint-disable-next-line\n }, [isCallingApi])\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: '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 fetch(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 fetch(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_name,\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 fetch(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: '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 fetch(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 imageModelColumns = embeddingModelColumns\n const rerankModelColumns = embeddingModelColumns\n\n return (\n <Box m=\"20px\">\n <Title title=\"Running Models\" />\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=\"1\" />\n <Tab label=\"Embedding Models\" value=\"2\" />\n <Tab label=\"Image models\" value=\"3\" />\n <Tab label=\"Rerank models\" value=\"4\" />\n </TabList>\n </Box>\n <TabPanel value=\"1\" sx={{ padding: 0 }}>\n <Box m=\"40px 0 0 0\" height=\"30vh\">\n <DataGrid\n rows={llmData}\n columns={llmColumns}\n sx={{\n '& .MuiDataGrid-main': {\n width: '95% !important',\n overflow: 'visible',\n },\n '& .MuiDataGrid-row': {\n background: 'white',\n margin: '10px 0px',\n },\n '& .MuiDataGrid-cell': {\n borderBottom: 'none',\n },\n '& .CustomWide-cell': {\n minWidth: '250px !important',\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 slots={{\n noRowsOverlay: () => (\n <Stack\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n No Running Models\n </Stack>\n ),\n noResultsOverlay: () => (\n <Stack\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n No Running Models Matches\n </Stack>\n ),\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"2\" sx={{ padding: 0 }}>\n <Box m=\"40px 0 0 0\" height=\"30vh\">\n <DataGrid\n rows={embeddingModelData}\n columns={embeddingModelColumns}\n sx={{\n '& .MuiDataGrid-main': {\n width: '95% !important',\n overflow: 'visible',\n },\n '& .MuiDataGrid-row': {\n background: 'white',\n margin: '10px 0px',\n },\n '& .MuiDataGrid-cell': {\n borderBottom: 'none',\n },\n '& .CustomWide-cell': {\n minWidth: '250px !important',\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 slots={{\n noRowsOverlay: () => (\n <Stack\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n No Running Models\n </Stack>\n ),\n noResultsOverlay: () => (\n <Stack\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n No Running Models Matches\n </Stack>\n ),\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"3\" sx={{ padding: 0 }}>\n <Box m=\"40px 0 0 0\" height=\"30vh\">\n <DataGrid\n rows={imageModelData}\n columns={imageModelColumns}\n sx={{\n '& .MuiDataGrid-main': {\n width: '95% !important',\n overflow: 'visible',\n },\n '& .MuiDataGrid-row': {\n background: 'white',\n margin: '10px 0px',\n },\n '& .MuiDataGrid-cell': {\n borderBottom: 'none',\n },\n '& .CustomWide-cell': {\n minWidth: '250px !important',\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 slots={{\n noRowsOverlay: () => (\n <Stack\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n No Running Models\n </Stack>\n ),\n noResultsOverlay: () => (\n <Stack\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n No Running Models Matches\n </Stack>\n ),\n }}\n />\n </Box>\n </TabPanel>\n <TabPanel value=\"4\" sx={{ padding: 0 }}>\n <Box m=\"40px 0 0 0\" height=\"30vh\">\n <DataGrid\n rows={rerankModelData}\n columns={rerankModelColumns}\n sx={{\n '& .MuiDataGrid-main': {\n width: '95% !important',\n overflow: 'visible',\n },\n '& .MuiDataGrid-row': {\n background: 'white',\n margin: '10px 0px',\n },\n '& .MuiDataGrid-cell': {\n borderBottom: 'none',\n },\n '& .CustomWide-cell': {\n minWidth: '250px !important',\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 slots={{\n noRowsOverlay: () => (\n <Stack\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n No Running Models\n </Stack>\n ),\n noResultsOverlay: () => (\n <Stack\n height=\"100%\"\n alignItems=\"center\"\n justifyContent=\"center\"\n >\n No Running Models Matches\n </Stack>\n ),\n }}\n />\n </Box>\n </TabPanel>\n </TabContext>\n </Box>\n )\n}\n\nexport default RunningModels\n"],"mappings":"yRAAA,MAAO,CAAAA,yBAAyB,KAAM,2CAA2C,CACjF,MAAO,CAAAC,yBAAyB,KAAM,2CAA2C,CACjF,OAASC,UAAU,CAAEC,OAAO,CAAEC,QAAQ,KAAQ,UAAU,CACxD,OAASC,GAAG,CAAEC,KAAK,CAAEC,GAAG,KAAQ,eAAe,CAC/C,OAASC,QAAQ,KAAQ,kBAAkB,CAC3C,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAE9D,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,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IAAA,CAACV,KAAK,EACJkI,MAAM,CAAC,MAAM,CACbxC,UAAU,CAAC,QAAQ,CACnBD,cAAc,CAAC,QAAQ,CAAAE,QAAA,CACxB,mBAED,CAAO,CAAC,EACT,CACDkD,gBAAgB,CAAE,SAAAA,iBAAA,qBAChBnI,IAAA,CAACV,KAAK,EACJkI,MAAM,CAAC,MAAM,CACbxC,UAAU,CAAC,QAAQ,CACnBD,cAAc,CAAC,QAAQ,CAAAE,QAAA,CACxB,2BAED,CAAO,CAAC,EAEZ,CAAE,CACH,CAAC,CACC,CAAC,CACE,CAAC,EACD,CAAC,EACV,CAAC,CAEV,CAAC,CAED,cAAe,CAAA9E,aAAa"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
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"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
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,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:'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(' ','_');console.log(link);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'){navigate(\"/\");setActive(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","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","console","log","onClick","open","ml","primary"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/MenuSide.js"],"sourcesContent":["import {\n AddBoxOutlined,\n ChevronRightOutlined,\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: '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 console.log(link)\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 navigate(`/`)\n setActive(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,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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untime from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.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{Box,FormControl,InputLabel,MenuItem,Select,TextField}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{ApiContext}from'../../components/apiContext';import ModelCard from'./modelCard';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var LaunchLLM=function LaunchLLM(){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;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;// States used for filtering\nvar _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var _useState5=useState('all'),_useState6=_slicedToArray(_useState5,2),modelAbility=_useState6[0],setModelAbility=_useState6[1];var _useState7=useState(-1),_useState8=_slicedToArray(_useState7,2),gpuAvailable=_useState8[0],setGPUAvailable=_useState8[1];var handleChange=function handleChange(event){setSearchTerm(event.target.value);};var handleAbilityChange=function handleAbilityChange(event){setModelAbility(event.target.value);};var filter=function filter(registration){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';var modelDescription=registration.model_description?registration.model_description.toLowerCase():'';if(!modelName.includes(searchTerm.toLowerCase())&&!modelDescription.includes(searchTerm.toLowerCase())){return false;}if(modelAbility&&modelAbility!=='all'){if(registration.model_ability.indexOf(modelAbility)<0){return false;}}return true;};var update=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var response,registrations,builtinRegistrations;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(isCallingApi||isUpdatingModel)){_context.next=2;break;}return _context.abrupt(\"return\");case 2:_context.prev=2;setIsCallingApi(true);_context.next=6;return fetch(\"\".concat(endPoint,\"/v1/model_registrations/LLM?detailed=true\"),{method:'GET'});case 6:response=_context.sent;_context.next=9;return response.json();case 9:registrations=_context.sent;builtinRegistrations=registrations.filter(function(v){return v.is_builtin;});setRegistrationData(builtinRegistrations);_context.next=17;break;case 14:_context.prev=14;_context.t0=_context[\"catch\"](2);console.error('Error:',_context.t0);case 17:_context.prev=17;setIsCallingApi(false);return _context.finish(17);case 20:case\"end\":return _context.stop();}},_callee,null,[[2,14,17,20]]);}));return function update(){return _ref.apply(this,arguments);};}();useEffect(function(){update();},[]);useEffect(function(){if(gpuAvailable===-1){fetch(endPoint+'/v1/cluster/devices',{method:'GET',headers:{'Content-Type':'application/json'}}).then(function(res){if(!res.ok){// Usually, if some errors happen here, check if the cluster is available\nres.json().then(function(errorData){setErrorMsg(\"Server error: \".concat(res.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{res.json().then(function(data){setGPUAvailable(parseInt(data,10));});}});}},[]);var style={display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',gridGap:'2rem 0rem'};return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:'grid',gridTemplateColumns:'150px 1fr',columnGap:'20px',margin:'30px 2rem'},children:[/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",children:[/*#__PURE__*/_jsx(InputLabel,{id:\"ability-select-label\",children:\"Model Ability\"}),/*#__PURE__*/_jsxs(Select,{id:\"ability\",labelId:\"ability-select-label\",label:\"Model Ability\",onChange:handleAbilityChange,value:modelAbility,size:\"small\",sx:{width:'150px'},children:[/*#__PURE__*/_jsx(MenuItem,{value:\"all\",children:\"all\"}),/*#__PURE__*/_jsx(MenuItem,{value:\"generate\",children:\"generate\"}),/*#__PURE__*/_jsx(MenuItem,{value:\"chat\",children:\"chat\"})]})]}),/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(TextField,{id:\"search\",type:\"search\",label:\"Search for model name and description\",value:searchTerm,onChange:handleChange,size:\"small\"})})]}),/*#__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});})})]});};export default LaunchLLM;","map":{"version":3,"names":["Box","FormControl","InputLabel","MenuItem","Select","TextField","React","useContext","useEffect","useState","ApiContext","ModelCard","jsx","_jsx","jsxs","_jsxs","LaunchLLM","endPoint","_useState","_useState2","_slicedToArray","registrationData","setRegistrationData","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","_useState3","_useState4","searchTerm","setSearchTerm","_useState5","_useState6","modelAbility","setModelAbility","_useState7","_useState8","gpuAvailable","setGPUAvailable","handleChange","event","target","value","handleAbilityChange","filter","registration","modelName","model_name","toLowerCase","modelDescription","model_description","includes","model_ability","indexOf","update","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","response","registrations","builtinRegistrations","wrap","_callee$","_context","prev","next","abrupt","fetch","concat","method","sent","json","v","is_builtin","t0","console","error","finish","stop","apply","arguments","headers","then","res","ok","errorData","status","detail","data","parseInt","style","display","gridTemplateColumns","paddingLeft","gridGap","m","children","columnGap","margin","variant","id","labelId","label","onChange","size","sx","width","type","map","filteredRegistration","url","modelData"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/launchLLM.js"],"sourcesContent":["import {\n Box,\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n TextField,\n} from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\n\nimport { ApiContext } from '../../components/apiContext'\nimport ModelCard from './modelCard'\n\nconst LaunchLLM = () => {\n let endPoint = useContext(ApiContext).endPoint\n const [registrationData, setRegistrationData] = useState([])\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n\n // States used for filtering\n const [searchTerm, setSearchTerm] = useState('')\n\n const [modelAbility, setModelAbility] = useState('all')\n const [gpuAvailable, setGPUAvailable] = useState(-1)\n\n const handleChange = (event) => {\n setSearchTerm(event.target.value)\n }\n\n const handleAbilityChange = (event) => {\n setModelAbility(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 const modelDescription = registration.model_description\n ? registration.model_description.toLowerCase()\n : ''\n\n if (\n !modelName.includes(searchTerm.toLowerCase()) &&\n !modelDescription.includes(searchTerm.toLowerCase())\n ) {\n return false\n }\n if (modelAbility && modelAbility !== 'all') {\n if (registration.model_ability.indexOf(modelAbility) < 0) {\n return false\n }\n }\n return true\n }\n\n const update = async () => {\n if (isCallingApi || isUpdatingModel) return\n\n try {\n setIsCallingApi(true)\n\n const response = await fetch(\n `${endPoint}/v1/model_registrations/LLM?detailed=true`,\n {\n method: 'GET',\n }\n )\n\n const registrations = await response.json()\n const builtinRegistrations = registrations.filter((v) => v.is_builtin)\n\n setRegistrationData(builtinRegistrations)\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n useEffect(() => {\n update()\n }, [])\n\n useEffect(() => {\n if (gpuAvailable === -1) {\n fetch(endPoint + '/v1/cluster/devices', {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n }).then((res) => {\n if (!res.ok) {\n // Usually, if some errors happen here, check if the cluster is available\n res.json().then((errorData) => {\n setErrorMsg(\n `Server error: ${res.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n res.json().then((data) => {\n setGPUAvailable(parseInt(data, 10))\n })\n }\n })\n }\n }, [])\n\n const style = {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(300px, 1fr))',\n paddingLeft: '2rem',\n gridGap: '2rem 0rem',\n }\n\n return (\n <Box m=\"20px\">\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: '150px 1fr',\n columnGap: '20px',\n margin: '30px 2rem',\n }}\n >\n <FormControl variant=\"outlined\" margin=\"normal\">\n <InputLabel id=\"ability-select-label\">Model Ability</InputLabel>\n <Select\n id=\"ability\"\n labelId=\"ability-select-label\"\n label=\"Model Ability\"\n onChange={handleAbilityChange}\n value={modelAbility}\n size=\"small\"\n sx={{ width: '150px' }}\n >\n <MenuItem value=\"all\">all</MenuItem>\n <MenuItem value=\"generate\">generate</MenuItem>\n <MenuItem value=\"chat\">chat</MenuItem>\n </Select>\n </FormControl>\n <FormControl variant=\"outlined\" margin=\"normal\">\n <TextField\n id=\"search\"\n type=\"search\"\n label=\"Search for model name and description\"\n value={searchTerm}\n onChange={handleChange}\n size=\"small\"\n />\n </FormControl>\n </div>\n <div style={style}>\n {registrationData\n .filter((registration) => filter(registration))\n .map((filteredRegistration) => (\n <ModelCard\n url={endPoint}\n modelData={filteredRegistration}\n gpuAvailable={gpuAvailable}\n />\n ))}\n </div>\n </Box>\n )\n}\n\nexport default LaunchLLM\n"],"mappings":"ubAAA,OACEA,GAAG,CACHC,WAAW,CACXC,UAAU,CACVC,QAAQ,CACRC,MAAM,CACNC,SAAS,KACJ,eAAe,CACtB,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAE9D,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,SAAS,KAAM,aAAa,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,K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,QAAQ,EAAC0C,KAAK,CAAC,KAAK,CAAAwD,QAAA,CAAC,KAAG,CAAU,CAAC,cACpCxF,IAAA,CAACV,QAAQ,EAAC0C,KAAK,CAAC,UAAU,CAAAwD,QAAA,CAAC,UAAQ,CAAU,CAAC,cAC9CxF,IAAA,CAACV,QAAQ,EAAC0C,KAAK,CAAC,MAAM,CAAAwD,QAAA,CAAC,MAAI,CAAU,CAAC,EAChC,CAAC,EACE,CAAC,cACdxF,IAAA,CAACZ,WAAW,EAACuG,OAAO,CAAC,UAAU,CAACD,MAAM,CAAC,QAAQ,CAAAF,QAAA,cAC7CxF,IAAA,CAACR,SAAS,EACRoG,EAAE,CAAC,QAAQ,CACXO,IAAI,CAAC,QAAQ,CACbL,KAAK,CAAC,uCAAuC,CAC7C9D,KAAK,CAAEb,UAAW,CAClB4E,QAAQ,CAAElE,YAAa,CACvBmE,IAAI,CAAC,OAAO,CACb,CAAC,CACS,CAAC,EACX,CAAC,cACNhG,IAAA,QAAKkF,KAAK,CAAEA,KAAM,CAAAM,QAAA,CACfhF,gBAAgB,CACd0B,MAAM,CAAC,SAACC,YAAY,QAAK,CAAAD,MAAM,CAACC,YAAY,CAAC,GAAC,CAC9CiE,GAAG,CAAC,SAACC,oBAAoB,qBACxBrG,IAAA,CAACF,SAAS,EACRwG,GAAG,CAAElG,QAAS,CACdmG,SAAS,CAAEF,oBAAqB,CAChC1E,YAAY,CAAEA,YAAa,CAC5B,CAAC,EACH,CAAC,CACD,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAAxB,SAAS"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import React from'react';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(App,{})}));","map":{"version":3,"names":["React","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 ReactDOM from 'react-dom/client'\n\nimport App from './App'\n\nconst root = ReactDOM.createRoot(document.getElementById('root'))\nroot.render(\n <React.StrictMode>\n <App />\n </React.StrictMode>\n)\n"],"mappings":"AAAA,MAAO,CAAAA,KAAK,KAAM,OAAO,CACzB,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,CAACJ,KAAK,CAACU,UAAU,EAAAC,QAAA,cACfP,IAAA,CAACF,GAAG,GAAE,CAAC,CACS,CACpB,CAAC"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
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{RocketLaunchOutlined,UndoOutlined}from'@mui/icons-material';import DeleteIcon from'@mui/icons-material/Delete';import{Box,Chip,CircularProgress,Stack}from'@mui/material';import IconButton from'@mui/material/IconButton';import React,{useContext,useEffect,useState}from'react';import{v1 as uuidv1}from'uuid';import{ApiContext}from'../../components/apiContext';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var CARD_HEIGHT=270;var CARD_WIDTH=270;var EmbeddingCard=function EmbeddingCard(_ref){var url=_ref.url,modelData=_ref.modelData,_ref$cardHeight=_ref.cardHeight,cardHeight=_ref$cardHeight===void 0?CARD_HEIGHT:_ref$cardHeight,_ref$is_custom=_ref.is_custom,is_custom=_ref$is_custom===void 0?false:_ref$is_custom;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),hover=_useState2[0],setHover=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),selected=_useState4[0],setSelected=_useState4[1];var _useState5=useState(false),_useState6=_slicedToArray(_useState5,2),customDeleted=_useState6[0],setCustomDeleted=_useState6[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;// UseEffects for parameter selection, change options based on previous selections\nuseEffect(function(){},[modelData]);var launchModel=function launchModel(url){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);var uuid=uuidv1();var modelDataWithID={model_uid:uuid,model_name:modelData.model_name,model_type:'embedding'};// First fetch request to initiate the model\nfetch(url+'/v1/models',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(modelDataWithID)}).then(function(res){if(!res.ok){res.json().then(function(errData){return setErrorMsg(\"Server error: \".concat(res.status,\" - \").concat(errData.detail||'Unknown error'));});}else{window.open(url+'/ui/#/running_models','_blank','noreferrer');}setIsCallingApi(false);}).catch(function(error){console.error('Error:',error);setIsCallingApi(false);});};var styles={container:{display:'block',position:'relative',width:\"\".concat(CARD_WIDTH,\"px\"),height:\"\".concat(cardHeight,\"px\"),border:'1px solid #ddd',borderRadius:'20px',background:'white',overflow:'hidden'},containerSelected:{display:'block',position:'relative',width:\"\".concat(CARD_WIDTH,\"px\"),height:\"\".concat(cardHeight,\"px\"),border:'1px solid #ddd',borderRadius:'20px',background:'white',overflow:'hidden',boxShadow:'0 0 2px #00000099'},descriptionCard:{position:'relative',top:'-1px',left:'-1px',width:\"\".concat(CARD_WIDTH,\"px\"),height:\"\".concat(cardHeight,\"px\"),border:'1px solid #ddd',padding:'20px',borderRadius:'20px',background:'white'},parameterCard:{position:'relative',top:\"-\".concat(cardHeight+1,\"px\"),left:'-1px',width:\"\".concat(CARD_WIDTH,\"px\"),height:\"\".concat(cardHeight,\"px\"),border:'1px solid #ddd',padding:'20px',borderRadius:'20px',background:'white'},img:{display:'block',margin:'0 auto',width:'180px',height:'180px',objectFit:'cover',borderRadius:'10px'},titleContainer:{minHeight:'120px'},h2:{margin:'10px 10px',fontSize:'20px'},buttonsContainer:{display:'flex',margin:'0 auto',marginTop:'120px',border:'none',justifyContent:'space-between',alignItems:'center'},buttonContainer:{width:'45%',borderWidth:'0px',backgroundColor:'transparent',paddingLeft:'0px',paddingRight:'0px'},buttonItem:{width:'100%',margin:'0 auto',padding:'5px',display:'flex',justifyContent:'center',borderRadius:'4px',border:'1px solid #e5e7eb',borderWidth:'1px',borderColor:'#e5e7eb'},instructionText:{fontSize:'12px',color:'#666666',fontStyle:'italic',margin:'10px 0',textAlign:'center'},slideIn:{transform:'translateX(0%)',transition:'transform 0.2s ease-in-out'},slideOut:{transform:'translateX(100%)',transition:'transform 0.2s ease-in-out'},iconRow:{display:'flex',justifyContent:'space-between',alignItems:'center'},iconItem:{display:'flex',flexDirection:'column',alignItems:'center',margin:'20px'},boldIconText:{fontWeight:'bold',fontSize:'1.2em'},muiIcon:{fontSize:'1.5em'},smallText:{fontSize:'0.8em'},langRow:{margin:'2px 5px 40px 5px'}};var handeCustomDelete=function handeCustomDelete(e){e.stopPropagation();fetch(url+\"/v1/model_registrations/embedding/\".concat(modelData.model_name),{method:'DELETE',headers:{'Content-Type':'application/json'}}).then(function(){return setCustomDeleted(true);}).catch(console.error);};// Set two different states based on mouse hover\nreturn/*#__PURE__*/_jsxs(Box,{style:hover?styles.containerSelected:styles.container,onMouseEnter:function onMouseEnter(){return setHover(true);},onMouseLeave:function onMouseLeave(){return setHover(false);},onClick:function onClick(){if(!selected&&!customDeleted){setSelected(true);}},children:[/*#__PURE__*/_jsxs(Box,{style:styles.descriptionCard,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.titleContainer,children:[is_custom&&/*#__PURE__*/_jsxs(Stack,{direction:\"row\",justifyContent:\"space-evenly\",alignItems:\"center\",spacing:1,children:[/*#__PURE__*/_jsx(\"h2\",{style:styles.h2,children:modelData.model_name}),/*#__PURE__*/_jsx(IconButton,{\"aria-label\":\"delete\",onClick:handeCustomDelete,disabled:customDeleted,children:/*#__PURE__*/_jsx(DeleteIcon,{})})]}),!is_custom&&/*#__PURE__*/_jsx(\"h2\",{style:styles.h2,children:modelData.model_name}),/*#__PURE__*/_jsxs(\"div\",{style:styles.langRow,children:[function(){if(modelData.language.includes('en')){return/*#__PURE__*/_jsx(Chip,{label:\"EN\",variant:\"outlined\",size:\"small\",sx:{marginRight:'10px'}});}}(),function(){if(modelData.language.includes('zh')){return/*#__PURE__*/_jsx(Chip,{label:\"ZH\",variant:\"outlined\",size:\"small\"});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\",sx:{marginLeft:'10px'}});}}()]})]}),/*#__PURE__*/_jsxs(\"div\",{style:styles.iconRow,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(\"span\",{style:styles.boldIconText,children:modelData.dimensions}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"dimensions\"})]}),/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(\"span\",{style:styles.boldIconText,children:modelData.max_tokens}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"max tokens\"})]})]}),hover?/*#__PURE__*/_jsx(\"p\",{style:styles.instructionText,children:\"Click with mouse to launch the model\"}):/*#__PURE__*/_jsx(\"p\",{style:styles.instructionText})]}),/*#__PURE__*/_jsxs(Box,{style:selected?_objectSpread(_objectSpread({},styles.parameterCard),styles.slideIn):_objectSpread(_objectSpread({},styles.parameterCard),styles.slideOut),children:[/*#__PURE__*/_jsx(\"h2\",{style:styles.h2,children:modelData.model_name}),/*#__PURE__*/_jsxs(Box,{style:styles.buttonsContainer,children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch Embedding\",style:styles.buttonContainer,onClick:function onClick(){return launchModel(url,modelData);},disabled:isCallingApi||isUpdatingModel||!modelData,children:function(){if(isCallingApi||isUpdatingModel){return/*#__PURE__*/_jsx(Box,{style:_objectSpread(_objectSpread({},styles.buttonItem),{},{backgroundColor:'#f2f2f2'}),children:/*#__PURE__*/_jsx(CircularProgress,{size:\"20px\",sx:{color:'#000000'}})});}else if(!modelData){return/*#__PURE__*/_jsx(Box,{style:_objectSpread(_objectSpread({},styles.buttonItem),{},{backgroundColor:'#f2f2f2'}),children:/*#__PURE__*/_jsx(RocketLaunchOutlined,{size:\"20px\"})});}else{return/*#__PURE__*/_jsx(Box,{style:styles.buttonItem,children:/*#__PURE__*/_jsx(RocketLaunchOutlined,{color:\"#000000\",size:\"20px\"})});}}()}),/*#__PURE__*/_jsx(\"button\",{title:\"Launch Embedding\",style:styles.buttonContainer,onClick:function onClick(){return setSelected(false);},children:/*#__PURE__*/_jsx(Box,{style:styles.buttonItem,children:/*#__PURE__*/_jsx(UndoOutlined,{color:\"#000000\",size:\"20px\"})})})]})]})]});};export default EmbeddingCard;","map":{"version":3,"names":["RocketLaunchOutlined","UndoOutlined","DeleteIcon","Box","Chip","CircularProgress","Stack","IconButton","React","useContext","useEffect","useState","v1","uuidv1","ApiContext","jsx","_jsx","jsxs","_jsxs","CARD_HEIGHT","CARD_WIDTH","EmbeddingCard","_ref","url","modelData","_ref$cardHeight","cardHeight","_ref$is_custom","is_custom","_useState","_useState2","_slicedToArray","hover","setHover","_useState3","_useState4","selected","setSelected","_useState5","_useState6","customDeleted","setCustomDeleted","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","launchModel","uuid","modelDataWithID","model_uid","model_name","model_type","fetch","method","headers","body","JSON","stringify","then","res","ok","json","errData","concat","status","detail","window","open","catch","error","console","styles","container","display","position","width","height","border","borderRadius","background","overflow","containerSelected","boxShadow","descriptionCard","top","left","padding","parameterCard","img","margin","objectFit","titleContainer","minHeight","h2","fontSize","buttonsContainer","marginTop","justifyContent","alignItems","buttonContainer","borderWidth","backgroundColor","paddingLeft","paddingRight","buttonItem","borderColor","instructionText","color","fontStyle","textAlign","slideIn","transform","transition","slideOut","iconRow","iconItem","flexDirection","boldIconText","fontWeight","muiIcon","smallText","langRow","handeCustomDelete","e","stopPropagation","style","onMouseEnter","onMouseLeave","onClick","children","direction","spacing","disabled","language","includes","label","variant","size","sx","marginRight","marginLeft","dimensions","max_tokens","_objectSpread","title"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/embeddingCard.js"],"sourcesContent":["import { RocketLaunchOutlined, UndoOutlined } from '@mui/icons-material'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport { Box, Chip, CircularProgress, Stack } from '@mui/material'\nimport IconButton from '@mui/material/IconButton'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { v1 as uuidv1 } from 'uuid'\n\nimport { ApiContext } from '../../components/apiContext'\n\nconst CARD_HEIGHT = 270\nconst CARD_WIDTH = 270\n\nconst EmbeddingCard = ({\n url,\n modelData,\n cardHeight = CARD_HEIGHT,\n is_custom = false,\n}) => {\n const [hover, setHover] = useState(false)\n const [selected, setSelected] = useState(false)\n const [customDeleted, setCustomDeleted] = useState(false)\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n\n // UseEffects for parameter selection, change options based on previous selections\n useEffect(() => {}, [modelData])\n\n const launchModel = (url) => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n\n setIsCallingApi(true)\n\n const uuid = uuidv1()\n const modelDataWithID = {\n model_uid: uuid,\n model_name: modelData.model_name,\n model_type: 'embedding',\n }\n\n // First fetch request to initiate the model\n fetch(url + '/v1/models', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(modelDataWithID),\n })\n .then((res) => {\n if (!res.ok) {\n res\n .json()\n .then((errData) =>\n setErrorMsg(\n `Server error: ${res.status} - ${\n errData.detail || 'Unknown error'\n }`\n )\n )\n } else {\n window.open(url + '/ui/#/running_models', '_blank', 'noreferrer')\n }\n setIsCallingApi(false)\n })\n .catch((error) => {\n console.error('Error:', error)\n setIsCallingApi(false)\n })\n }\n\n const styles = {\n container: {\n display: 'block',\n position: 'relative',\n width: `${CARD_WIDTH}px`,\n height: `${cardHeight}px`,\n border: '1px solid #ddd',\n borderRadius: '20px',\n background: 'white',\n overflow: 'hidden',\n },\n containerSelected: {\n display: 'block',\n position: 'relative',\n width: `${CARD_WIDTH}px`,\n height: `${cardHeight}px`,\n border: '1px solid #ddd',\n borderRadius: '20px',\n background: 'white',\n overflow: 'hidden',\n boxShadow: '0 0 2px #00000099',\n },\n descriptionCard: {\n position: 'relative',\n top: '-1px',\n left: '-1px',\n width: `${CARD_WIDTH}px`,\n height: `${cardHeight}px`,\n border: '1px solid #ddd',\n padding: '20px',\n borderRadius: '20px',\n background: 'white',\n },\n parameterCard: {\n position: 'relative',\n top: `-${cardHeight + 1}px`,\n left: '-1px',\n width: `${CARD_WIDTH}px`,\n height: `${cardHeight}px`,\n border: '1px solid #ddd',\n padding: '20px',\n borderRadius: '20px',\n background: 'white',\n },\n img: {\n display: 'block',\n margin: '0 auto',\n width: '180px',\n height: '180px',\n objectFit: 'cover',\n borderRadius: '10px',\n },\n titleContainer: {\n minHeight: '120px',\n },\n h2: {\n margin: '10px 10px',\n fontSize: '20px',\n },\n buttonsContainer: {\n display: 'flex',\n margin: '0 auto',\n marginTop: '120px',\n border: 'none',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n buttonContainer: {\n width: '45%',\n borderWidth: '0px',\n backgroundColor: 'transparent',\n paddingLeft: '0px',\n paddingRight: '0px',\n },\n buttonItem: {\n width: '100%',\n margin: '0 auto',\n padding: '5px',\n display: 'flex',\n justifyContent: 'center',\n borderRadius: '4px',\n border: '1px solid #e5e7eb',\n borderWidth: '1px',\n borderColor: '#e5e7eb',\n },\n instructionText: {\n fontSize: '12px',\n color: '#666666',\n fontStyle: 'italic',\n margin: '10px 0',\n textAlign: 'center',\n },\n slideIn: {\n transform: 'translateX(0%)',\n transition: 'transform 0.2s ease-in-out',\n },\n slideOut: {\n transform: 'translateX(100%)',\n transition: 'transform 0.2s ease-in-out',\n },\n iconRow: {\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'center',\n },\n iconItem: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n margin: '20px',\n },\n boldIconText: {\n fontWeight: 'bold',\n fontSize: '1.2em',\n },\n muiIcon: {\n fontSize: '1.5em',\n },\n smallText: {\n fontSize: '0.8em',\n },\n langRow: {\n margin: '2px 5px 40px 5px',\n },\n }\n\n const handeCustomDelete = (e) => {\n e.stopPropagation()\n fetch(url + `/v1/model_registrations/embedding/${modelData.model_name}`, {\n method: 'DELETE',\n headers: {\n 'Content-Type': 'application/json',\n },\n })\n .then(() => setCustomDeleted(true))\n .catch(console.error)\n }\n\n // Set two different states based on mouse hover\n return (\n <Box\n style={hover ? styles.containerSelected : styles.container}\n onMouseEnter={() => setHover(true)}\n onMouseLeave={() => setHover(false)}\n onClick={() => {\n if (!selected && !customDeleted) {\n setSelected(true)\n }\n }}\n >\n {/* First state: show description page */}\n <Box style={styles.descriptionCard}>\n <div style={styles.titleContainer}>\n {is_custom && (\n <Stack\n direction=\"row\"\n justifyContent=\"space-evenly\"\n alignItems=\"center\"\n spacing={1}\n >\n <h2 style={styles.h2}>{modelData.model_name}</h2>\n <IconButton\n aria-label=\"delete\"\n onClick={handeCustomDelete}\n disabled={customDeleted}\n >\n <DeleteIcon />\n </IconButton>\n </Stack>\n )}\n {!is_custom && <h2 style={styles.h2}>{modelData.model_name}</h2>}\n <div style={styles.langRow}>\n {(() => {\n if (modelData.language.includes('en')) {\n return (\n <Chip\n label=\"EN\"\n variant=\"outlined\"\n size=\"small\"\n sx={{ marginRight: '10px' }}\n />\n )\n }\n })()}\n {(() => {\n if (modelData.language.includes('zh')) {\n return <Chip label=\"ZH\" variant=\"outlined\" size=\"small\" />\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return (\n <Chip\n label=\"Deleted\"\n variant=\"outlined\"\n size=\"small\"\n sx={{ marginLeft: '10px' }}\n />\n )\n }\n })()}\n </div>\n </div>\n <div style={styles.iconRow}>\n <div style={styles.iconItem}>\n <span style={styles.boldIconText}>{modelData.dimensions}</span>\n <small style={styles.smallText}>dimensions</small>\n </div>\n <div style={styles.iconItem}>\n <span style={styles.boldIconText}>{modelData.max_tokens}</span>\n <small style={styles.smallText}>max tokens</small>\n </div>\n </div>\n {hover ? (\n <p style={styles.instructionText}>\n Click with mouse to launch the model\n </p>\n ) : (\n <p style={styles.instructionText}></p>\n )}\n </Box>\n {/* Second state: show parameter selection page */}\n <Box\n style={\n selected\n ? { ...styles.parameterCard, ...styles.slideIn }\n : { ...styles.parameterCard, ...styles.slideOut }\n }\n >\n <h2 style={styles.h2}>{modelData.model_name}</h2>\n <Box style={styles.buttonsContainer}>\n <button\n title=\"Launch Embedding\"\n style={styles.buttonContainer}\n onClick={() => launchModel(url, modelData)}\n disabled={isCallingApi || isUpdatingModel || !modelData}\n >\n {(() => {\n if (isCallingApi || isUpdatingModel) {\n return (\n <Box\n style={{ ...styles.buttonItem, backgroundColor: '#f2f2f2' }}\n >\n <CircularProgress\n size=\"20px\"\n sx={{\n color: '#000000',\n }}\n />\n </Box>\n )\n } else if (!modelData) {\n return (\n <Box\n style={{ ...styles.buttonItem, backgroundColor: '#f2f2f2' }}\n >\n <RocketLaunchOutlined size=\"20px\" />\n </Box>\n )\n } else {\n return (\n <Box style={styles.buttonItem}>\n <RocketLaunchOutlined color=\"#000000\" size=\"20px\" />\n </Box>\n )\n }\n })()}\n </button>\n <button\n title=\"Launch Embedding\"\n style={styles.buttonContainer}\n onClick={() => setSelected(false)}\n >\n <Box style={styles.buttonItem}>\n <UndoOutlined color=\"#000000\" size=\"20px\" />\n </Box>\n </button>\n </Box>\n </Box>\n </Box>\n )\n}\n\nexport default EmbeddingCard\n"],"mappings":"yRAAA,OAASA,oBAAoB,CAAEC,YAAY,KAAQ,qBAAqB,CACxE,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OAASC,GAAG,CAAEC,IAAI,CAAEC,gBAAgB,CAAEC,KAAK,KAAQ,eAAe,CAClE,MAAO,CAAAC,UAAU,KAAM,0BAA0B,CACjD,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,EAAE,GAAI,CAAAC,MAAM,KAAQ,MAAM,CAEnC,OAASC,UAAU,KAAQ,6BAA6B,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAExD,GAAM,CAAAC,WAAW,CAAG,GAAG,CACvB,GAAM,CAAAC,UAAU,CAAG,GAAG,CAEtB,GAAM,CAAAC,aAAa,CAAG,QAAhB,CAAAA,aAAaA,CAAAC,IAAA,CAKb,IAJJ,CAAAC,GAAG,CAAAD,IAAA,CAAHC,GAAG,CACHC,SAAS,CAAAF,IAAA,CAATE,SAAS,CAAAC,eAAA,CAAAH,IAAA,CACTI,UAAU,CAAVA,UAAU,CAAAD,eAAA,UAAGN,WAAW,CAAAM,eAAA,CAAAE,cAAA,CAAAL,IAAA,CACxBM,SAAS,CAATA,SAAS,CAAAD,cAAA,UAAG,KAAK,CAAAA,cAAA,CAEjB,IAAAE,SAAA,CAA0BlB,QAAQ,CAAC,KAAK,CAAC,CAAAmB,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAAlCG,KAAK,CAAAF,UAAA,IAAEG,QAAQ,CAAAH,UAAA,IACtB,IAAAI,UAAA,CAAgCvB,QAAQ,CAAC,KAAK,CAAC,CAAAwB,UAAA,CAAAJ,c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A,CAAC,EACN,CAAC,EACH,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAAvH,aAAa"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
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{HashRouter,Route,Routes}from'react-router-dom';import{ApiContextProvider}from'./components/apiContext';import Layout from'./scenes/_layout';import LaunchModel from'./scenes/launch_model';import RegisterModel from'./scenes/register_model';import RunningModels from'./scenes/running_models';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];return/*#__PURE__*/_jsx(\"div\",{className:\"app\",children:/*#__PURE__*/_jsx(HashRouter,{children:/*#__PURE__*/_jsx(ThemeProvider,{theme:theme,children:/*#__PURE__*/_jsxs(ApiContextProvider,{children:[/*#__PURE__*/_jsx(CssBaseline,{}),/*#__PURE__*/_jsx(Routes,{children:/*#__PURE__*/_jsxs(Route,{element:/*#__PURE__*/_jsx(Layout,{}),children:[/*#__PURE__*/_jsx(Route,{path:\"/\",element:/*#__PURE__*/_jsx(LaunchModel,{})}),/*#__PURE__*/_jsx(Route,{path:\"/running_models\",element:/*#__PURE__*/_jsx(RunningModels,{})}),/*#__PURE__*/_jsx(Route,{path:\"/register_model\",element:/*#__PURE__*/_jsx(RegisterModel,{})})]})})]})})})});}export default App;","map":{"version":3,"names":["CssBaseline","ThemeProvider","HashRouter","Route","Routes","ApiContextProvider","Layout","LaunchModel","RegisterModel","RunningModels","useMode","jsx","_jsx","jsxs","_jsxs","App","_useMode","_useMode2","_slicedToArray","theme","className","children","element","path"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/App.js"],"sourcesContent":["import { CssBaseline, ThemeProvider } from '@mui/material'\nimport { HashRouter, Route, Routes } from 'react-router-dom'\n\nimport { ApiContextProvider } from './components/apiContext'\nimport Layout from './scenes/_layout'\nimport LaunchModel from './scenes/launch_model'\nimport RegisterModel from './scenes/register_model'\nimport RunningModels from './scenes/running_models'\nimport { useMode } from './theme'\n\nfunction App() {\n const [theme] = useMode()\n return (\n <div className=\"app\">\n <HashRouter>\n <ThemeProvider theme={theme}>\n <ApiContextProvider>\n <CssBaseline />\n <Routes>\n <Route element={<Layout />}>\n <Route path=\"/\" element={<LaunchModel />} />\n <Route path=\"/running_models\" element={<RunningModels />} />\n <Route path=\"/register_model\" element={<RegisterModel />} />\n </Route>\n </Routes>\n </ApiContextProvider>\n </ThemeProvider>\n </HashRouter>\n </div>\n )\n}\n\nexport default App\n"],"mappings":"6IAAA,OAASA,WAAW,CAAEC,aAAa,KAAQ,eAAe,CAC1D,OAASC,UAAU,CAAEC,KAAK,CAAEC,MAAM,KAAQ,kBAAkB,CAE5D,OAASC,kBAAkB,KAAQ,yBAAyB,CAC5D,MAAO,CAAAC,MAAM,KAAM,kBAAkB,CACrC,MAAO,CAAAC,WAAW,KAAM,uBAAuB,CAC/C,MAAO,CAAAC,aAAa,KAAM,yBAAyB,CACnD,MAAO,CAAAC,aAAa,KAAM,yBAAyB,CACnD,OAASC,OAAO,KAAQ,SAAS,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEjC,QAAS,CAAAC,GAAGA,CAAA,CAAG,CACb,IAAAC,QAAA,CAAgBN,OAAO,CAAC,CAAC,CAAAO,SAAA,CAAAC,cAAA,CAAAF,QAAA,IAAlBG,KAAK,CAAAF,SAAA,IACZ,mBACEL,IAAA,QAAKQ,SAAS,CAAC,KAAK,CAAAC,QAAA,cAClBT,IAAA,CAACV,UAAU,EAAAmB,QAAA,cACTT,IAAA,CAACX,aAAa,EAACkB,KAAK,CAAEA,KAAM,CAAAE,QAAA,cAC1BP,KAAA,CAACT,kBAAkB,EAAAgB,QAAA,eACjBT,IAAA,CAACZ,WAAW,GAAE,CAAC,cACfY,IAAA,CAACR,MAAM,EAAAiB,QAAA,cACLP,KAAA,CAACX,KAAK,EAACmB,OAAO,cAAEV,IAAA,CAACN,MAAM,GAAE,CAAE,CAAAe,QAAA,eACzBT,IAAA,CAACT,KAAK,EAACoB,IAAI,CAAC,GAAG,CAACD,OAAO,cAAEV,IAAA,CAACL,WAAW,GAAE,CAAE,CAAE,CAAC,cAC5CK,IAAA,CAACT,KAAK,EAACoB,IAAI,CAAC,iBAAiB,CAACD,OAAO,cAAEV,IAAA,CAACH,aAAa,GAAE,CAAE,CAAE,CAAC,cAC5DG,IAAA,CAACT,KAAK,EAACoB,IAAI,CAAC,iBAAiB,CAACD,OAAO,cAAEV,IAAA,CAACJ,aAAa,GAAE,CAAE,CAAE,CAAC,EACvD,CAAC,CACF,CAAC,EACS,CAAC,CACR,CAAC,CACN,CAAC,CACV,CAAC,CAEV,CAEA,cAAe,CAAAO,GAAG"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import MuiAlert from'@mui/material/Alert';import Snackbar from'@mui/material/Snackbar';import React,{useContext}from'react';import{ApiContext}from'./apiContext';import{jsx as _jsx}from\"react/jsx-runtime\";var Alert=/*#__PURE__*/React.forwardRef(function Alert(props,ref){return/*#__PURE__*/_jsx(MuiAlert,_objectSpread({elevation:6,ref:ref,variant:\"filled\"},props));});var ErrorMessageSnackBar=function ErrorMessageSnackBar(){var _useContext=useContext(ApiContext),errorMsg=_useContext.errorMsg,setErrorMsg=_useContext.setErrorMsg;var handleClose=function handleClose(event,reason){if(reason==='clickaway'){return;}setErrorMsg('');};return/*#__PURE__*/_jsx(Snackbar,{open:errorMsg!=='',autoHideDuration:10000,anchorOrigin:{vertical:'top',horizontal:'center'},onClose:handleClose,children:/*#__PURE__*/_jsx(Alert,{severity:\"error\",onClose:handleClose,sx:{width:'100%'},children:errorMsg})});};export default ErrorMessageSnackBar;","map":{"version":3,"names":["MuiAlert","Snackbar","React","useContext","ApiContext","jsx","_jsx","Alert","forwardRef","props","ref","_objectSpread","elevation","variant","ErrorMessageSnackBar","_useContext","errorMsg","setErrorMsg","handleClose","event","reason","open","autoHideDuration","anchorOrigin","vertical","horizontal","onClose","children","severity","sx","width"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/errorMessageSnackBar.js"],"sourcesContent":["import MuiAlert from '@mui/material/Alert'\nimport Snackbar from '@mui/material/Snackbar'\nimport React, { useContext } from 'react'\n\nimport { ApiContext } from './apiContext'\n\nconst Alert = React.forwardRef(function Alert(props, ref) {\n return <MuiAlert elevation={6} ref={ref} variant=\"filled\" {...props} />\n})\n\nconst ErrorMessageSnackBar = () => {\n const { errorMsg, setErrorMsg } = useContext(ApiContext)\n\n const handleClose = (event, reason) => {\n if (reason === 'clickaway') {\n return\n }\n setErrorMsg('')\n }\n\n return (\n <Snackbar\n open={errorMsg !== ''}\n autoHideDuration={10000}\n anchorOrigin={{ vertical: 'top', horizontal: 'center' }}\n onClose={handleClose}\n >\n <Alert severity=\"error\" onClose={handleClose} sx={{ width: '100%' }}>\n {errorMsg}\n </Alert>\n </Snackbar>\n )\n}\n\nexport default ErrorMessageSnackBar\n"],"mappings":"4IAAA,MAAO,CAAAA,QAAQ,KAAM,qBAAqB,CAC1C,MAAO,CAAAC,QAAQ,KAAM,wBAAwB,CAC7C,MAAO,CAAAC,KAAK,EAAIC,UAAU,KAAQ,OAAO,CAEzC,OAASC,UAAU,KAAQ,cAAc,QAAAC,GAAA,IAAAC,IAAA,yBAEzC,GAAM,CAAAC,KAAK,cAAGL,KAAK,CAACM,UAAU,CAAC,QAAS,CAAAD,KAAKA,CAACE,KAAK,CAAEC,GAAG,CAAE,CACxD,mBAAOJ,IAAA,CAACN,QAAQ,CAAAW,aAAA,EAACC,SAAS,CAAE,CAAE,C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