xinference 0.7.5__py3-none-any.whl → 0.8.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xinference might be problematic. Click here for more details.

Files changed (120) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/oauth2/__init__.py +13 -0
  3. xinference/api/oauth2/common.py +14 -0
  4. xinference/api/oauth2/core.py +93 -0
  5. xinference/api/oauth2/types.py +36 -0
  6. xinference/api/oauth2/utils.py +44 -0
  7. xinference/api/restful_api.py +216 -27
  8. xinference/client/oscar/actor_client.py +18 -18
  9. xinference/client/restful/restful_client.py +96 -33
  10. xinference/conftest.py +63 -1
  11. xinference/constants.py +1 -0
  12. xinference/core/chat_interface.py +143 -3
  13. xinference/core/metrics.py +83 -0
  14. xinference/core/model.py +244 -181
  15. xinference/core/status_guard.py +86 -0
  16. xinference/core/supervisor.py +57 -7
  17. xinference/core/worker.py +134 -13
  18. xinference/deploy/cmdline.py +142 -16
  19. xinference/deploy/local.py +39 -7
  20. xinference/deploy/supervisor.py +2 -0
  21. xinference/deploy/worker.py +33 -5
  22. xinference/fields.py +4 -1
  23. xinference/model/core.py +8 -1
  24. xinference/model/embedding/core.py +3 -2
  25. xinference/model/embedding/model_spec_modelscope.json +60 -18
  26. xinference/model/image/stable_diffusion/core.py +4 -3
  27. xinference/model/llm/__init__.py +7 -0
  28. xinference/model/llm/ggml/llamacpp.py +3 -2
  29. xinference/model/llm/llm_family.json +87 -3
  30. xinference/model/llm/llm_family.py +15 -5
  31. xinference/model/llm/llm_family_modelscope.json +92 -3
  32. xinference/model/llm/pytorch/chatglm.py +70 -28
  33. xinference/model/llm/pytorch/core.py +11 -30
  34. xinference/model/llm/pytorch/internlm2.py +155 -0
  35. xinference/model/llm/pytorch/utils.py +0 -153
  36. xinference/model/llm/utils.py +37 -8
  37. xinference/model/llm/vllm/core.py +15 -3
  38. xinference/model/multimodal/__init__.py +15 -8
  39. xinference/model/multimodal/core.py +8 -1
  40. xinference/model/multimodal/model_spec.json +9 -0
  41. xinference/model/multimodal/model_spec_modelscope.json +45 -0
  42. xinference/model/multimodal/qwen_vl.py +5 -9
  43. xinference/model/utils.py +7 -2
  44. xinference/types.py +2 -0
  45. xinference/web/ui/build/asset-manifest.json +3 -3
  46. xinference/web/ui/build/index.html +1 -1
  47. xinference/web/ui/build/static/js/main.b83095c2.js +3 -0
  48. xinference/web/ui/build/static/js/{main.236e72e7.js.LICENSE.txt → main.b83095c2.js.LICENSE.txt} +7 -0
  49. xinference/web/ui/build/static/js/main.b83095c2.js.map +1 -0
  50. xinference/web/ui/node_modules/.cache/babel-loader/0a853b2fa1902551e262a2f1a4b7894341f27b3dd9587f2ef7aaea195af89518.json +1 -0
  51. xinference/web/ui/node_modules/.cache/babel-loader/101923c539819f26ad11fbcbd6f6e56436b285efbb090dcc7dd648c6e924c4a8.json +1 -0
  52. xinference/web/ui/node_modules/.cache/babel-loader/193e7ba39e70d4bb2895a5cb317f6f293a5fd02e7e324c02a1eba2f83216419c.json +1 -0
  53. xinference/web/ui/node_modules/.cache/babel-loader/22858de5265f2d279fca9f2f54dfb147e4b2704200dfb5d2ad3ec9769417328f.json +1 -0
  54. xinference/web/ui/node_modules/.cache/babel-loader/27696db5fcd4fcf0e7974cadf1e4a2ab89690474045c3188eafd586323ad13bb.json +1 -0
  55. xinference/web/ui/node_modules/.cache/babel-loader/27bcada3ee8f89d21184b359f022fc965f350ffaca52c9814c29f1fc37121173.json +1 -0
  56. xinference/web/ui/node_modules/.cache/babel-loader/27bdbe25deab8cf08f7fab8f05f8f26cf84a98809527a37986a4ab73a57ba96a.json +1 -0
  57. xinference/web/ui/node_modules/.cache/babel-loader/2bee7b8bd3d52976a45d6068e1333df88b943e0e679403c809e45382e3818037.json +1 -0
  58. xinference/web/ui/node_modules/.cache/babel-loader/30670751f55508ef3b861e13dd71b9e5a10d2561373357a12fc3831a0b77fd93.json +1 -0
  59. xinference/web/ui/node_modules/.cache/babel-loader/3605cd3a96ff2a3b443c70a101575482279ad26847924cab0684d165ba0d2492.json +1 -0
  60. xinference/web/ui/node_modules/.cache/babel-loader/3789ef437d3ecbf945bb9cea39093d1f16ebbfa32dbe6daf35abcfb6d48de6f1.json +1 -0
  61. xinference/web/ui/node_modules/.cache/babel-loader/4942da6bc03bf7373af068e22f916341aabc5b5df855d73c1d348c696724ce37.json +1 -0
  62. xinference/web/ui/node_modules/.cache/babel-loader/4d933e35e0fe79867d3aa6c46db28804804efddf5490347cb6c2c2879762a157.json +1 -0
  63. xinference/web/ui/node_modules/.cache/babel-loader/4d96f071168af43965e0fab2ded658fa0a15b8d9ca03789a5ef9c5c16a4e3cee.json +1 -0
  64. xinference/web/ui/node_modules/.cache/babel-loader/4fd24800544873512b540544ae54601240a5bfefd9105ff647855c64f8ad828f.json +1 -0
  65. xinference/web/ui/node_modules/.cache/babel-loader/52a6136cb2dbbf9c51d461724d9b283ebe74a73fb19d5df7ba8e13c42bd7174d.json +1 -0
  66. xinference/web/ui/node_modules/.cache/babel-loader/5c408307c982f07f9c09c85c98212d1b1c22548a9194c69548750a3016b91b88.json +1 -0
  67. xinference/web/ui/node_modules/.cache/babel-loader/663adbcb60b942e9cf094c8d9fabe57517f5e5e6e722d28b4948a40b7445a3b8.json +1 -0
  68. xinference/web/ui/node_modules/.cache/babel-loader/666bb2e1b250dc731311a7e4880886177885dfa768508d2ed63e02630cc78725.json +1 -0
  69. xinference/web/ui/node_modules/.cache/babel-loader/71493aadd34d568fbe605cacaba220aa69bd09273251ee4ba27930f8d01fccd8.json +1 -0
  70. xinference/web/ui/node_modules/.cache/babel-loader/8b071db2a5a9ef68dc14d5f606540bd23d9785e365a11997c510656764d2dccf.json +1 -0
  71. xinference/web/ui/node_modules/.cache/babel-loader/8b246d79cd3f6fc78f11777e6a6acca6a2c5d4ecce7f2dd4dcf9a48126440d3c.json +1 -0
  72. xinference/web/ui/node_modules/.cache/babel-loader/8d33354bd2100c8602afc3341f131a88cc36aaeecd5a4b365ed038514708e350.json +1 -0
  73. xinference/web/ui/node_modules/.cache/babel-loader/95c8cc049fadd23085d8623e1d43d70b614a4e52217676f186a417dca894aa09.json +1 -0
  74. xinference/web/ui/node_modules/.cache/babel-loader/a4d72d3b806ba061919115f0c513738726872e3c79cf258f007519d3f91d1a16.json +1 -0
  75. xinference/web/ui/node_modules/.cache/babel-loader/a8070ce4b780b4a044218536e158a9e7192a6c80ff593fdc126fee43f46296b5.json +1 -0
  76. xinference/web/ui/node_modules/.cache/babel-loader/b4e4fccaf8f2489a29081f0bf3b191656bd452fb3c8b5e3c6d92d94f680964d5.json +1 -0
  77. xinference/web/ui/node_modules/.cache/babel-loader/b53eb7c7967f6577bd3e678293c44204fb03ffa7fdc1dd59d3099015c68f6f7f.json +1 -0
  78. xinference/web/ui/node_modules/.cache/babel-loader/bd04667474fd9cac2983b03725c218908a6cc0ee9128a5953cd00d26d4877f60.json +1 -0
  79. xinference/web/ui/node_modules/.cache/babel-loader/c230a727b8f68f0e62616a75e14a3d33026dc4164f2e325a9a8072d733850edb.json +1 -0
  80. xinference/web/ui/node_modules/.cache/babel-loader/d06af85a84e5c5a29d3acf2dbb5b30c0cf75c8aec4ab5f975e6096f944ee4324.json +1 -0
  81. xinference/web/ui/node_modules/.cache/babel-loader/d44a6eb6106e09082b691a315c9f6ce17fcfe25beb7547810e0d271ce3301cd2.json +1 -0
  82. xinference/web/ui/node_modules/.cache/babel-loader/d5e150bff31715977d8f537c970f06d4fe3de9909d7e8342244a83a9f6447121.json +1 -0
  83. xinference/web/ui/node_modules/.cache/babel-loader/de36e5c08fd524e341d664883dda6cb1745acc852a4f1b011a35a0b4615f72fa.json +1 -0
  84. xinference/web/ui/node_modules/.cache/babel-loader/f037ffef5992af0892d6d991053c1dace364cd39a3f11f1a41f92776e8a59459.json +1 -0
  85. xinference/web/ui/node_modules/.cache/babel-loader/f23ab356a8603d4a2aaa74388c2f381675c207d37c4d1c832df922e9655c9a6b.json +1 -0
  86. xinference/web/ui/node_modules/.cache/babel-loader/f7c23b0922f4087b9e2e3e46f15c946b772daa46c28c3a12426212ecaf481deb.json +1 -0
  87. xinference/web/ui/node_modules/.cache/babel-loader/f95a8bd358eeb55fa2f49f1224cc2f4f36006359856744ff09ae4bb295f59ec1.json +1 -0
  88. xinference/web/ui/node_modules/.cache/babel-loader/fe5db70859503a54cbe71f9637e5a314cda88b1f0eecb733b6e6f837697db1ef.json +1 -0
  89. xinference/web/ui/node_modules/.package-lock.json +36 -0
  90. xinference/web/ui/node_modules/@types/cookie/package.json +30 -0
  91. xinference/web/ui/node_modules/@types/hoist-non-react-statics/package.json +33 -0
  92. xinference/web/ui/node_modules/react-cookie/package.json +55 -0
  93. xinference/web/ui/node_modules/universal-cookie/package.json +48 -0
  94. xinference/web/ui/package-lock.json +37 -0
  95. xinference/web/ui/package.json +3 -2
  96. {xinference-0.7.5.dist-info → xinference-0.8.1.dist-info}/METADATA +17 -6
  97. {xinference-0.7.5.dist-info → xinference-0.8.1.dist-info}/RECORD +101 -66
  98. xinference/web/ui/build/static/js/main.236e72e7.js +0 -3
  99. xinference/web/ui/build/static/js/main.236e72e7.js.map +0 -1
  100. xinference/web/ui/node_modules/.cache/babel-loader/0cccfbe5d963b8e31eb679f9d9677392839cedd04aa2956ac6b33cf19599d597.json +0 -1
  101. xinference/web/ui/node_modules/.cache/babel-loader/0f3b6cc71b7c83bdc85aa4835927aeb86af2ce0d2ac241917ecfbf90f75c6d27.json +0 -1
  102. xinference/web/ui/node_modules/.cache/babel-loader/2f651cf60b1bde50c0601c7110f77dd44819fb6e2501ff748a631724d91445d4.json +0 -1
  103. xinference/web/ui/node_modules/.cache/babel-loader/42bb623f337ad08ed076484185726e072ca52bb88e373d72c7b052db4c273342.json +0 -1
  104. xinference/web/ui/node_modules/.cache/babel-loader/57af83639c604bd3362d0f03f7505e81c6f67ff77bee7c6bb31f6e5523eba185.json +0 -1
  105. xinference/web/ui/node_modules/.cache/babel-loader/667753ce39ce1d4bcbf9a5f1a103d653be1d19d42f4e1fbaceb9b507679a52c7.json +0 -1
  106. xinference/web/ui/node_modules/.cache/babel-loader/66ed1bd4c06748c1b176a625c25c856997edc787856c73162f82f2b465c5d956.json +0 -1
  107. xinference/web/ui/node_modules/.cache/babel-loader/78f2521da2e2a98b075a2666cb782c7e2c019cd3c72199eecd5901c82d8655df.json +0 -1
  108. xinference/web/ui/node_modules/.cache/babel-loader/8d2b0b3c6988d1894694dcbbe708ef91cfe62d62dac317031f09915ced637953.json +0 -1
  109. xinference/web/ui/node_modules/.cache/babel-loader/9427ae7f1e94ae8dcd2333fb361e381f4054fde07394fe5448658e3417368476.json +0 -1
  110. xinference/web/ui/node_modules/.cache/babel-loader/bcee2b4e76b07620f9087989eb86d43c645ba3c7a74132cf926260af1164af0e.json +0 -1
  111. xinference/web/ui/node_modules/.cache/babel-loader/cc2ddd02ccc1dad1a2737ac247c79e6f6ed2c7836c6b68e511e3048f666b64af.json +0 -1
  112. xinference/web/ui/node_modules/.cache/babel-loader/d2e8e6665a7efc832b43907dadf4e3c896a59eaf8129f9a520882466c8f2e489.json +0 -1
  113. xinference/web/ui/node_modules/.cache/babel-loader/d8a42e9df7157de9f28eecefdf178fd113bf2280d28471b6e32a8a45276042df.json +0 -1
  114. xinference/web/ui/node_modules/.cache/babel-loader/e26750d9556e9741912333349e4da454c53dbfddbfc6002ab49518dcf02af745.json +0 -1
  115. xinference/web/ui/node_modules/.cache/babel-loader/ef42ec014d7bc373b874b2a1ff0dcd785490f125e913698bc049b0bd778e4d66.json +0 -1
  116. xinference/web/ui/node_modules/.cache/babel-loader/fe3eb4d76c79ca98833f686d642224eeeb94cc83ad14300d281623796d087f0a.json +0 -1
  117. {xinference-0.7.5.dist-info → xinference-0.8.1.dist-info}/LICENSE +0 -0
  118. {xinference-0.7.5.dist-info → xinference-0.8.1.dist-info}/WHEEL +0 -0
  119. {xinference-0.7.5.dist-info → xinference-0.8.1.dist-info}/entry_points.txt +0 -0
  120. {xinference-0.7.5.dist-info → xinference-0.8.1.dist-info}/top_level.txt +0 -0
@@ -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\";\nimport _classCallCheck from \"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\";\nimport _createClass from \"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/createClass.js\";\nimport * as cookie from 'cookie';\nimport { hasDocumentCookie, parseCookies, readCookie } from './utils';\nvar Cookies = /*#__PURE__*/function () {\n function Cookies(cookies) {\n var _this = this;\n var defaultSetOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, Cookies);\n this.changeListeners = [];\n this.HAS_DOCUMENT_COOKIE = false;\n this.update = function () {\n if (!_this.HAS_DOCUMENT_COOKIE) {\n return;\n }\n var previousCookies = _this.cookies;\n _this.cookies = cookie.parse(document.cookie);\n _this._checkChanges(previousCookies);\n };\n var domCookies = typeof document === 'undefined' ? '' : document.cookie;\n this.cookies = parseCookies(cookies || domCookies);\n this.defaultSetOptions = defaultSetOptions;\n this.HAS_DOCUMENT_COOKIE = hasDocumentCookie();\n }\n _createClass(Cookies, [{\n key: \"_emitChange\",\n value: function _emitChange(params) {\n for (var i = 0; i < this.changeListeners.length; ++i) {\n this.changeListeners[i](params);\n }\n }\n }, {\n key: \"_checkChanges\",\n value: function _checkChanges(newCookies) {\n var _this2 = this;\n var names = new Set(Object.keys(newCookies).concat(Object.keys(this.cookies)));\n names.forEach(function (name) {\n if (newCookies[name] !== _this2.cookies[name]) {\n _this2._emitChange({\n name: name,\n value: readCookie(newCookies[name])\n });\n }\n });\n }\n }, {\n key: \"_startPolling\",\n value: function _startPolling() {\n this.pollingInterval = setInterval(this.update, 300);\n }\n }, {\n key: \"_stopPolling\",\n value: function _stopPolling() {\n if (this.pollingInterval) {\n clearInterval(this.pollingInterval);\n }\n }\n }, {\n key: \"get\",\n value: function get(name) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!options.doNotUpdate) {\n this.update();\n }\n return readCookie(this.cookies[name], options);\n }\n }, {\n key: \"getAll\",\n value: function getAll() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (!options.doNotUpdate) {\n this.update();\n }\n var result = {};\n for (var name in this.cookies) {\n result[name] = readCookie(this.cookies[name], options);\n }\n return result;\n }\n }, {\n key: \"set\",\n value: function set(name, value, options) {\n if (options) {\n options = Object.assign(Object.assign({}, this.defaultSetOptions), options);\n } else {\n options = this.defaultSetOptions;\n }\n var stringValue = typeof value === 'string' ? value : JSON.stringify(value);\n this.cookies = Object.assign(Object.assign({}, this.cookies), _defineProperty({}, name, stringValue));\n if (this.HAS_DOCUMENT_COOKIE) {\n document.cookie = cookie.serialize(name, stringValue, options);\n }\n this._emitChange({\n name: name,\n value: value,\n options: options\n });\n }\n }, {\n key: \"remove\",\n value: function remove(name, options) {\n var finalOptions = options = Object.assign(Object.assign({}, options), {\n expires: new Date(1970, 1, 1, 0, 0, 1),\n maxAge: 0\n });\n this.cookies = Object.assign({}, this.cookies);\n delete this.cookies[name];\n if (this.HAS_DOCUMENT_COOKIE) {\n document.cookie = cookie.serialize(name, '', finalOptions);\n }\n this._emitChange({\n name: name,\n value: undefined,\n options: options\n });\n }\n }, {\n key: \"addChangeListener\",\n value: function addChangeListener(callback) {\n this.changeListeners.push(callback);\n if (this.changeListeners.length === 1) {\n if (typeof window === 'object' && 'cookieStore' in window) {\n window.cookieStore.addEventListener('change', this.update);\n } else {\n this._startPolling();\n }\n }\n }\n }, {\n key: \"removeChangeListener\",\n value: function removeChangeListener(callback) {\n var idx = this.changeListeners.indexOf(callback);\n if (idx >= 0) {\n this.changeListeners.splice(idx, 1);\n }\n if (this.changeListeners.length === 0) {\n if (typeof window === 'object' && 'cookieStore' in window) {\n window.cookieStore.removeEventListener('change', this.update);\n } else {\n this._stopPolling();\n }\n }\n }\n }]);\n return Cookies;\n}();\nexport { Cookies as default };","map":{"version":3,"names":["cookie","hasDocumentCookie","parseCookies","readCookie","Cookies","cookies","_this","defaultSetOptions","arguments","length","undefined","_classCallCheck","changeListeners","HAS_DOCUMENT_COOKIE","update","previousCookies","parse","document","_checkChanges","domCookies","_createClass","key","value","_emitChange","params","i","newCookies","_this2","names","Set","Object","keys","concat","forEach","name","_startPolling","pollingInterval","setInterval","_stopPolling","clearInterval","get","options","doNotUpdate","getAll","result","set","assign","stringValue","JSON","stringify","_defineProperty","serialize","remove","finalOptions","expires","Date","maxAge","addChangeListener","callback","push","window","cookieStore","addEventListener","removeChangeListener","idx","indexOf","splice","removeEventListener","default"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/node_modules/universal-cookie/es6/Cookies.js"],"sourcesContent":["import * as cookie from 'cookie';\nimport { hasDocumentCookie, parseCookies, readCookie } from './utils';\nexport default class Cookies {\n constructor(cookies, defaultSetOptions = {}) {\n this.changeListeners = [];\n this.HAS_DOCUMENT_COOKIE = false;\n this.update = () => {\n if (!this.HAS_DOCUMENT_COOKIE) {\n return;\n }\n const previousCookies = this.cookies;\n this.cookies = cookie.parse(document.cookie);\n this._checkChanges(previousCookies);\n };\n const domCookies = typeof document === 'undefined' ? '' : document.cookie;\n this.cookies = parseCookies(cookies || domCookies);\n this.defaultSetOptions = defaultSetOptions;\n this.HAS_DOCUMENT_COOKIE = hasDocumentCookie();\n }\n _emitChange(params) {\n for (let i = 0; i < this.changeListeners.length; ++i) {\n this.changeListeners[i](params);\n }\n }\n _checkChanges(newCookies) {\n const names = new Set(Object.keys(newCookies).concat(Object.keys(this.cookies)));\n names.forEach((name) => {\n if (newCookies[name] !== this.cookies[name]) {\n this._emitChange({\n name,\n value: readCookie(newCookies[name]),\n });\n }\n });\n }\n _startPolling() {\n this.pollingInterval = setInterval(this.update, 300);\n }\n _stopPolling() {\n if (this.pollingInterval) {\n clearInterval(this.pollingInterval);\n }\n }\n get(name, options = {}) {\n if (!options.doNotUpdate) {\n this.update();\n }\n return readCookie(this.cookies[name], options);\n }\n getAll(options = {}) {\n if (!options.doNotUpdate) {\n this.update();\n }\n const result = {};\n for (let name in this.cookies) {\n result[name] = readCookie(this.cookies[name], options);\n }\n return result;\n }\n set(name, value, options) {\n if (options) {\n options = Object.assign(Object.assign({}, this.defaultSetOptions), options);\n }\n else {\n options = this.defaultSetOptions;\n }\n const stringValue = typeof value === 'string' ? value : JSON.stringify(value);\n this.cookies = Object.assign(Object.assign({}, this.cookies), { [name]: stringValue });\n if (this.HAS_DOCUMENT_COOKIE) {\n document.cookie = cookie.serialize(name, stringValue, options);\n }\n this._emitChange({ name, value, options });\n }\n remove(name, options) {\n const finalOptions = (options = Object.assign(Object.assign({}, options), { expires: new Date(1970, 1, 1, 0, 0, 1), maxAge: 0 }));\n this.cookies = Object.assign({}, this.cookies);\n delete this.cookies[name];\n if (this.HAS_DOCUMENT_COOKIE) {\n document.cookie = cookie.serialize(name, '', finalOptions);\n }\n this._emitChange({ name, value: undefined, options });\n }\n addChangeListener(callback) {\n this.changeListeners.push(callback);\n if (this.changeListeners.length === 1) {\n if (typeof window === 'object' && 'cookieStore' in window) {\n window.cookieStore.addEventListener('change', this.update);\n }\n else {\n this._startPolling();\n }\n }\n }\n removeChangeListener(callback) {\n const idx = this.changeListeners.indexOf(callback);\n if (idx >= 0) {\n this.changeListeners.splice(idx, 1);\n }\n if (this.changeListeners.length === 0) {\n if (typeof window === 'object' && 'cookieStore' in window) {\n window.cookieStore.removeEventListener('change', this.update);\n }\n else {\n this._stopPolling();\n }\n }\n }\n}\n"],"mappings":";;;AAAA,OAAO,KAAKA,MAAM,MAAM,QAAQ;AAChC,SAASC,iBAAiB,EAAEC,YAAY,EAAEC,UAAU,QAAQ,SAAS;AAAC,IACjDC,OAAO;EACxB,SAAAA,QAAYC,OAAO,EAA0B;IAAA,IAAAC,KAAA;IAAA,IAAxBC,iBAAiB,GAAAC,SAAA,CAAA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,GAAG,IAAI,CAAC,EAAE;QACV,IAAI,CAACpD,eAAe,CAACsD,MAAM,CAACF,GAAG,EAAE,CAAC,CAAC;MACvC;MACA,IAAI,IAAI,CAACpD,eAAe,CAACH,MAAM,KAAK,CAAC,EAAE;QACnC,IAAI,OAAOmD,MAAM,KAAK,QAAQ,IAAI,aAAa,IAAIA,MAAM,EAAE;UACvDA,MAAM,CAACC,WAAW,CAACM,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAACrD,MAAM,CAAC;QACjE,CAAC,MACI;UACD,IAAI,CAACwB,YAAY,CAAC,CAAC;QACvB;MACJ;IACJ;EAAC;EAAA,OAAAlC,OAAA;AAAA;AAAA,SAxGgBA,OAAO,IAAAgE,OAAA"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import * as cookie from 'cookie';\nexport function hasDocumentCookie() {\n // Can we get/set cookies on document.cookie?\n return typeof document === 'object' && typeof document.cookie === 'string';\n}\nexport function cleanCookies() {\n document.cookie.split(';').forEach(function (c) {\n document.cookie = c.replace(/^ +/, '').replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/');\n });\n}\nexport function parseCookies(cookies) {\n if (typeof cookies === 'string') {\n return cookie.parse(cookies);\n } else if (typeof cookies === 'object' && cookies !== null) {\n return cookies;\n } else {\n return {};\n }\n}\nexport function readCookie(value) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var cleanValue = cleanupCookieValue(value);\n if (!options.doNotParse) {\n try {\n return JSON.parse(cleanValue);\n } catch (e) {\n // At least we tried\n }\n }\n // Ignore clean value if we failed the deserialization\n // It is not relevant anymore to trim those values\n return value;\n}\nfunction cleanupCookieValue(value) {\n // express prepend j: before serializing a cookie\n if (value && value[0] === 'j' && value[1] === ':') {\n return value.substr(2);\n }\n return value;\n}","map":{"version":3,"names":["cookie","hasDocumentCookie","document","cleanCookies","split","forEach","c","replace","Date","toUTCString","parseCookies","cookies","parse","readCookie","value","options","arguments","length","undefined","cleanValue","cleanupCookieValue","doNotParse","JSON","e","substr"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/node_modules/universal-cookie/es6/utils.js"],"sourcesContent":["import * as cookie from 'cookie';\nexport function hasDocumentCookie() {\n // Can we get/set cookies on document.cookie?\n return typeof document === 'object' && typeof document.cookie === 'string';\n}\nexport function cleanCookies() {\n document.cookie.split(';').forEach(function (c) {\n document.cookie = c\n .replace(/^ +/, '')\n .replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/');\n });\n}\nexport function parseCookies(cookies) {\n if (typeof cookies === 'string') {\n return cookie.parse(cookies);\n }\n else if (typeof cookies === 'object' && cookies !== null) {\n return cookies;\n }\n else {\n return {};\n }\n}\nexport function readCookie(value, options = {}) {\n const cleanValue = cleanupCookieValue(value);\n if (!options.doNotParse) {\n try {\n return JSON.parse(cleanValue);\n }\n catch (e) {\n // At least we tried\n }\n }\n // Ignore clean value if we failed the deserialization\n // It is not relevant anymore to trim those values\n return value;\n}\nfunction cleanupCookieValue(value) {\n // express prepend j: before serializing a cookie\n if (value && value[0] === 'j' && value[1] === ':') {\n return value.substr(2);\n }\n return value;\n}\n"],"mappings":"AAAA,OAAO,KAAKA,MAAM,MAAM,QAAQ;AAChC,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EAChC;EACA,OAAO,OAAOC,QAAQ,KAAK,QAAQ,IAAI,OAAOA,QAAQ,CAACF,MAAM,KAAK,QAAQ;AAC9E;AACA,OAAO,SAASG,YAAYA,CAAA,EAAG;EAC3BD,QAAQ,CAACF,MAAM,CAACI,KAAK,CAAC,GAAG,CAAC,CAACC,OAAO,CAAC,UAAUC,CAAC,EAAE;IAC5CJ,QAAQ,CAACF,MAAM,GAAGM,CAAC,CACdC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAClBA,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,IAAIC,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAG,SAAS,CAAC;EAC5E,CAAC,CAAC;AACN;AACA,OAAO,SAASC,YAAYA,CAACC,OAAO,EAAE;EAClC,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IAC7B,OAAOX,MAAM,CAACY,KAAK,CAACD,OAAO,CAAC;EAChC,CAAC,MACI,IAAI,OAAOA,OAAO,KAAK,QAAQ,IAAIA,OAAO,KAAK,IAAI,EAAE;IACtD,OAAOA,OAAO;EAClB,CAAC,MACI;IACD,OAAO,CAAC,CAAC;EACb;AACJ;AACA,OAAO,SAASE,UAAUA,CAACC,KAAK,EAAgB;EAAA,IAAdC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAC1C,IAAMG,UAAU,GAAGC,kBAAkB,CAACN,KAAK,CAAC;EAC5C,IAAI,CAACC,OAAO,CAACM,UAAU,EAAE;IACrB,IAAI;MACA,OAAOC,IAAI,CAACV,KAAK,CAACO,UAAU,CAAC;IACjC,CAAC,CACD,OAAOI,CAAC,EAAE;MACN;IAAA;EAER;EACA;EACA;EACA,OAAOT,KAAK;AAChB;AACA,SAASM,kBAAkBA,CAACN,KAAK,EAAE;EAC/B;EACA,IAAIA,KAAK,IAAIA,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAIA,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;IAC/C,OAAOA,KAAK,CAACU,MAAM,CAAC,CAAC,CAAC;EAC1B;EACA,OAAOV,KAAK;AAChB"},"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{Box}from'@mui/material';import Button from'@mui/material/Button';import Container from'@mui/material/Container';import TextField from'@mui/material/TextField';import Typography from'@mui/material/Typography';import*as React from'react';import{Fragment,useContext,useState}from'react';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import ErrorMessageSnackBar from'../../components/errorMessageSnackBar';import{getEndpoint}from'../../components/utils';import Header from'./header';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";function Login(){var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,2),setCookie=_useCookies2[1];var navigate=useNavigate();var _useState=useState(''),_useState2=_slicedToArray(_useState,2),username=_useState2[0],setUsername=_useState2[1];var _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),password=_useState4[0],setPassword=_useState4[1];var _useContext=useContext(ApiContext),setErrorMsg=_useContext.setErrorMsg;var endpoint=getEndpoint();var handleSubmit=function handleSubmit(){fetch(endpoint+'/token',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({username:username,password:password})}).then(function(res){if(!res.ok){res.json().then(function(errorData){setErrorMsg(\"Login failed: \".concat(res.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{res.json().then(function(data){setCookie('token',data['access_token'],{path:'/'});navigate('/');});}});};return/*#__PURE__*/_jsxs(Fragment,{children:[/*#__PURE__*/_jsx(Header,{}),/*#__PURE__*/_jsxs(Container,{component:\"main\",maxWidth:\"xl\",sx:{marginTop:20},children:[/*#__PURE__*/_jsx(ErrorMessageSnackBar,{}),/*#__PURE__*/_jsxs(Box,{sx:{marginTop:8,display:'flex',flexDirection:'column',alignItems:'center'},children:[/*#__PURE__*/_jsx(Typography,{component:\"h1\",variant:\"h5\",children:\"LOGIN\"}),/*#__PURE__*/_jsxs(Box,{component:\"main\",noValidate:true,sx:{mt:1},children:[/*#__PURE__*/_jsx(TextField,{margin:\"normal\",required:true,fullWidth:true,id:\"username\",label:\"Username\",name:\"username\",value:username,onChange:function onChange(e){setUsername(e.target.value);},autoFocus:true}),/*#__PURE__*/_jsx(TextField,{margin:\"normal\",required:true,fullWidth:true,name:\"password\",label:\"Password\",type:\"password\",id:\"password\",autoComplete:\"current-password\",value:password,onChange:function onChange(e){setPassword(e.target.value);}}),/*#__PURE__*/_jsx(Button,{type:\"submit\",fullWidth:true,variant:\"contained\",sx:{mt:3,mb:2},onClick:handleSubmit,children:\"Sign In\"})]})]})]})]});}export default Login;","map":{"version":3,"names":["Box","Button","Container","TextField","Typography","React","Fragment","useContext","useState","useCookies","useNavigate","ApiContext","ErrorMessageSnackBar","getEndpoint","Header","jsx","_jsx","jsxs","_jsxs","Login","_useCookies","_useCookies2","_slicedToArray","setCookie","navigate","_useState","_useState2","username","setUsername","_useState3","_useState4","password","setPassword","_useContext","setErrorMsg","endpoint","handleSubmit","fetch","method","headers","body","JSON","stringify","then","res","ok","json","errorData","concat","status","detail","data","path","children","component","maxWidth","sx","marginTop","display","flexDirection","alignItems","variant","noValidate","mt","margin","required","fullWidth","id","label","name","value","onChange","e","target","autoFocus","type","autoComplete","mb","onClick"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/login/login.js"],"sourcesContent":["import { Box } from '@mui/material'\nimport Button from '@mui/material/Button'\nimport Container from '@mui/material/Container'\nimport TextField from '@mui/material/TextField'\nimport Typography from '@mui/material/Typography'\nimport * as React from 'react'\nimport { Fragment, useContext, useState } from 'react'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport ErrorMessageSnackBar from '../../components/errorMessageSnackBar'\nimport { getEndpoint } from '../../components/utils'\nimport Header from './header'\n\nfunction Login() {\n const [, setCookie] = useCookies(['token'])\n const navigate = useNavigate()\n const [username, setUsername] = useState('')\n const [password, setPassword] = useState('')\n const { setErrorMsg } = useContext(ApiContext)\n const endpoint = getEndpoint()\n\n const handleSubmit = () => {\n fetch(endpoint + '/token', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n username: username,\n password: password,\n }),\n }).then((res) => {\n if (!res.ok) {\n res.json().then((errorData) => {\n setErrorMsg(\n `Login failed: ${res.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n res.json().then((data) => {\n setCookie('token', data['access_token'], { path: '/' })\n navigate('/')\n })\n }\n })\n }\n\n return (\n <Fragment>\n <Header />\n <Container component=\"main\" maxWidth=\"xl\" sx={{ marginTop: 20 }}>\n <ErrorMessageSnackBar />\n <Box\n sx={{\n marginTop: 8,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n }}\n >\n <Typography component=\"h1\" variant=\"h5\">\n LOGIN\n </Typography>\n <Box component=\"main\" noValidate sx={{ mt: 1 }}>\n <TextField\n margin=\"normal\"\n required\n fullWidth\n id=\"username\"\n label=\"Username\"\n name=\"username\"\n value={username}\n onChange={(e) => {\n setUsername(e.target.value)\n }}\n autoFocus\n />\n <TextField\n margin=\"normal\"\n required\n fullWidth\n name=\"password\"\n label=\"Password\"\n type=\"password\"\n id=\"password\"\n autoComplete=\"current-password\"\n value={password}\n onChange={(e) => {\n setPassword(e.target.value)\n }}\n />\n <Button\n type=\"submit\"\n fullWidth\n variant=\"contained\"\n sx={{ mt: 3, mb: 2 }}\n onClick={handleSubmit}\n >\n Sign In\n </Button>\n </Box>\n </Box>\n </Container>\n </Fragment>\n )\n}\n\nexport default Login\n"],"mappings":"6IAAA,OAASA,GAAG,KAAQ,eAAe,CACnC,MAAO,CAAAC,MAAM,KAAM,sBAAsB,CACzC,MAAO,CAAAC,SAAS,KAAM,yBAAyB,CAC/C,MAAO,CAAAC,SAAS,KAAM,yBAAyB,CAC/C,MAAO,CAAAC,UAAU,KAAM,0BAA0B,CACjD,MAAO,GAAK,CAAAC,KAAK,KAAM,OAAO,CAC9B,OAASC,QAAQ,CAAEC,UAAU,CAAEC,QAAQ,KAAQ,OAAO,CACtD,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,oBAAoB,KAAM,uCAAuC,CACxE,OAASC,WAAW,KAAQ,wB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AU,CACfC,KAAK,CAAE3C,QAAS,CAChB4C,QAAQ,CAAE,SAAAA,SAACC,CAAC,CAAK,CACf5C,WAAW,CAAC4C,CAAC,CAACC,MAAM,CAACH,KAAK,CAAC,CAC7B,CAAE,CACFI,SAAS,MACV,CAAC,cACF1D,IAAA,CAACb,SAAS,EACR6D,MAAM,CAAC,QAAQ,CACfC,QAAQ,MACRC,SAAS,MACTG,IAAI,CAAC,UAAU,CACfD,KAAK,CAAC,UAAU,CAChBO,IAAI,CAAC,UAAU,CACfR,EAAE,CAAC,UAAU,CACbS,YAAY,CAAC,kBAAkB,CAC/BN,KAAK,CAAEvC,QAAS,CAChBwC,QAAQ,CAAE,SAAAA,SAACC,CAAC,CAAK,CACfxC,WAAW,CAACwC,CAAC,CAACC,MAAM,CAACH,KAAK,CAAC,CAC7B,CAAE,CACH,CAAC,cACFtD,IAAA,CAACf,MAAM,EACL0E,IAAI,CAAC,QAAQ,CACbT,SAAS,MACTL,OAAO,CAAC,WAAW,CACnBL,EAAE,CAAE,CAAEO,EAAE,CAAE,CAAC,CAAEc,EAAE,CAAE,CAAE,CAAE,CACrBC,OAAO,CAAE1C,YAAa,CAAAiB,QAAA,CACvB,SAED,CAAQ,CAAC,EACN,CAAC,EACH,CAAC,EACG,CAAC,EACJ,CAAC,CAEf,CAEA,cAAe,CAAAlC,KAAK"},"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{Cookies}from'react-cookie';import{isValidBearerToken}from'./utils';var cookies=new Cookies();var updateOptions=function updateOptions(url,options){var update=_objectSpread({},options);if(cookies.get('token')!=='no_auth'){update.headers=_objectSpread(_objectSpread({},update.headers),{},{Authorization:'Bearer '+cookies.get('token')});}return update;};export default function fetcher(url,options){return fetch(url,updateOptions(url,options)).then(function(res){// For the situation that server has already been restarted, the current token may become invalid,\n// which leads to UI hangs.\nif(res.status===401&&isValidBearerToken(cookies.get('token'))){if(localStorage.getItem('authStatus')!=='401'){localStorage.setItem('authStatus','401');window.dispatchEvent(new Event('auth-status'));}}else if(res.status===403&&isValidBearerToken(cookies.get('token'))){if(localStorage.getItem('authStatus')!=='403'){localStorage.setItem('authStatus','403');window.dispatchEvent(new Event('auth-status'));}}else{return res;}});}","map":{"version":3,"names":["Cookies","isValidBearerToken","cookies","updateOptions","url","options","update","_objectSpread","get","headers","Authorization","fetcher","fetch","then","res","status","localStorage","getItem","setItem","window","dispatchEvent","Event"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/fetcher.js"],"sourcesContent":["import { Cookies } from 'react-cookie'\n\nimport { isValidBearerToken } from './utils'\n\nconst cookies = new Cookies()\n\nconst updateOptions = (url, options) => {\n const update = { ...options }\n if (cookies.get('token') !== 'no_auth') {\n update.headers = {\n ...update.headers,\n Authorization: 'Bearer ' + cookies.get('token'),\n }\n }\n return update\n}\n\nexport default function fetcher(url, options) {\n return fetch(url, updateOptions(url, options)).then((res) => {\n // For the situation that server has already been restarted, the current token may become invalid,\n // which leads to UI hangs.\n if (res.status === 401 && isValidBearerToken(cookies.get('token'))) {\n if (localStorage.getItem('authStatus') !== '401') {\n localStorage.setItem('authStatus', '401')\n window.dispatchEvent(new Event('auth-status'))\n }\n } else if (res.status === 403 && isValidBearerToken(cookies.get('token'))) {\n if (localStorage.getItem('authStatus') !== '403') {\n localStorage.setItem('authStatus', '403')\n window.dispatchEvent(new Event('auth-status'))\n }\n } else {\n return res\n }\n })\n}\n"],"mappings":"4IAAA,OAASA,OAAO,KAAQ,cAAc,CAEtC,OAASC,kBAAkB,KAAQ,SAAS,CAE5C,GAAM,CAAAC,OAAO,CAAG,GAAI,CAAAF,OAAO,CAAC,CAAC,CAE7B,GAAM,CAAAG,aAAa,CAAG,QAAhB,CAAAA,aAAaA,CAAIC,GAAG,CAAEC,OAAO,CAAK,CACtC,GAAM,CAAAC,MAAM,CAAA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@@ -0,0 +1 @@
1
+ {"ast":null,"code":"export {};","map":{"version":3,"names":[],"sources":["/home/runner/work/inference/inference/xinference/web/ui/node_modules/universal-cookie/es6/types.js"],"sourcesContent":["export {};\n"],"mappings":"AAAA"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import _regeneratorRuntime from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _objectSpread from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _asyncToGenerator from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{Box,FormControl,TextField}from'@mui/material';import React,{useContext,useEffect,useState}from'react';import{ApiContext}from'../../components/apiContext';import fetcher from'../../components/fetcher';import EmbeddingCard from'./embeddingCard';import ModelCard from'./modelCard';import RerankCard from'./rerankCard';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var LaunchCustom=function LaunchCustom(_ref){var gpuAvailable=_ref.gpuAvailable;var endPoint=useContext(ApiContext).endPoint;var _useState=useState([]),_useState2=_slicedToArray(_useState,2),registrationData=_useState2[0],setRegistrationData=_useState2[1];var _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;// States used for filtering\nvar _useState3=useState(''),_useState4=_slicedToArray(_useState3,2),searchTerm=_useState4[0],setSearchTerm=_useState4[1];var handleChange=function handleChange(event){setSearchTerm(event.target.value);};var filter=function filter(registration){if(!registration||typeof searchTerm!=='string')return false;var modelName=registration.model_name?registration.model_name.toLowerCase():'';return modelName.includes(searchTerm.toLowerCase());};var update=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var rerankResponse,rerankRegistrations,customRerankRegistrations,embeddingResponse,embeddingRegistrations,customEmbeddingRegistrations,llmResponse,llmRegistrations,customLLMRegistrations,newEmbeddingData,newLLMData,newRerankData;return _regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!(isCallingApi||isUpdatingModel)){_context4.next=2;break;}return _context4.abrupt(\"return\");case 2:_context4.prev=2;setIsCallingApi(true);_context4.next=6;return fetcher(\"\".concat(endPoint,\"/v1/model_registrations/rerank\"),{method:'GET'});case 6:rerankResponse=_context4.sent;_context4.next=9;return rerankResponse.json();case 9:rerankRegistrations=_context4.sent;customRerankRegistrations=rerankRegistrations.filter(function(data){return!data.is_builtin;});_context4.next=13;return fetcher(\"\".concat(endPoint,\"/v1/model_registrations/embedding\"),{method:'GET'});case 13:embeddingResponse=_context4.sent;_context4.next=16;return embeddingResponse.json();case 16:embeddingRegistrations=_context4.sent;customEmbeddingRegistrations=embeddingRegistrations.filter(function(data){return!data.is_builtin;});_context4.next=20;return fetcher(\"\".concat(endPoint,\"/v1/model_registrations/LLM\"),{method:'GET'});case 20:llmResponse=_context4.sent;_context4.next=23;return llmResponse.json();case 23:llmRegistrations=_context4.sent;customLLMRegistrations=llmRegistrations.filter(function(data){return!data.is_builtin;});_context4.next=27;return Promise.all(customEmbeddingRegistrations.map(/*#__PURE__*/function(){var _ref3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(registration){var desc;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return fetcher(\"\".concat(endPoint,\"/v1/model_registrations/embedding/\").concat(registration.model_name),{method:'GET'});case 2:desc=_context.sent;_context.t0=_objectSpread;_context.t1=_objectSpread;_context.t2={};_context.next=8;return desc.json();case 8:_context.t3=_context.sent;_context.t4=(0,_context.t1)(_context.t2,_context.t3);_context.t5={};_context.t6={is_builtin:registration.is_builtin};return _context.abrupt(\"return\",(0,_context.t0)(_context.t4,_context.t5,_context.t6));case 13:case\"end\":return _context.stop();}},_callee);}));return function(_x){return _ref3.apply(this,arguments);};}()));case 27:newEmbeddingData=_context4.sent;_context4.next=30;return Promise.all(customLLMRegistrations.map(/*#__PURE__*/function(){var _ref4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(registration){var desc;return _regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return fetcher(\"\".concat(endPoint,\"/v1/model_registrations/LLM/\").concat(registration.model_name),{method:'GET'});case 2:desc=_context2.sent;_context2.t0=_objectSpread;_context2.t1=_objectSpread;_context2.t2={};_context2.next=8;return desc.json();case 8:_context2.t3=_context2.sent;_context2.t4=(0,_context2.t1)(_context2.t2,_context2.t3);_context2.t5={};_context2.t6={is_builtin:registration.is_builtin};return _context2.abrupt(\"return\",(0,_context2.t0)(_context2.t4,_context2.t5,_context2.t6));case 13:case\"end\":return _context2.stop();}},_callee2);}));return function(_x2){return _ref4.apply(this,arguments);};}()));case 30:newLLMData=_context4.sent;_context4.next=33;return Promise.all(customRerankRegistrations.map(/*#__PURE__*/function(){var _ref5=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(registration){var desc;return _regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return fetcher(\"\".concat(endPoint,\"/v1/model_registrations/rerank/\").concat(registration.model_name),{method:'GET'});case 2:desc=_context3.sent;_context3.t0=_objectSpread;_context3.t1=_objectSpread;_context3.t2={};_context3.next=8;return desc.json();case 8:_context3.t3=_context3.sent;_context3.t4=(0,_context3.t1)(_context3.t2,_context3.t3);_context3.t5={};_context3.t6={is_builtin:registration.is_builtin};return _context3.abrupt(\"return\",(0,_context3.t0)(_context3.t4,_context3.t5,_context3.t6));case 13:case\"end\":return _context3.stop();}},_callee3);}));return function(_x3){return _ref5.apply(this,arguments);};}()));case 33:newRerankData=_context4.sent;setRegistrationData(newLLMData.concat(newEmbeddingData).concat(newRerankData));_context4.next=40;break;case 37:_context4.prev=37;_context4.t0=_context4[\"catch\"](2);console.error('Error:',_context4.t0);case 40:_context4.prev=40;setIsCallingApi(false);return _context4.finish(40);case 43:case\"end\":return _context4.stop();}},_callee4,null,[[2,37,40,43]]);}));return function update(){return _ref2.apply(this,arguments);};}();useEffect(function(){update();},[]);var style={display:'grid',gridTemplateColumns:'repeat(auto-fill, minmax(300px, 1fr))',paddingLeft:'2rem',gridGap:'2rem 0rem'};return/*#__PURE__*/_jsxs(Box,{m:\"20px\",children:[/*#__PURE__*/_jsx(\"div\",{style:{display:'grid',gridTemplateColumns:'1fr',margin:'30px 2rem'},children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",children:/*#__PURE__*/_jsx(TextField,{id:\"search\",type:\"search\",label:\"Search for custom model name\",value:searchTerm,onChange:handleChange,size:\"small\"})})}),/*#__PURE__*/_jsx(\"div\",{style:style,children:registrationData.filter(function(registration){return filter(registration);}).map(function(filteredRegistration){if(filteredRegistration.max_tokens&&filteredRegistration.dimensions){return/*#__PURE__*/_jsx(EmbeddingCard,{url:endPoint,modelData:filteredRegistration,cardHeight:380,is_custom:true});}else if(filteredRegistration.model_type&&filteredRegistration.model_type==='rerank'){return/*#__PURE__*/_jsx(RerankCard,{url:endPoint,modelData:filteredRegistration,cardHeight:380,is_custom:true});}else{return/*#__PURE__*/_jsx(ModelCard,{url:endPoint,modelData:filteredRegistration,gpuAvailable:gpuAvailable,is_custom:true});}})})]});};export default LaunchCustom;","map":{"version":3,"names":["Box","FormControl","TextField","React","useContext","useEffect","useState","ApiContext","fetcher","EmbeddingCard","ModelCard","RerankCard","jsx","_jsx","jsxs","_jsxs","LaunchCustom","_ref","gpuAvailable","endPoint","_useState","_useState2","_slicedToArray","registrationData","setRegistrationData","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useState3","_useState4","searchTerm","setSearchTerm","handleChange","event","target","value","filter","registration","modelName","model_name","toLowerCase","includes","update","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee4","rerankResponse","rerankRegistrations","customRerankRegistrations","embeddingResponse","embeddingRegistrations","customEmbeddingRegistrations","llmResponse","llmRegistrations","customLLMRegistrations","newEmbeddingData","newLLMData","newRerankData","wrap","_callee4$","_context4","prev","next","abrupt","concat","method","sent","json","data","is_builtin","Promise","all","map","_ref3","_callee","desc","_callee$","_context","t0","_objectSpread","t1","t2","t3","t4","t5","t6","stop","_x","apply","arguments","_ref4","_callee2","_callee2$","_context2","_x2","_ref5","_callee3","_callee3$","_context3","_x3","console","error","finish","style","display","gridTemplateColumns","paddingLeft","gridGap","m","children","margin","variant","id","type","label","onChange","size","filteredRegistration","max_tokens","dimensions","url","modelData","cardHeight","is_custom","model_type"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/launchCustom.js"],"sourcesContent":["import { Box, FormControl, TextField } from '@mui/material'\nimport React, { useContext, useEffect, useState } from 'react'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetcher from '../../components/fetcher'\nimport EmbeddingCard from './embeddingCard'\nimport ModelCard from './modelCard'\nimport RerankCard from './rerankCard'\n\nconst LaunchCustom = ({ gpuAvailable }) => {\n let endPoint = useContext(ApiContext).endPoint\n const [registrationData, setRegistrationData] = useState([])\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n\n // States used for filtering\n const [searchTerm, setSearchTerm] = useState('')\n\n const handleChange = (event) => {\n setSearchTerm(event.target.value)\n }\n\n const filter = (registration) => {\n if (!registration || typeof searchTerm !== 'string') return false\n const modelName = registration.model_name\n ? registration.model_name.toLowerCase()\n : ''\n return modelName.includes(searchTerm.toLowerCase())\n }\n\n const update = async () => {\n if (isCallingApi || isUpdatingModel) return\n\n try {\n setIsCallingApi(true)\n\n const rerankResponse = await fetcher(\n `${endPoint}/v1/model_registrations/rerank`,\n {\n method: 'GET',\n }\n )\n const rerankRegistrations = await rerankResponse.json()\n const customRerankRegistrations = rerankRegistrations.filter(\n (data) => !data.is_builtin\n )\n\n const embeddingResponse = await fetcher(\n `${endPoint}/v1/model_registrations/embedding`,\n {\n method: 'GET',\n }\n )\n\n const embeddingRegistrations = await embeddingResponse.json()\n const customEmbeddingRegistrations = embeddingRegistrations.filter(\n (data) => !data.is_builtin\n )\n\n const llmResponse = await fetcher(\n `${endPoint}/v1/model_registrations/LLM`,\n {\n method: 'GET',\n }\n )\n const llmRegistrations = await llmResponse.json()\n const customLLMRegistrations = llmRegistrations.filter(\n (data) => !data.is_builtin\n )\n\n const newEmbeddingData = await Promise.all(\n customEmbeddingRegistrations.map(async (registration) => {\n const desc = await fetcher(\n `${endPoint}/v1/model_registrations/embedding/${registration.model_name}`,\n {\n method: 'GET',\n }\n )\n\n return {\n ...(await desc.json()),\n is_builtin: registration.is_builtin,\n }\n })\n )\n\n const newLLMData = await Promise.all(\n customLLMRegistrations.map(async (registration) => {\n const desc = await fetcher(\n `${endPoint}/v1/model_registrations/LLM/${registration.model_name}`,\n {\n method: 'GET',\n }\n )\n\n return {\n ...(await desc.json()),\n is_builtin: registration.is_builtin,\n }\n })\n )\n\n const newRerankData = await Promise.all(\n customRerankRegistrations.map(async (registration) => {\n const desc = await fetcher(\n `${endPoint}/v1/model_registrations/rerank/${registration.model_name}`,\n {\n method: 'GET',\n }\n )\n\n return {\n ...(await desc.json()),\n is_builtin: registration.is_builtin,\n }\n })\n )\n\n setRegistrationData(\n newLLMData.concat(newEmbeddingData).concat(newRerankData)\n )\n } catch (error) {\n console.error('Error:', error)\n } finally {\n setIsCallingApi(false)\n }\n }\n\n useEffect(() => {\n update()\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: '1fr',\n margin: '30px 2rem',\n }}\n >\n <FormControl variant=\"outlined\" margin=\"normal\">\n <TextField\n id=\"search\"\n type=\"search\"\n label=\"Search for custom model name\"\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 if (\n filteredRegistration.max_tokens &&\n filteredRegistration.dimensions\n ) {\n return (\n <EmbeddingCard\n url={endPoint}\n modelData={filteredRegistration}\n cardHeight={380}\n is_custom={true}\n />\n )\n } else if (\n filteredRegistration.model_type &&\n filteredRegistration.model_type === 'rerank'\n ) {\n return (\n <RerankCard\n url={endPoint}\n modelData={filteredRegistration}\n cardHeight={380}\n is_custom={true}\n />\n )\n } else {\n return (\n <ModelCard\n url={endPoint}\n modelData={filteredRegistration}\n gpuAvailable={gpuAvailable}\n is_custom={true}\n />\n )\n }\n })}\n </div>\n </Box>\n )\n}\n\nexport default LaunchCustom\n"],"mappings":"mkBAAA,OAASA,GAAG,CAAEC,WAAW,CAAEC,SAAS,KAAQ,eAAe,CAC3D,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAE9D,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,OAAO,KAAM,0BAA0B,CAC9C,MAAO,CAAAC,aAAa,KAAM,iBAAiB,CAC3C,MAAO,CAAAC,SAAS,KAAM,aAAa,CACnC,MAAO,CAAAC,UAAU,KAAM,cAAc,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAErC,GAAM,CAAAC,YAAY,CAAG,QAAf,CAAAA,YAAYA,CAAAC,IAAA,CAAyB,IAAnB,CAAAC,YAAY,CAAAD,IAAA,CAAZC,YAAY,CAClC,GAAI,CAAAC,QAAQ,CAAGf,UAAU,CAACG,UAAU,CAAC,C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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 React from'react';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));});export{Alert};","map":{"version":3,"names":["MuiAlert","React","jsx","_jsx","Alert","forwardRef","props","ref","_objectSpread","elevation","variant"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/alertComponent.js"],"sourcesContent":["import MuiAlert from '@mui/material/Alert'\nimport React from 'react'\n\nconst Alert = React.forwardRef(function Alert(props, ref) {\n return <MuiAlert elevation={6} ref={ref} variant=\"filled\" {...props} />\n})\n\nexport { Alert }\n"],"mappings":"4IAAA,MAAO,CAAAA,QAAQ,KAAM,qBAAqB,CAC1C,MAAO,CAAAC,KAAK,KAAM,OAAO,QAAAC,GAAA,IAAAC,IAAA,yBAEzB,GAAM,CAAAC,KAAK,cAAGH,KAAK,CAACI,UAAU,CAAC,QAAS,CAAAD,KAAKA,CAACE,KAAK,CAAEC,GAAG,CAAE,CACxD,mBAAOJ,IAAA,CAACH,QAAQ,CAAAQ,aAAA,EAACC,SAAS,CAAE,CAAE,CAACF,GAAG,CAAEA,GAAI,CAACG,OAAO,CAAC,QAAQ,EAAKJ,KAAK,CAAG,CAAC,CACzE,CAAC,CAAC,CAEF,OAASF,KAAK"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import{AppBar,Box,Toolbar}from'@mui/material';import Typography from'@mui/material/Typography';import*as React from'react';import icon from'../../media/icon.webp';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";export default function Header(){return/*#__PURE__*/_jsx(AppBar,{elevation:0,color:\"transparent\",sx:{backdropFilter:'blur(20px)',borderBottom:1,borderColor:'grey.300',zIndex:function zIndex(theme){return theme.zIndex.drawer+1;}},children:/*#__PURE__*/_jsxs(Toolbar,{sx:{justifyContent:'start'},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'})})]})});}","map":{"version":3,"names":["AppBar","Box","Toolbar","Typography","React","icon","jsx","_jsx","jsxs","_jsxs","Header","elevation","color","sx","backdropFilter","borderBottom","borderColor","zIndex","theme","drawer","children","justifyContent","component","alt","src","height","width","borderRadius","objectFit","mr","textAlign","fontWeight","fontSize"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/login/header.js"],"sourcesContent":["import { AppBar, Box, Toolbar } from '@mui/material'\nimport Typography from '@mui/material/Typography'\nimport * as React from 'react'\n\nimport icon from '../../media/icon.webp'\n\nexport default function Header() {\n return (\n <AppBar\n elevation={0}\n color=\"transparent\"\n sx={{\n backdropFilter: 'blur(20px)',\n borderBottom: 1,\n borderColor: 'grey.300',\n zIndex: (theme) => theme.zIndex.drawer + 1,\n }}\n >\n <Toolbar sx={{ justifyContent: 'start' }}>\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 </Toolbar>\n </AppBar>\n )\n}\n"],"mappings":"AAAA,OAASA,MAAM,CAAEC,GAAG,CAAEC,OAAO,KAAQ,eAAe,CACpD,MAAO,CAAAC,UAAU,KAAM,0BAA0B,CACjD,MAAO,GAAK,CAAAC,KAAK,KAAM,OAAO,CAE9B,MAAO,CAAAC,IAAI,KAAM,uBAAuB,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAExC,cAAe,SAAS,CAAAC,MAAMA,CAAA,CAAG,CAC/B,mBACEH,IAAA,CAACP,MAAM,EACLW,SAAS,CAAE,CAAE,CACbC,KAAK,CAAC,aAAa,CACnBC,EAAE,CAAE,CACFC,cAAc,CAAE,YAAY,CAC5BC,YAAY,CAAE,CAAC,CACfC,WAAW,CAAE,UAAU,CACvBC,MAAM,CAAE,SAAAA,OAACC,KAAK,QAAK,CAAAA,KAAK,CAACD,MAAM,CAACE,MAAM,CAAG,CAAC,EAC5C,CAAE,CAAAC,QAAA,cAEFX,KAAA,CAACP,OAAO,EAACW,EAAE,CAAE,CAAEQ,cAAc,CAAE,OAAQ,CAAE,CAAAD,QAAA,eACvCb,IAAA,CAACN,GAAG,EACFqB,SAAS,CAAC,KAAK,CACfC,GAAG,CAAC,SAAS,CACbC,GAAG,CAAEnB,IAAK,CACVoB,MAAM,CAAC,MAAM,CACbC,KAAK,CAAC,MAAM,CACZC,YAAY,CAAC,KAAK,CAClBd,EAAE,CAAE,CAAEe,SAAS,CAAE,OAAO,CAAEC,EAAE,CAAE,GAAI,CAAE,CACrC,CAAC,cACFtB,IAAA,CAACN,GAAG,EAAC6B,SAAS,CAAC,MAAM,CAAAV,QAAA,cACnBb,IAAA,CAACJ,UAAU,EAAC4B,UAAU,CAAC,MAAM,CAACC,QAAQ,CAAC,QAAQ,CAAAZ,QAAA,CAC5C,YAAY,CACH,CAAC,CACV,CAAC,EACC,CAAC,CACJ,CAAC,CAEb"},"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 _toConsumableArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";import _slicedToArray from\"/home/runner/work/inference/inference/xinference/web/ui/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{ChatOutlined,EditNoteOutlined,HelpCenterOutlined,RocketLaunchOutlined,UndoOutlined}from'@mui/icons-material';import DeleteIcon from'@mui/icons-material/Delete';import{Box,Chip,CircularProgress,FormControl,Grid,InputLabel,MenuItem,Select,Stack,TextField}from'@mui/material';import IconButton from'@mui/material/IconButton';import Typography from'@mui/material/Typography';import React,{useContext,useEffect,useState}from'react';import{useNavigate}from'react-router-dom';import{ApiContext}from'../../components/apiContext';import fetcher from'../../components/fetcher';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var CARD_HEIGHT=380;var CARD_WIDTH=300;var ModelCard=function ModelCard(_ref){var url=_ref.url,modelData=_ref.modelData,gpuAvailable=_ref.gpuAvailable,_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 _useContext=useContext(ApiContext),isCallingApi=_useContext.isCallingApi,setIsCallingApi=_useContext.setIsCallingApi;var _useContext2=useContext(ApiContext),isUpdatingModel=_useContext2.isUpdatingModel;var _useContext3=useContext(ApiContext),setErrorMsg=_useContext3.setErrorMsg;var navigate=useNavigate();// Model parameter selections\nvar _useState5=useState(''),_useState6=_slicedToArray(_useState5,2),modelUID=_useState6[0],setModelUID=_useState6[1];var _useState7=useState(''),_useState8=_slicedToArray(_useState7,2),modelFormat=_useState8[0],setModelFormat=_useState8[1];var _useState9=useState(''),_useState10=_slicedToArray(_useState9,2),modelSize=_useState10[0],setModelSize=_useState10[1];var _useState11=useState(''),_useState12=_slicedToArray(_useState11,2),quantization=_useState12[0],setQuantization=_useState12[1];var _useState13=useState('auto'),_useState14=_slicedToArray(_useState13,2),nGPU=_useState14[0],setNGPU=_useState14[1];var _useState15=useState([]),_useState16=_slicedToArray(_useState15,2),formatOptions=_useState16[0],setFormatOptions=_useState16[1];var _useState17=useState([]),_useState18=_slicedToArray(_useState17,2),sizeOptions=_useState18[0],setSizeOptions=_useState18[1];var _useState19=useState([]),_useState20=_slicedToArray(_useState19,2),quantizationOptions=_useState20[0],setQuantizationOptions=_useState20[1];var _useState21=useState(false),_useState22=_slicedToArray(_useState21,2),customDeleted=_useState22[0],setCustomDeleted=_useState22[1];var range=function range(start,end){return new Array(end-start+1).fill(undefined).map(function(_,i){return i+start;});};var isCached=function isCached(spec){if(spec.model_format==='pytorch'){return spec.cache_status&&spec.cache_status===true;}else{return spec.cache_status&&spec.cache_status.some(function(cs){return cs;});}};// model size can be int or string. For string style, \"1_8\" means 1.8 as an example.\nvar convertModelSize=function convertModelSize(size){return size.toString().includes('_')?size:parseInt(size,10);};// UseEffects for parameter selection, change options based on previous selections\nuseEffect(function(){if(modelData){var modelFamily=modelData.model_specs;var formats=_toConsumableArray(new Set(modelFamily.map(function(spec){return spec.model_format;})));setFormatOptions(formats);}},[modelData]);useEffect(function(){if(modelFormat&&modelData){var modelFamily=modelData.model_specs;var sizes=_toConsumableArray(new Set(modelFamily.filter(function(spec){return spec.model_format===modelFormat;}).map(function(spec){return spec.model_size_in_billions;})));setSizeOptions(sizes);}},[modelFormat,modelData]);useEffect(function(){if(modelFormat&&modelSize&&modelData){var modelFamily=modelData.model_specs;var quants=_toConsumableArray(new Set(modelFamily.filter(function(spec){return spec.model_format===modelFormat&&spec.model_size_in_billions===convertModelSize(modelSize);}).flatMap(function(spec){return spec.quantizations;})));setQuantizationOptions(quants);}},[modelFormat,modelSize,modelData]);var launchModel=function launchModel(url){if(isCallingApi||isUpdatingModel){return;}setIsCallingApi(true);var modelDataWithID={// If user does not fill model_uid, pass null (None) to server and server generates it.\nmodel_uid:modelUID.trim()===''?null:modelUID.trim(),model_name:modelData.model_name,model_format:modelFormat,model_size_in_billions:convertModelSize(modelSize),quantization:quantization,n_gpu:nGPU==='0'?null:nGPU==='auto'?'auto':parseInt(nGPU,10)};// First fetcher request to initiate the model\nfetcher(url+'/v1/models',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(modelDataWithID)}).then(function(response){if(!response.ok){// Assuming the server returns error details in JSON format\nresponse.json().then(function(errorData){setErrorMsg(\"Server error: \".concat(response.status,\" - \").concat(errorData.detail||'Unknown error'));});}else{navigate('/running_models');}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(CARD_HEIGHT,\"px\"),border:'1px solid #ddd',borderRadius:'20px',background:'white',overflow:'hidden'},containerSelected:{display:'block',position:'relative',width:\"\".concat(CARD_WIDTH,\"px\"),height:\"\".concat(CARD_HEIGHT,\"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(CARD_HEIGHT,\"px\"),border:'1px solid #ddd',padding:'20px',borderRadius:'20px',background:'white'},parameterCard:{position:'relative',top:\"-\".concat(CARD_HEIGHT+1,\"px\"),left:'-1px',width:\"\".concat(CARD_WIDTH,\"px\"),height:\"\".concat(CARD_HEIGHT,\"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'},h2:{margin:'10px 10px',fontSize:'20px'},p:{minHeight:'140px',fontSize:'14px',padding:'0px 10px 15px 10px'},buttonsContainer:{display:'flex',margin:'0 auto',marginTop:'15px',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'},tagRow:{margin:'2px 5px'}};var handeCustomDelete=function handeCustomDelete(e){e.stopPropagation();fetcher(url+\"/v1/model_registrations/LLM/\".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:[is_custom&&/*#__PURE__*/_jsxs(Stack,{direction:\"row\",justifyContent:\"space-evenly\",alignItems:\"center\",spacing:1,children:[/*#__PURE__*/_jsx(Typography,{variant:\"h4\",gutterBottom:true,noWrap:true,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(Stack,{spacing:1,direction:\"row\",useFlexGap:true,flexWrap:\"wrap\",sx:{marginLeft:1},children:[function(){return modelData.model_lang.map(function(v){return/*#__PURE__*/_jsx(Chip,{label:v,variant:\"outlined\",size:\"small\"});});}(),function(){if(modelData.model_specs.some(function(spec){return isCached(spec);})){return/*#__PURE__*/_jsx(Chip,{label:\"Cached\",variant:\"outlined\",size:\"small\"});}}(),function(){if(is_custom&&customDeleted){return/*#__PURE__*/_jsx(Chip,{label:\"Deleted\",variant:\"outlined\",size:\"small\"});}}()]}),/*#__PURE__*/_jsx(\"p\",{style:styles.p,children:modelData.model_description}),/*#__PURE__*/_jsxs(\"div\",{style:styles.iconRow,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsxs(\"span\",{style:styles.boldIconText,children:[Math.floor(modelData.context_length/1000),\"K\"]}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"context length\"})]}),function(){if(modelData.model_ability.includes('chat')){return/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(ChatOutlined,{style:styles.muiIcon}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"chat model\"})]});}else if(modelData.model_ability.includes('generate')){return/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(EditNoteOutlined,{style:styles.muiIcon}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"generate model\"})]});}else{return/*#__PURE__*/_jsxs(\"div\",{style:styles.iconItem,children:[/*#__PURE__*/_jsx(HelpCenterOutlined,{style:styles.muiIcon}),/*#__PURE__*/_jsx(\"small\",{style:styles.smallText,children:\"other model\"})]});}}()]})]}),/*#__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__*/_jsx(Box,{display:\"flex\",flexDirection:\"column\",width:\"100%\",mx:\"auto\",children:/*#__PURE__*/_jsxs(Grid,{container:true,rowSpacing:0,columnSpacing:1,children:[/*#__PURE__*/_jsx(Grid,{item:true,xs:6,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelFormat-label\",children:\"Model Format\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelFormat-label\",value:modelFormat,onChange:function onChange(e){return setModelFormat(e.target.value);},label:\"Model Format\",children:formatOptions.map(function(format){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===format;});var cached=specs.some(function(spec){return isCached(spec);});var displayedFormat=cached?format+' (cached)':format;return/*#__PURE__*/_jsx(MenuItem,{value:format,children:displayedFormat},format);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:6,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"modelSize-label\",children:\"Model Size\"}),/*#__PURE__*/_jsx(Select,{labelId:\"modelSize-label\",value:modelSize,onChange:function onChange(e){return setModelSize(e.target.value);},label:\"Model Size\",children:sizeOptions.map(function(size){var specs=modelData.model_specs.filter(function(spec){return spec.model_format===modelFormat;}).filter(function(spec){return spec.model_size_in_billions===size;});var cached=specs.some(function(spec){return isCached(spec);});var displayedSize=cached?size+' (cached)':size;return/*#__PURE__*/_jsx(MenuItem,{value:size,children:displayedSize},size);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:6,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"quantization-label\",children:\"Quantization\"}),/*#__PURE__*/_jsx(Select,{labelId:\"quantization-label\",value:quantization,onChange:function onChange(e){return setQuantization(e.target.value);},label:\"Quantization\",children:quantizationOptions.map(function(quant,index){var _specs$0$cache_status,_specs$,_specs$0$cache_status2,_specs$2,_specs$2$cache_status;var specs=modelData.model_specs.filter(function(spec){return spec.model_format===modelFormat;}).filter(function(spec){return spec.model_size_in_billions===convertModelSize(modelSize);});var cached=modelFormat==='pytorch'?(_specs$0$cache_status=(_specs$=specs[0])===null||_specs$===void 0?void 0:_specs$.cache_status)!==null&&_specs$0$cache_status!==void 0?_specs$0$cache_status:false===true:(_specs$0$cache_status2=(_specs$2=specs[0])===null||_specs$2===void 0?void 0:(_specs$2$cache_status=_specs$2.cache_status)===null||_specs$2$cache_status===void 0?void 0:_specs$2$cache_status[index])!==null&&_specs$0$cache_status2!==void 0?_specs$0$cache_status2:false===true;var displayedQuant=cached?quant+' (cached)':quant;return/*#__PURE__*/_jsx(MenuItem,{value:quant,children:displayedQuant},quant);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:6,children:/*#__PURE__*/_jsxs(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,disabled:!modelFormat||!modelSize||!quantization,children:[/*#__PURE__*/_jsx(InputLabel,{id:\"n-gpu-label\",children:\"N-GPU\"}),/*#__PURE__*/_jsx(Select,{labelId:\"n-gpu-label\",value:nGPU,onChange:function onChange(e){return setNGPU(e.target.value);},label:\"N-GPU\",children:['auto'].concat(range(0,modelFormat!=='pytorch'&&modelFormat!=='gptq'?1:gpuAvailable)).map(function(v){return/*#__PURE__*/_jsx(MenuItem,{value:v,children:v},v);})})]})}),/*#__PURE__*/_jsx(Grid,{item:true,xs:12,children:/*#__PURE__*/_jsx(FormControl,{variant:\"outlined\",margin:\"normal\",fullWidth:true,children:/*#__PURE__*/_jsx(TextField,{variant:\"outlined\",value:modelUID,label:\"(Optional) Model UID, model name by default\",onChange:function onChange(e){return setModelUID(e.target.value);}})})})]})}),/*#__PURE__*/_jsxs(Box,{style:styles.buttonsContainer,children:[/*#__PURE__*/_jsx(\"button\",{title:\"Launch\",style:styles.buttonContainer,onClick:function onClick(){return launchModel(url,modelData);},disabled:isCallingApi||isUpdatingModel||!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch')),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(!(modelFormat&&modelSize&&modelData&&(quantization||!modelData.is_builtin&&modelFormat!=='pytorch'))){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:\"Go Back\",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 ModelCard;","map":{"version":3,"names":["ChatOutlined","EditNoteOutlined","HelpCenterOutlined","RocketLaunchOutlined","UndoOutlined","DeleteIcon","Box","Chip","CircularProgress","FormControl","Grid","InputLabel","MenuItem","Select","Stack","TextField","IconButton","Typography","React","useContext","useEffect","useState","useNavigate","ApiContext","fetcher","jsx","_jsx","jsxs","_jsxs","CARD_HEIGHT","CARD_WIDTH","ModelCard","_ref","url","modelData","gpuAvailable","_ref$is_custom","is_custom","_useState","_useState2","_slicedToArray","hover","setHover","_useState3","_useState4","selected","setSelected","_useContext","isCallingApi","setIsCallingApi","_useContext2","isUpdatingModel","_useContext3","setErrorMsg","navigate","_useState5","_useState6","modelUID","setModelUID","_useState7","_useState8","modelFormat","setModelFormat","_useState9","_useState10","modelSize","setModelSize","_useState11","_useState12","quantization","setQuantization","_useState13","_useState14","nGPU","setNGPU","_useState15","_useState16","formatOptions","setFormatOptions","_useState17","_useState18","sizeOptions","setSizeOptions","_useState19","_useState20","quantizationOptions","setQuantizationOptions","_useState21","_useState22","customDeleted","setCustomDeleted","range","start","end","Array","fill","undefined","map","_","i","isCached","spec","model_format","cache_status","some","cs","convertModelSize","size","toString","includes","parseInt","modelFamily","model_specs","formats","_toConsumableArray","Set","sizes","filter","model_size_in_billions","quants","flatMap","quantizations","launchModel","modelDataWithID","model_uid","trim","model_name","n_gpu","method","headers","body","JSON","stringify","then","response","ok","json","errorData","concat","status","detail","catch","error","console","styles","container","display","position","width","height","border","borderRadius","background","overflow","containerSelected","boxShadow","descriptionCard","top","left","padding","parameterCard","img","margin","objectFit","h2","fontSize","p","minHeight","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","tagRow","handeCustomDelete","e","stopPropagation","style","onMouseEnter","onMouseLeave","onClick","children","direction","spacing","variant","gutterBottom","noWrap","disabled","useFlexGap","flexWrap","sx","marginLeft","model_lang","v","label","model_description","Math","floor","context_length","model_ability","_objectSpread","mx","rowSpacing","columnSpacing","item","xs","fullWidth","id","labelId","value","onChange","target","format","specs","cached","displayedFormat","displayedSize","quant","index","_specs$0$cache_status","_specs$","_specs$0$cache_status2","_specs$2","_specs$2$cache_status","displayedQuant","title","is_builtin"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/scenes/launch_model/modelCard.js"],"sourcesContent":["import {\n ChatOutlined,\n EditNoteOutlined,\n HelpCenterOutlined,\n RocketLaunchOutlined,\n UndoOutlined,\n} from '@mui/icons-material'\nimport DeleteIcon from '@mui/icons-material/Delete'\nimport {\n Box,\n Chip,\n CircularProgress,\n FormControl,\n Grid,\n InputLabel,\n MenuItem,\n Select,\n Stack,\n TextField,\n} from '@mui/material'\nimport IconButton from '@mui/material/IconButton'\nimport Typography from '@mui/material/Typography'\nimport React, { useContext, useEffect, useState } from 'react'\nimport { useNavigate } from 'react-router-dom'\n\nimport { ApiContext } from '../../components/apiContext'\nimport fetcher from '../../components/fetcher'\n\nconst CARD_HEIGHT = 380\nconst CARD_WIDTH = 300\n\nconst ModelCard = ({ url, modelData, gpuAvailable, is_custom = false }) => {\n const [hover, setHover] = useState(false)\n const [selected, setSelected] = useState(false)\n const { isCallingApi, setIsCallingApi } = useContext(ApiContext)\n const { isUpdatingModel } = useContext(ApiContext)\n const { setErrorMsg } = useContext(ApiContext)\n const navigate = useNavigate()\n\n // Model parameter selections\n const [modelUID, setModelUID] = useState('')\n const [modelFormat, setModelFormat] = useState('')\n const [modelSize, setModelSize] = useState('')\n const [quantization, setQuantization] = useState('')\n const [nGPU, setNGPU] = useState('auto')\n\n const [formatOptions, setFormatOptions] = useState([])\n const [sizeOptions, setSizeOptions] = useState([])\n const [quantizationOptions, setQuantizationOptions] = useState([])\n const [customDeleted, setCustomDeleted] = useState(false)\n\n const range = (start, end) => {\n return new Array(end - start + 1).fill(undefined).map((_, i) => i + start)\n }\n\n const isCached = (spec) => {\n if (spec.model_format === 'pytorch') {\n return spec.cache_status && spec.cache_status === true\n } else {\n return spec.cache_status && spec.cache_status.some((cs) => cs)\n }\n }\n\n // model size can be int or string. For string style, \"1_8\" means 1.8 as an example.\n const convertModelSize = (size) => {\n return size.toString().includes('_') ? size : parseInt(size, 10)\n }\n\n // UseEffects for parameter selection, change options based on previous selections\n useEffect(() => {\n if (modelData) {\n const modelFamily = modelData.model_specs\n const formats = [...new Set(modelFamily.map((spec) => spec.model_format))]\n setFormatOptions(formats)\n }\n }, [modelData])\n\n useEffect(() => {\n if (modelFormat && modelData) {\n const modelFamily = modelData.model_specs\n const sizes = [\n ...new Set(\n modelFamily\n .filter((spec) => spec.model_format === modelFormat)\n .map((spec) => spec.model_size_in_billions)\n ),\n ]\n setSizeOptions(sizes)\n }\n }, [modelFormat, modelData])\n\n useEffect(() => {\n if (modelFormat && modelSize && modelData) {\n const modelFamily = modelData.model_specs\n const quants = [\n ...new Set(\n modelFamily\n .filter(\n (spec) =>\n spec.model_format === modelFormat &&\n spec.model_size_in_billions === convertModelSize(modelSize)\n )\n .flatMap((spec) => spec.quantizations)\n ),\n ]\n setQuantizationOptions(quants)\n }\n }, [modelFormat, modelSize, modelData])\n\n const launchModel = (url) => {\n if (isCallingApi || isUpdatingModel) {\n return\n }\n\n setIsCallingApi(true)\n\n const modelDataWithID = {\n // If user does not fill model_uid, pass null (None) to server and server generates it.\n model_uid: modelUID.trim() === '' ? null : modelUID.trim(),\n model_name: modelData.model_name,\n model_format: modelFormat,\n model_size_in_billions: convertModelSize(modelSize),\n quantization: quantization,\n n_gpu:\n nGPU === '0' ? null : nGPU === 'auto' ? 'auto' : parseInt(nGPU, 10),\n }\n\n // First fetcher request to initiate the model\n fetcher(url + '/v1/models', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(modelDataWithID),\n })\n .then((response) => {\n if (!response.ok) {\n // Assuming the server returns error details in JSON format\n response.json().then((errorData) => {\n setErrorMsg(\n `Server error: ${response.status} - ${\n errorData.detail || 'Unknown error'\n }`\n )\n })\n } else {\n navigate('/running_models')\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: `${CARD_HEIGHT}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: `${CARD_HEIGHT}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: `${CARD_HEIGHT}px`,\n border: '1px solid #ddd',\n padding: '20px',\n borderRadius: '20px',\n background: 'white',\n },\n parameterCard: {\n position: 'relative',\n top: `-${CARD_HEIGHT + 1}px`,\n left: '-1px',\n width: `${CARD_WIDTH}px`,\n height: `${CARD_HEIGHT}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 h2: {\n margin: '10px 10px',\n fontSize: '20px',\n },\n p: {\n minHeight: '140px',\n fontSize: '14px',\n padding: '0px 10px 15px 10px',\n },\n buttonsContainer: {\n display: 'flex',\n margin: '0 auto',\n marginTop: '15px',\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 tagRow: {\n margin: '2px 5px',\n },\n }\n\n const handeCustomDelete = (e) => {\n e.stopPropagation()\n fetcher(url + `/v1/model_registrations/LLM/${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 {is_custom && (\n <Stack\n direction=\"row\"\n justifyContent=\"space-evenly\"\n alignItems=\"center\"\n spacing={1}\n >\n <Typography variant=\"h4\" gutterBottom noWrap>\n {modelData.model_name}\n </Typography>\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 <Stack\n spacing={1}\n direction=\"row\"\n useFlexGap\n flexWrap=\"wrap\"\n sx={{ marginLeft: 1 }}\n >\n {(() => {\n return modelData.model_lang.map((v) => {\n return <Chip label={v} variant=\"outlined\" size=\"small\" />\n })\n })()}\n {(() => {\n if (modelData.model_specs.some((spec) => isCached(spec))) {\n return <Chip label=\"Cached\" variant=\"outlined\" size=\"small\" />\n }\n })()}\n {(() => {\n if (is_custom && customDeleted) {\n return <Chip label=\"Deleted\" variant=\"outlined\" size=\"small\" />\n }\n })()}\n </Stack>\n <p style={styles.p}>{modelData.model_description}</p>\n\n <div style={styles.iconRow}>\n <div style={styles.iconItem}>\n <span style={styles.boldIconText}>\n {Math.floor(modelData.context_length / 1000)}K\n </span>\n <small style={styles.smallText}>context length</small>\n </div>\n {(() => {\n if (modelData.model_ability.includes('chat')) {\n return (\n <div style={styles.iconItem}>\n <ChatOutlined style={styles.muiIcon} />\n <small style={styles.smallText}>chat model</small>\n </div>\n )\n } else if (modelData.model_ability.includes('generate')) {\n return (\n <div style={styles.iconItem}>\n <EditNoteOutlined style={styles.muiIcon} />\n <small style={styles.smallText}>generate model</small>\n </div>\n )\n } else {\n return (\n <div style={styles.iconItem}>\n <HelpCenterOutlined style={styles.muiIcon} />\n <small style={styles.smallText}>other model</small>\n </div>\n )\n }\n })()}\n </div>\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 display=\"flex\" flexDirection=\"column\" width=\"100%\" mx=\"auto\">\n <Grid container rowSpacing={0} columnSpacing={1}>\n <Grid item xs={6}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <InputLabel id=\"modelFormat-label\">Model Format</InputLabel>\n <Select\n labelId=\"modelFormat-label\"\n value={modelFormat}\n onChange={(e) => setModelFormat(e.target.value)}\n label=\"Model Format\"\n >\n {formatOptions.map((format) => {\n const specs = modelData.model_specs.filter(\n (spec) => spec.model_format === format\n )\n const cached = specs.some((spec) => isCached(spec))\n const displayedFormat = cached\n ? format + ' (cached)'\n : format\n\n return (\n <MenuItem key={format} value={format}>\n {displayedFormat}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={6}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat}\n >\n <InputLabel id=\"modelSize-label\">Model Size</InputLabel>\n <Select\n labelId=\"modelSize-label\"\n value={modelSize}\n onChange={(e) => setModelSize(e.target.value)}\n label=\"Model Size\"\n >\n {sizeOptions.map((size) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === modelFormat)\n .filter((spec) => spec.model_size_in_billions === size)\n const cached = specs.some((spec) => isCached(spec))\n const displayedSize = cached ? size + ' (cached)' : size\n\n return (\n <MenuItem key={size} value={size}>\n {displayedSize}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={6}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize}\n >\n <InputLabel id=\"quantization-label\">Quantization</InputLabel>\n <Select\n labelId=\"quantization-label\"\n value={quantization}\n onChange={(e) => setQuantization(e.target.value)}\n label=\"Quantization\"\n >\n {quantizationOptions.map((quant, index) => {\n const specs = modelData.model_specs\n .filter((spec) => spec.model_format === modelFormat)\n .filter(\n (spec) =>\n spec.model_size_in_billions ===\n convertModelSize(modelSize)\n )\n\n const cached =\n modelFormat === 'pytorch'\n ? specs[0]?.cache_status ?? false === true\n : specs[0]?.cache_status?.[index] ?? false === true\n const displayedQuant = cached ? quant + ' (cached)' : quant\n\n return (\n <MenuItem key={quant} value={quant}>\n {displayedQuant}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={6}>\n <FormControl\n variant=\"outlined\"\n margin=\"normal\"\n fullWidth\n disabled={!modelFormat || !modelSize || !quantization}\n >\n <InputLabel id=\"n-gpu-label\">N-GPU</InputLabel>\n <Select\n labelId=\"n-gpu-label\"\n value={nGPU}\n onChange={(e) => setNGPU(e.target.value)}\n label=\"N-GPU\"\n >\n {['auto']\n .concat(\n range(\n 0,\n modelFormat !== 'pytorch' && modelFormat !== 'gptq'\n ? 1\n : gpuAvailable\n )\n )\n .map((v) => {\n return (\n <MenuItem key={v} value={v}>\n {v}\n </MenuItem>\n )\n })}\n </Select>\n </FormControl>\n </Grid>\n <Grid item xs={12}>\n <FormControl variant=\"outlined\" margin=\"normal\" fullWidth>\n <TextField\n variant=\"outlined\"\n value={modelUID}\n label=\"(Optional) Model UID, model name by default\"\n onChange={(e) => setModelUID(e.target.value)}\n />\n </FormControl>\n </Grid>\n </Grid>\n </Box>\n <Box style={styles.buttonsContainer}>\n <button\n title=\"Launch\"\n style={styles.buttonContainer}\n onClick={() => launchModel(url, modelData)}\n disabled={\n isCallingApi ||\n isUpdatingModel ||\n !(\n modelFormat &&\n modelSize &&\n modelData &&\n (quantization ||\n (!modelData.is_builtin && modelFormat !== 'pytorch'))\n )\n }\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 (\n !(\n modelFormat &&\n modelSize &&\n modelData &&\n (quantization ||\n (!modelData.is_builtin && modelFormat !== 'pytorch'))\n )\n ) {\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=\"Go Back\"\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 ModelCard\n"],"mappings":"8aAAA,OACEA,YAAY,CACZC,gBAAgB,CAChBC,kBAAkB,CAClBC,oBAAoB,CACpBC,YAAY,KACP,qBAAqB,CAC5B,MAAO,CAAAC,UAAU,KAAM,4BAA4B,CACnD,OACEC,GAAG,CACHC,IAAI,CACJC,gBAAgB,CAChBC,WAAW,CACXC,IAAI,CACJC,UAAU,CACVC,QAAQ,CACRC,MAAM,CACNC,KAAK,CACLC,SAAS,KACJ,eAAe,CACtB,MAAO,CAAAC,UAAU,KAAM,0BAA0B,CACjD,MAAO,CAAAC,UAAU,KAAM,0BAA0B,CACjD,MAAO,CAAAC,KAAK,EAAIC,UAAU,CAAEC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAC9D,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,UAAU,KAAQ,6BAA6B,CACxD,MAAO,CAAAC,OAAO,KAAM,0BAA0B,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE9C,GAAM,CAAAC,WAAW,CAAG,GAAG,CACvB,GAAM,CA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AI1L,WAAW,GAAK,SAAU,CAAC,CACxD,CACD,CACA,mBACEnC,IAAA,CAACpB,GAAG,EACFgM,KAAK,CAAAuB,aAAA,CAAAA,aAAA,IAAO7E,MAAM,CAACiC,UAAU,MAAEH,eAAe,CAAE,SAAS,EAAG,CAAA4B,QAAA,cAE5DhL,IAAA,CAACvB,oBAAoB,EAACwG,IAAI,CAAC,MAAM,CAAE,CAAC,CACjC,CAAC,CAEV,CAAC,IAAM,CACL,mBACEjF,IAAA,CAACpB,GAAG,EAACgM,KAAK,CAAEtD,MAAM,CAACiC,UAAW,CAAAyB,QAAA,cAC5BhL,IAAA,CAACvB,oBAAoB,EAACiL,KAAK,CAAC,SAAS,CAACzE,IAAI,CAAC,MAAM,CAAE,CAAC,CACjD,CAAC,CAEV,CACF,CAAC,CAAE,CAAC,CACE,CAAC,cACTjF,IAAA,WACE4N,KAAK,CAAC,SAAS,CACfhD,KAAK,CAAEtD,MAAM,CAAC4B,eAAgB,CAC9B6B,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAA3J,WAAW,CAAC,KAAK,CAAC,EAAC,CAAA4J,QAAA,cAElChL,IAAA,CAACpB,GAAG,EAACgM,KAAK,CAAEtD,MAAM,CAACiC,UAAW,CAAAyB,QAAA,cAC5BhL,IAAA,CAACtB,YAAY,EAACgL,KAAK,CAAC,SAAS,CAACzE,IAAI,CAAC,MAAM,CAAE,CAAC,CACzC,CAAC,CACA,CAAC,EACN,CAAC,EACH,CAAC,EACH,CAAC,CAEV,CAAC,CAED,cAAe,CAAA5E,SAAS"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"import * as React from 'react';\nimport Cookies from './Cookies';\nvar CookiesContext = React.createContext(new Cookies());\nvar Provider = CookiesContext.Provider,\n Consumer = CookiesContext.Consumer;\nexport { Provider, Consumer };\nexport default CookiesContext;","map":{"version":3,"names":["React","Cookies","CookiesContext","createContext","Provider","Consumer"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/node_modules/react-cookie/es6/CookiesContext.js"],"sourcesContent":["import * as React from 'react';\nimport Cookies from './Cookies';\nconst CookiesContext = React.createContext(new Cookies());\nexport const { Provider, Consumer } = CookiesContext;\nexport default CookiesContext;\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,OAAO,MAAM,WAAW;AAC/B,IAAMC,cAAc,GAAGF,KAAK,CAACG,aAAa,CAAC,IAAIF,OAAO,CAAC,CAAC,CAAC;AAClD,IAAQG,QAAQ,GAAeF,cAAc,CAArCE,QAAQ;EAAEC,QAAQ,GAAKH,cAAc,CAA3BG,QAAQ;AAAoB,SAAAD,QAAA,EAAAC,QAAA;AACrD,eAAeH,cAAc"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"/*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module exports.\n * @public\n */\nexports.parse = parse;\nexports.serialize = serialize;\n\n/**\n * Module variables.\n * @private\n */\n\nvar __toString = Object.prototype.toString;\n\n/**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n * obs-text = %x80-FF\n */\n\nvar fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\n/**\n * Parse a cookie header.\n *\n * Parse the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n *\n * @param {string} str\n * @param {object} [options]\n * @return {object}\n * @public\n */\n\nfunction parse(str, options) {\n if (typeof str !== 'string') {\n throw new TypeError('argument str must be a string');\n }\n var obj = {};\n var opt = options || {};\n var dec = opt.decode || decode;\n var index = 0;\n while (index < str.length) {\n var eqIdx = str.indexOf('=', index);\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break;\n }\n var endIdx = str.indexOf(';', index);\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(';', eqIdx - 1) + 1;\n continue;\n }\n var key = str.slice(index, eqIdx).trim();\n\n // only assign once\n if (undefined === obj[key]) {\n var val = str.slice(eqIdx + 1, endIdx).trim();\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n obj[key] = tryDecode(val, dec);\n }\n index = endIdx + 1;\n }\n return obj;\n}\n\n/**\n * Serialize data into a cookie header.\n *\n * Serialize the a name value pair into a cookie string suitable for\n * http headers. An optional options object specified cookie parameters.\n *\n * serialize('foo', 'bar', { httpOnly: true })\n * => \"foo=bar; httpOnly\"\n *\n * @param {string} name\n * @param {string} val\n * @param {object} [options]\n * @return {string}\n * @public\n */\n\nfunction serialize(name, val, options) {\n var opt = options || {};\n var enc = opt.encode || encode;\n if (typeof enc !== 'function') {\n throw new TypeError('option encode is invalid');\n }\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError('argument name is invalid');\n }\n var value = enc(val);\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError('argument val is invalid');\n }\n var str = name + '=' + value;\n if (null != opt.maxAge) {\n var maxAge = opt.maxAge - 0;\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError('option maxAge is invalid');\n }\n str += '; Max-Age=' + Math.floor(maxAge);\n }\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n str += '; Domain=' + opt.domain;\n }\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n str += '; Path=' + opt.path;\n }\n if (opt.expires) {\n var expires = opt.expires;\n if (!isDate(expires) || isNaN(expires.valueOf())) {\n throw new TypeError('option expires is invalid');\n }\n str += '; Expires=' + expires.toUTCString();\n }\n if (opt.httpOnly) {\n str += '; HttpOnly';\n }\n if (opt.secure) {\n str += '; Secure';\n }\n if (opt.priority) {\n var priority = typeof opt.priority === 'string' ? opt.priority.toLowerCase() : opt.priority;\n switch (priority) {\n case 'low':\n str += '; Priority=Low';\n break;\n case 'medium':\n str += '; Priority=Medium';\n break;\n case 'high':\n str += '; Priority=High';\n break;\n default:\n throw new TypeError('option priority is invalid');\n }\n }\n if (opt.sameSite) {\n var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n case 'lax':\n str += '; SameSite=Lax';\n break;\n case 'strict':\n str += '; SameSite=Strict';\n break;\n case 'none':\n str += '; SameSite=None';\n break;\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n return str;\n}\n\n/**\n * URL-decode string value. Optimized to skip native call when no %.\n *\n * @param {string} str\n * @returns {string}\n */\n\nfunction decode(str) {\n return str.indexOf('%') !== -1 ? decodeURIComponent(str) : str;\n}\n\n/**\n * URL-encode value.\n *\n * @param {string} str\n * @returns {string}\n */\n\nfunction encode(val) {\n return encodeURIComponent(val);\n}\n\n/**\n * Determine if value is a Date.\n *\n * @param {*} val\n * @private\n */\n\nfunction isDate(val) {\n return __toString.call(val) === '[object Date]' || val instanceof Date;\n}\n\n/**\n * Try decoding a string using a decoding function.\n *\n * @param {string} str\n * @param {function} decode\n * @private\n */\n\nfunction tryDecode(str, decode) {\n try {\n return decode(str);\n } catch (e) {\n return str;\n }\n}","map":{"version":3,"names":["exports","parse","serialize","__toString","Object","prototype","toString","fieldContentRegExp","str","options","TypeError","obj","opt","dec","decode","index","length","eqIdx","indexOf","endIdx","lastIndexOf","key","slice","trim","undefined","val","charCodeAt","tryDecode","name","enc","encode","test","value","maxAge","isNaN","isFinite","Math","floor","domain","path","expires","isDate","valueOf","toUTCString","httpOnly","secure","priority","toLowerCase","sameSite","decodeURIComponent","encodeURIComponent","call","Date","e"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/node_modules/cookie/index.js"],"sourcesContent":["/*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module exports.\n * @public\n */\n\nexports.parse = parse;\nexports.serialize = serialize;\n\n/**\n * Module variables.\n * @private\n */\n\nvar __toString = Object.prototype.toString\n\n/**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n * obs-text = %x80-FF\n */\n\nvar fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\n/**\n * Parse a cookie header.\n *\n * Parse the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n *\n * @param {string} str\n * @param {object} [options]\n * @return {object}\n * @public\n */\n\nfunction parse(str, options) {\n if (typeof str !== 'string') {\n throw new TypeError('argument str must be a string');\n }\n\n var obj = {}\n var opt = options || {};\n var dec = opt.decode || decode;\n\n var index = 0\n while (index < str.length) {\n var eqIdx = str.indexOf('=', index)\n\n // no more cookie pairs\n if (eqIdx === -1) {\n break\n }\n\n var endIdx = str.indexOf(';', index)\n\n if (endIdx === -1) {\n endIdx = str.length\n } else if (endIdx < eqIdx) {\n // backtrack on prior semicolon\n index = str.lastIndexOf(';', eqIdx - 1) + 1\n continue\n }\n\n var key = str.slice(index, eqIdx).trim()\n\n // only assign once\n if (undefined === obj[key]) {\n var val = str.slice(eqIdx + 1, endIdx).trim()\n\n // quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1)\n }\n\n obj[key] = tryDecode(val, dec);\n }\n\n index = endIdx + 1\n }\n\n return obj;\n}\n\n/**\n * Serialize data into a cookie header.\n *\n * Serialize the a name value pair into a cookie string suitable for\n * http headers. An optional options object specified cookie parameters.\n *\n * serialize('foo', 'bar', { httpOnly: true })\n * => \"foo=bar; httpOnly\"\n *\n * @param {string} name\n * @param {string} val\n * @param {object} [options]\n * @return {string}\n * @public\n */\n\nfunction serialize(name, val, options) {\n var opt = options || {};\n var enc = opt.encode || encode;\n\n if (typeof enc !== 'function') {\n throw new TypeError('option encode is invalid');\n }\n\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError('argument name is invalid');\n }\n\n var value = enc(val);\n\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError('argument val is invalid');\n }\n\n var str = name + '=' + value;\n\n if (null != opt.maxAge) {\n var maxAge = opt.maxAge - 0;\n\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError('option maxAge is invalid')\n }\n\n str += '; Max-Age=' + Math.floor(maxAge);\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n\n str += '; Domain=' + opt.domain;\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n\n str += '; Path=' + opt.path;\n }\n\n if (opt.expires) {\n var expires = opt.expires\n\n if (!isDate(expires) || isNaN(expires.valueOf())) {\n throw new TypeError('option expires is invalid');\n }\n\n str += '; Expires=' + expires.toUTCString()\n }\n\n if (opt.httpOnly) {\n str += '; HttpOnly';\n }\n\n if (opt.secure) {\n str += '; Secure';\n }\n\n if (opt.priority) {\n var priority = typeof opt.priority === 'string'\n ? opt.priority.toLowerCase()\n : opt.priority\n\n switch (priority) {\n case 'low':\n str += '; Priority=Low'\n break\n case 'medium':\n str += '; Priority=Medium'\n break\n case 'high':\n str += '; Priority=High'\n break\n default:\n throw new TypeError('option priority is invalid')\n }\n }\n\n if (opt.sameSite) {\n var sameSite = typeof opt.sameSite === 'string'\n ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n case 'lax':\n str += '; SameSite=Lax';\n break;\n case 'strict':\n str += '; SameSite=Strict';\n break;\n case 'none':\n str += '; SameSite=None';\n break;\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n\n return str;\n}\n\n/**\n * URL-decode string value. Optimized to skip native call when no %.\n *\n * @param {string} str\n * @returns {string}\n */\n\nfunction decode (str) {\n return str.indexOf('%') !== -1\n ? decodeURIComponent(str)\n : str\n}\n\n/**\n * URL-encode value.\n *\n * @param {string} str\n * @returns {string}\n */\n\nfunction encode (val) {\n return encodeURIComponent(val)\n}\n\n/**\n * Determine if value is a Date.\n *\n * @param {*} val\n * @private\n */\n\nfunction isDate (val) {\n return __toString.call(val) === '[object Date]' ||\n val instanceof Date\n}\n\n/**\n * Try decoding a string using a decoding function.\n *\n * @param {string} str\n * @param {function} decode\n * @private\n */\n\nfunction tryDecode(str, decode) {\n try {\n return decode(str);\n } catch (e) {\n return str;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY;;AAEZ;AACA;AACA;AACA;AAEAA,OAAO,CAACC,KAAK,GAAGA,KAAK;AACrBD,OAAO,CAACE,SAAS,GAAGA,SAAS;;AAE7B;AACA;AACA;AACA;;AAEA,IAAIC,UAAU,GAAGC,MAAM,CAACC,SAAS,CAACC,QAAQ;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAIC,kBAAkB,GAAG,uCAAuC;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASN,KAAKA,CAACO,GAAG,EAAEC,OAAO,EAAE;EAC3B,IAAI,OAAOD,GAAG,KAAK,QAAQ,EAAE;IAC3B,MAAM,IAAIE,SAAS,CAAC,+BAA+B,CAAC;EACtD;EAEA,IAAIC,GAAG,GAAG,CAAC,CAAC;EACZ,IAAIC,GAAG,GAAGH,OAAO,IAAI,CAAC,CAAC;EACvB,IAAII,GAAG,GAAGD,GAAG,CAACE,MAAM,IAAIA,MAAM;EAE9B,IAAIC,KAAK,GAAG,CAAC;EACb,OAAOA,KAAK,GAAGP,GAAG,CAACQ,MAAM,EAAE;IACzB,IAAIC,KAAK,GAAGT,GAAG,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,gBAAgB;QACvB;MACF,KAAK,QAAQ;QACXA,GAAG,IAAI,mBAAmB;QAC1B;MACF,KAAK,MAAM;QACTA,GAAG,IAAI,iBAAiB;QACxB;MACF;QACE,MAAM,IAAIE,SAAS,CAAC,4BAA4B,CAAC;IACrD;EACF;EAEA,OAAOF,GAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASM,MAAMA,CAAEN,GAAG,EAAE;EACpB,OAAOA,GAAG,CAACU,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAC1B+B,kBAAkB,CAACzC,GAAG,CAAC,GACvBA,GAAG;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASsB,MAAMA,CAAEL,GAAG,EAAE;EACpB,OAAOyB,kBAAkB,CAACzB,GAAG,CAAC;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASgB,MAAMA,CAAEhB,GAAG,EAAE;EACpB,OAAOtB,UAAU,CAACgD,IAAI,CAAC1B,GAAG,CAAC,KAAK,eAAe,IAC7CA,GAAG,YAAY2B,IAAI;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASzB,SAASA,CAACnB,GAAG,EAAEM,MAAM,EAAE;EAC9B,IAAI;IACF,OAAOA,MAAM,CAACN,GAAG,CAAC;EACpB,CAAC,CAAC,OAAO6C,CAAC,EAAE;IACV,OAAO7C,GAAG;EACZ;AACF"},"metadata":{},"sourceType":"script","externalDependencies":[]}
@@ -0,0 +1 @@
1
+ {"ast":null,"code":"var getEndpoint=function getEndpoint(){var endPoint='';if(!process.env.NODE_ENV||process.env.NODE_ENV==='development'){endPoint='http://127.0.0.1:9997';}else{var fullUrl=window.location.href;endPoint=fullUrl.split('/ui')[0];}return endPoint;};var isValidBearerToken=function isValidBearerToken(token){return token!==''&&token!==undefined&&token!==null&&token.length>10;};export{getEndpoint,isValidBearerToken};","map":{"version":3,"names":["getEndpoint","endPoint","process","env","NODE_ENV","fullUrl","window","location","href","split","isValidBearerToken","token","undefined","length"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/utils.js"],"sourcesContent":["const getEndpoint = () => {\n let endPoint = ''\n if (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') {\n endPoint = 'http://127.0.0.1:9997'\n } else {\n const fullUrl = window.location.href\n endPoint = fullUrl.split('/ui')[0]\n }\n return endPoint\n}\n\nconst isValidBearerToken = (token) => {\n return (\n token !== '' && token !== undefined && token !== null && token.length > 10\n )\n}\n\nexport { getEndpoint, isValidBearerToken }\n"],"mappings":"AAAA,GAAM,CAAAA,WAAW,CAAG,QAAd,CAAAA,WAAWA,CAAA,CAAS,CACxB,GAAI,CAAAC,QAAQ,CAAG,EAAE,CACjB,GAAI,CAACC,OAAO,CAACC,GAAG,CAACC,QAAQ,EAAIF,OAAO,CAACC,GAAG,CAACC,QAAQ,GAAK,aAAa,CAAE,CACnEH,QAAQ,CAAG,uBAAuB,CACpC,CAAC,IAAM,CACL,GAAM,CAAAI,OAAO,CAAGC,MAAM,CAACC,QAAQ,CAACC,IAAI,CACpCP,QAAQ,CAAGI,OAAO,CAACI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACpC,CACA,MAAO,CAAAR,QAAQ,CACjB,CAAC,CAED,GAAM,CAAAS,kBAAkB,CAAG,QAArB,CAAAA,kBAAkBA,CAAIC,KAAK,CAAK,CACpC,MACE,CAAAA,KAAK,GAAK,EAAE,EAAIA,KAAK,GAAKC,SAAS,EAAID,KAAK,GAAK,IAAI,EAAIA,KAAK,CAACE,MAAM,CAAG,EAAE,CAE9E,CAAC,CAED,OAASb,WAAW,CAAEU,kBAAkB"},"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 ExitToAppIcon from'@mui/icons-material/ExitToApp';import{Box,Stack,Typography}from'@mui/material';import Button from'@mui/material/Button';import{useCookies}from'react-cookie';import{useNavigate}from'react-router-dom';import{isValidBearerToken}from'./utils';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var Title=function Title(_ref){var title=_ref.title;var _useCookies=useCookies(['token']),_useCookies2=_slicedToArray(_useCookies,3),cookie=_useCookies2[0],removeCookie=_useCookies2[2];var navigate=useNavigate();var handleLogout=function handleLogout(){removeCookie('token',{path:'/'});navigate('/login',{replace:true});};return/*#__PURE__*/_jsx(Box,{mb:\"30px\",children:/*#__PURE__*/_jsxs(Stack,{direction:\"row\",alignItems:\"center\",justifyContent:\"space-between\",children:[/*#__PURE__*/_jsx(Typography,{variant:\"h2\",color:\"#141414\",fontWeight:\"bold\",sx:{m:'0 0 5px 0'},children:title}),isValidBearerToken(cookie.token)&&/*#__PURE__*/_jsx(Button,{variant:\"outlined\",size:\"large\",onClick:handleLogout,startIcon:/*#__PURE__*/_jsx(ExitToAppIcon,{}),children:\"LOG OUT\"})]})});};export default Title;","map":{"version":3,"names":["ExitToAppIcon","Box","Stack","Typography","Button","useCookies","useNavigate","isValidBearerToken","jsx","_jsx","jsxs","_jsxs","Title","_ref","title","_useCookies","_useCookies2","_slicedToArray","cookie","removeCookie","navigate","handleLogout","path","replace","mb","children","direction","alignItems","justifyContent","variant","color","fontWeight","sx","m","token","size","onClick","startIcon"],"sources":["/home/runner/work/inference/inference/xinference/web/ui/src/components/Title.js"],"sourcesContent":["import ExitToAppIcon from '@mui/icons-material/ExitToApp'\nimport { Box, Stack, Typography } from '@mui/material'\nimport Button from '@mui/material/Button'\nimport { useCookies } from 'react-cookie'\nimport { useNavigate } from 'react-router-dom'\n\nimport { isValidBearerToken } from './utils'\n\nconst Title = ({ title }) => {\n const [cookie, , removeCookie] = useCookies(['token'])\n const navigate = useNavigate()\n\n const handleLogout = () => {\n removeCookie('token', { path: '/' })\n navigate('/login', { replace: true })\n }\n\n return (\n <Box mb=\"30px\">\n <Stack direction=\"row\" alignItems=\"center\" justifyContent=\"space-between\">\n <Typography\n variant=\"h2\"\n color=\"#141414\"\n fontWeight=\"bold\"\n sx={{ m: '0 0 5px 0' }}\n >\n {title}\n </Typography>\n {isValidBearerToken(cookie.token) && (\n <Button\n variant=\"outlined\"\n size=\"large\"\n onClick={handleLogout}\n startIcon={<ExitToAppIcon />}\n >\n LOG OUT\n </Button>\n )}\n </Stack>\n </Box>\n )\n}\n\nexport default Title\n"],"mappings":"6IAAA,MAAO,CAAAA,aAAa,KAAM,+BAA+B,CACzD,OAASC,GAAG,CAAEC,KAAK,CAAEC,UAAU,KAAQ,eAAe,CACtD,MAAO,CAAAC,MAAM,KAAM,sBAAsB,CACzC,OAASC,UAAU,KAAQ,cAAc,CACzC,OAASC,WAAW,KAAQ,kBAAkB,CAE9C,OAASC,kBAAkB,KAAQ,SAAS,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAE5C,GAAM,CAAAC,KAAK,CAAG,QAAR,CAAAA,KAAKA,CAAAC,IAAA,CAAkB,IAAZ,CAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACpB,IAAAC,WAAA,CAAiCV,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAAW,YAAA,CAAAC,cAAA,CAAAF,WAAA,IAA/CG,MAAM,CAAAF,YAAA,IAAIG,YAAY,CAAAH,YAAA,IAC7B,GAAM,CAAAI,QAAQ,CAAGd,WAAW,CAAC,CAAC,CAE9B,GAAM,CAAAe,YAAY,CAAG,QAAf,CAAAA,YAAYA,CAAA,CAAS,CACzBF,YAAY,CAAC,OAAO,CAAE,CAAEG,IAAI,CAAE,GAAI,CAAC,CAAC,CACpCF,QAAQ,CAAC,QAAQ,CAAE,CAAEG,OAAO,CAAE,IAAK,CAAC,CAAC,CACvC,CAAC,CAED,mBACEd,IAAA,CAACR,GAAG,EAACuB,EAAE,CAAC,MAAM,CAAAC,QAAA,cACZd,KAAA,CAACT,KAAK,EAACwB,SAAS,CAAC,KAAK,CAACC,UAAU,CAAC,QAAQ,CAACC,cAAc,CAAC,eAAe,CAAAH,QAAA,eACvEhB,IAAA,CAACN,UAAU,EACT0B,OAAO,CAAC,IAAI,CACZC,KAAK,CAAC,SAAS,CACfC,UAAU,CAAC,MAAM,CACjBC,EAAE,CAAE,CAAEC,CAAC,CAAE,WAAY,CAAE,CAAAR,QAAA,CAEtBX,KAAK,CACI,CAAC,CACZP,kBAAkB,CAACW,MAAM,CAACgB,KAAK,CAAC,eAC/BzB,IAAA,CAACL,MAAM,EACLyB,OAAO,CAAC,UAAU,CAClBM,IAAI,CAAC,OAAO,CACZC,OAAO,CAAEf,YAAa,CACtBgB,SAAS,cAAE5B,IAAA,CAACT,aAAa,GAAE,CAAE,CAAAyB,QAAA,CAC9B,SAED,CAAQ,CACT,EACI,CAAC,CACL,CAAC,CAEV,CAAC,CAED,cAAe,CAAAb,KAAK"},"metadata":{},"sourceType":"module","externalDependencies":[]}
@@ -4917,6 +4917,11 @@
4917
4917
  "@types/node": "*"
4918
4918
  }
4919
4919
  },
4920
+ "node_modules/@types/cookie": {
4921
+ "version": "0.5.4",
4922
+ "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.4.tgz",
4923
+ "integrity": "sha512-7z/eR6O859gyWIAjuvBWFzNURmf2oPBmJlfVWkwehU5nzIyjwBsTh7WMmEEV4JFnHuQ3ex4oyTvfKzcyJVDBNA=="
4924
+ },
4920
4925
  "node_modules/@types/d3-color": {
4921
4926
  "version": "2.0.3",
4922
4927
  "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-2.0.3.tgz",
@@ -5026,6 +5031,15 @@
5026
5031
  "@types/node": "*"
5027
5032
  }
5028
5033
  },
5034
+ "node_modules/@types/hoist-non-react-statics": {
5035
+ "version": "3.3.5",
5036
+ "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz",
5037
+ "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==",
5038
+ "dependencies": {
5039
+ "@types/react": "*",
5040
+ "hoist-non-react-statics": "^3.3.0"
5041
+ }
5042
+ },
5029
5043
  "node_modules/@types/html-minifier-terser": {
5030
5044
  "version": "6.1.0",
5031
5045
  "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz",
@@ -15807,6 +15821,19 @@
15807
15821
  "node": ">=14"
15808
15822
  }
15809
15823
  },
15824
+ "node_modules/react-cookie": {
15825
+ "version": "6.1.1",
15826
+ "resolved": "https://registry.npmjs.org/react-cookie/-/react-cookie-6.1.1.tgz",
15827
+ "integrity": "sha512-fuFRpf8LH6SfmVMowDUIRywJF5jAUDUWrm0EI5VdXfTl5bPcJ7B0zWbuYpT0Tvikx7Gs18MlvAT+P+744dUz2g==",
15828
+ "dependencies": {
15829
+ "@types/hoist-non-react-statics": "^3.3.1",
15830
+ "hoist-non-react-statics": "^3.3.2",
15831
+ "universal-cookie": "^6.0.0"
15832
+ },
15833
+ "peerDependencies": {
15834
+ "react": ">= 16.3.0"
15835
+ }
15836
+ },
15810
15837
  "node_modules/react-dev-utils": {
15811
15838
  "version": "12.0.1",
15812
15839
  "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz",
@@ -18394,6 +18421,15 @@
18394
18421
  "node": ">=8"
18395
18422
  }
18396
18423
  },
18424
+ "node_modules/universal-cookie": {
18425
+ "version": "6.1.1",
18426
+ "resolved": "https://registry.npmjs.org/universal-cookie/-/universal-cookie-6.1.1.tgz",
18427
+ "integrity": "sha512-33S9x3CpdUnnjwTNs2Fgc41WGve2tdLtvaK2kPSbZRc5pGpz2vQFbRWMxlATsxNNe/Cy8SzmnmbuBM85jpZPtA==",
18428
+ "dependencies": {
18429
+ "@types/cookie": "^0.5.1",
18430
+ "cookie": "^0.5.0"
18431
+ }
18432
+ },
18397
18433
  "node_modules/universalify": {
18398
18434
  "version": "2.0.0",
18399
18435
  "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@types/cookie",
3
+ "version": "0.5.4",
4
+ "description": "TypeScript definitions for cookie",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Pine Mizune",
10
+ "githubUsername": "pine",
11
+ "url": "https://github.com/pine"
12
+ },
13
+ {
14
+ "name": "Piotr Błażejewicz",
15
+ "githubUsername": "peterblazejewicz",
16
+ "url": "https://github.com/peterblazejewicz"
17
+ }
18
+ ],
19
+ "main": "",
20
+ "types": "index.d.ts",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
24
+ "directory": "types/cookie"
25
+ },
26
+ "scripts": {},
27
+ "dependencies": {},
28
+ "typesPublisherContentHash": "38c54ab0b5b29d15b167b0c79bb77187eaa259a5fc60cd15713bdfe2231f28f7",
29
+ "typeScriptVersion": "4.5"
30
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@types/hoist-non-react-statics",
3
+ "version": "3.3.5",
4
+ "description": "TypeScript definitions for hoist-non-react-statics",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hoist-non-react-statics",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "JounQin",
10
+ "githubUsername": "JounQin",
11
+ "url": "https://github.com/JounQin"
12
+ },
13
+ {
14
+ "name": "James Reggio",
15
+ "githubUsername": "jamesreggio",
16
+ "url": "https://github.com/jamesreggio"
17
+ }
18
+ ],
19
+ "main": "",
20
+ "types": "index.d.ts",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
24
+ "directory": "types/hoist-non-react-statics"
25
+ },
26
+ "scripts": {},
27
+ "dependencies": {
28
+ "@types/react": "*",
29
+ "hoist-non-react-statics": "^3.3.0"
30
+ },
31
+ "typesPublisherContentHash": "e7a2e0e3acecd59daaf840349946feec09d36c71528bdf39ac38ab7d566d804b",
32
+ "typeScriptVersion": "4.5"
33
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "react-cookie",
3
+ "version": "6.1.1",
4
+ "description": "Universal cookies for React",
5
+ "main": "cjs/index.js",
6
+ "module": "es6/index.js",
7
+ "types": "es6/index.d.ts",
8
+ "sideEffects": false,
9
+ "files": [
10
+ "es6",
11
+ "cjs",
12
+ "umd",
13
+ "lib",
14
+ "index.d.ts",
15
+ "LICENSE"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/bendotcodes/cookies.git"
20
+ },
21
+ "bugs": "https://github.com/bendotcodes/cookies/issues",
22
+ "homepage": "https://github.com/bendotcodes/cookies/tree/main/packages/react-cookie/#readme",
23
+ "keywords": [
24
+ "universal",
25
+ "isomophic",
26
+ "cookie",
27
+ "react"
28
+ ],
29
+ "author": "Benoit Tremblay <me@ben.codes>",
30
+ "license": "MIT",
31
+ "scripts": {
32
+ "clean": "rimraf lib && rimraf es6 && rimraf cjs && rimraf umd",
33
+ "build": "npm run clean && npm run build-es6 && npm run build-cjs && npm run build-umd && npm run build-legacy",
34
+ "build-es6": "tsc",
35
+ "build-cjs": "babel es6 -D -d cjs",
36
+ "build-umd": "rollup -c",
37
+ "build-legacy": "babel es6 -D -d lib"
38
+ },
39
+ "dependencies": {
40
+ "@types/hoist-non-react-statics": "^3.3.1",
41
+ "hoist-non-react-statics": "^3.3.2",
42
+ "universal-cookie": "^6.0.0"
43
+ },
44
+ "devDependencies": {
45
+ "@babel/cli": "^7.22.10",
46
+ "react": "^18.2.0",
47
+ "react-dom": "^18.2.0",
48
+ "rimraf": "^2.7.1",
49
+ "rollup": "^3.28.1",
50
+ "typescript": "^5.2.2"
51
+ },
52
+ "peerDependencies": {
53
+ "react": ">= 16.3.0"
54
+ }
55
+ }