Quellcode durchsuchen

提交缺失文件

rexyang-ai vor 2 Wochen
Ursprung
Commit
097f62e591
44 geänderte Dateien mit 288 neuen und 4 gelöschten Zeilen
  1. 0 4
      .gitignore
  2. 0 0
      apps/models_provider/impl/aliyun_bai_lian_model_provider/icon/__init__.py
  3. 1 0
      apps/models_provider/impl/aliyun_bai_lian_model_provider/icon/aliyun_bai_lian_icon_svg
  4. 0 0
      apps/models_provider/impl/anthropic_model_provider/icon/__init__.py
  5. 1 0
      apps/models_provider/impl/anthropic_model_provider/icon/anthropic_icon_svg
  6. 0 0
      apps/models_provider/impl/aws_bedrock_model_provider/icon/__init__.py
  7. 0 0
      apps/models_provider/impl/aws_bedrock_model_provider/icon/bedrock_icon_svg
  8. 0 0
      apps/models_provider/impl/azure_model_provider/icon/__init__.py
  9. 1 0
      apps/models_provider/impl/azure_model_provider/icon/azure_icon_svg
  10. 0 0
      apps/models_provider/impl/deepseek_model_provider/icon/__init__.py
  11. 3 0
      apps/models_provider/impl/deepseek_model_provider/icon/deepseek_icon_svg
  12. 0 0
      apps/models_provider/impl/docker_ai_model_provider/icon/__init__.py
  13. 3 0
      apps/models_provider/impl/docker_ai_model_provider/icon/docker_ai_icon_svg
  14. 0 0
      apps/models_provider/impl/gemini_model_provider/icon/__init__.py
  15. 0 0
      apps/models_provider/impl/gemini_model_provider/icon/gemini_icon_svg
  16. 0 0
      apps/models_provider/impl/kimi_model_provider/icon/__init__.py
  17. 1 0
      apps/models_provider/impl/kimi_model_provider/icon/kimi_icon_svg
  18. 0 0
      apps/models_provider/impl/local_model_provider/icon/__init__.py
  19. 3 0
      apps/models_provider/impl/local_model_provider/icon/local_icon_svg
  20. 0 0
      apps/models_provider/impl/ollama_model_provider/icon/__init__.py
  21. 1 0
      apps/models_provider/impl/ollama_model_provider/icon/ollama_icon_svg
  22. 0 0
      apps/models_provider/impl/openai_model_provider/icon/__init__.py
  23. 0 0
      apps/models_provider/impl/openai_model_provider/icon/openai_icon_svg
  24. 64 0
      apps/models_provider/impl/regolo_model_provider/icon/regolo_icon_svg
  25. 0 0
      apps/models_provider/impl/siliconCloud_model_provider/icon/__init__.py
  26. 5 0
      apps/models_provider/impl/siliconCloud_model_provider/icon/siliconCloud_icon_svg
  27. 0 0
      apps/models_provider/impl/tencent_cloud_model_provider/icon/__init__.py
  28. 15 0
      apps/models_provider/impl/tencent_cloud_model_provider/icon/tencent_cloud_icon_svg
  29. 89 0
      apps/models_provider/impl/tencent_model_provider/credential/stt.py
  30. 0 0
      apps/models_provider/impl/tencent_model_provider/icon/__init__.py
  31. 3 0
      apps/models_provider/impl/tencent_model_provider/icon/tencent_icon_svg
  32. 84 0
      apps/models_provider/impl/tencent_model_provider/model/stt.py
  33. 0 0
      apps/models_provider/impl/vllm_model_provider/icon/__init__.py
  34. 3 0
      apps/models_provider/impl/vllm_model_provider/icon/vllm_icon_svg
  35. 0 0
      apps/models_provider/impl/volcanic_engine_model_provider/icon/__init__.py
  36. 3 0
      apps/models_provider/impl/volcanic_engine_model_provider/icon/volcanic_engine_icon_svg
  37. 0 0
      apps/models_provider/impl/wenxin_model_provider/icon/__init__.py
  38. 5 0
      apps/models_provider/impl/wenxin_model_provider/icon/azure_icon_svg
  39. 0 0
      apps/models_provider/impl/xf_model_provider/icon/__init__.py
  40. 0 0
      apps/models_provider/impl/xf_model_provider/icon/xf_icon_svg
  41. 0 0
      apps/models_provider/impl/xinference_model_provider/icon/__init__.py
  42. 3 0
      apps/models_provider/impl/xinference_model_provider/icon/xinference_icon_svg
  43. 0 0
      apps/models_provider/impl/zhipu_model_provider/icon/__init__.py
  44. 0 0
      apps/models_provider/impl/zhipu_model_provider/icon/zhipuai_icon_svg

+ 0 - 4
.gitignore

@@ -181,12 +181,8 @@ models/
 apps/xpack
 !apps/**/models/
 data
-.dev
 poetry.lock
 uv.lock
-apps/models_provider/impl/*/icon/
-apps/models_provider/impl/tencent_model_provider/credential/stt.py
-apps/models_provider/impl/tencent_model_provider/model/stt.py
 tmp/
 config.yml
 .SANDBOX_BANNED_HOSTS

+ 0 - 0
apps/models_provider/impl/aliyun_bai_lian_model_provider/icon/__init__.py


+ 1 - 0
apps/models_provider/impl/aliyun_bai_lian_model_provider/icon/aliyun_bai_lian_icon_svg

@@ -0,0 +1 @@
+<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><defs><style>.cls-1{fill:#6d49f6;}.cls-2{fill:#6be8d2;}.cls-3{fill:#9b8ee8;}.cls-4{fill:#0d22d2;}.cls-5{fill:#2c53dc;}.cls-6{fill:#5eccc9;}.cls-7{fill:#fff;}</style></defs><title>【icon】阿里百炼大模型</title><path class="cls-1" d="M35.463,6.454,25,12.5,14.186,18.737,4.032,12.882a2.33,2.33,0,0,1,.851-.851L23.829,1.089a2.358,2.358,0,0,1,2.342,0Z"/><polygon class="cls-2" points="35.825 31.232 35.825 31.243 25 37.491 35.814 31.232 35.825 31.232"/><polygon class="cls-2" points="35.825 31.232 35.825 31.243 25 37.491 35.814 31.232 35.825 31.232"/><polygon class="cls-2" points="35.825 31.232 35.825 31.243 25 37.491 35.814 31.232 35.825 31.232"/><polygon class="cls-2" points="35.825 31.232 35.825 31.243 25 37.491 35.814 31.232 35.825 31.232"/><polygon class="cls-2" points="35.825 31.232 35.825 31.243 25 37.491 35.814 31.232 35.825 31.232"/><path class="cls-3" d="M45.117,12.031,35.463,6.454,25,12.5,14.186,18.737v.01L25,25h.011l10.814-6.248,10.143-5.865A2.33,2.33,0,0,0,45.117,12.031Z"/><path class="cls-4" d="M4.032,12.882a2.254,2.254,0,0,0-.32,1.171V35.926a2.319,2.319,0,0,0,.32,1.182l10.143-5.865v-12.5h.011v-.01Z"/><polygon class="cls-5" points="25 24.995 14.175 31.243 14.175 18.747 14.186 18.747 25 24.995"/><path class="cls-6" d="M45.968,37.1a2.278,2.278,0,0,1-.851.862L26.171,48.9a2.358,2.358,0,0,1-2.342,0l-9.3-5.375,10.462-6.035H25l10.825-6.248Z"/><path class="cls-2" d="M46.288,25.2V35.926a2.251,2.251,0,0,1-.32,1.171L35.825,31.243v-.011Z"/><path class="cls-7" d="M46.288,14.053V25.2L35.825,31.232V18.747l10.143-5.865A2.254,2.254,0,0,1,46.288,14.053Z"/><polygon class="cls-7" points="35.825 18.747 35.825 31.232 35.814 31.232 25.011 24.995 35.825 18.747"/><path class="cls-2" d="M35.814,31.232,25.011,25H25L14.175,31.243,4.032,37.108a2.33,2.33,0,0,0,.851.851l9.644,5.567,10.462-6.035H25l10.825-6.248v-.011Z"/></svg>

+ 0 - 0
apps/models_provider/impl/anthropic_model_provider/icon/__init__.py


+ 1 - 0
apps/models_provider/impl/anthropic_model_provider/icon/anthropic_icon_svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 512 512"><rect fill="#CC9B7A" width="512" height="512" rx="104.187" ry="105.042"/><path fill="#1F1F1E" fill-rule="nonzero" d="M318.663 149.787h-43.368l78.952 212.423 43.368.004-78.952-212.427zm-125.326 0l-78.952 212.427h44.255l15.932-44.608 82.846-.004 16.107 44.612h44.255l-79.126-212.427h-45.317zm-4.251 128.341l26.91-74.701 27.083 74.701h-53.993z"/></svg>

+ 0 - 0
apps/models_provider/impl/aws_bedrock_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
apps/models_provider/impl/aws_bedrock_model_provider/icon/bedrock_icon_svg


+ 0 - 0
apps/models_provider/impl/azure_model_provider/icon/__init__.py


+ 1 - 0
apps/models_provider/impl/azure_model_provider/icon/azure_icon_svg

@@ -0,0 +1 @@
+<svg t="1724827784525" class="icon" viewBox="0 0 1083 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5331" width="100%" height="100%"><path d="M540.115607 419.535168L460.236208 3.644671 376.260809 1.620347c-31.825387-5.244301-54.020439 8.390289-66.588115 40.908208C297.107977 75.046474 194.101272 379.938035 0.654058 957.203237-1.245965 999.731792 12.341272 1020.99311 41.418728 1020.99311h275.015029c14.599399-4.010173 25.104277-17.02178 31.514636-39.031861 6.410358-22.010081 70.46659-209.486428 192.168694-562.427561z" fill="#0D559D" p-id="5332"></path><path d="M669.463676 658.929202l-351.23052 6.189873c-29.527306 6.969711-32.546035 22.615306-9.054705 46.941226 35.237734 36.486659 357.010497 317.661965 372.719722 311.580115 9.100578-3.52185 16.537896-4.005734 26.473064-9.14941 24.994775-12.939098 21.644578-70.568694-10.05059-172.887307l-28.855491-182.674497z" fill="#0078D4" p-id="5333"></path><path d="M371.417526 0.331468l350.216879-0.325549a47.405873 47.405873 0 0 1 31.042589 11.556994c7.219792 6.252023 13.292763 14.842081 18.220393 25.765734 9.603699 21.293873 112.287815 325.368601 308.052347 912.225665a54.729249 54.729249 0 0 1 1.284439 30.169526c-6.225387 25.780532-19.432324 39.509827-39.623768 41.181965-24.348116 2.018405-144.088046 2.962497-359.221272 2.833758 30.551306-9.66141 44.410821-28.275422 41.578543-55.843515C720.153156 940.511445 618.336185 634.30289 417.516763 49.264462h0.00296a84.346821 84.346821 0 0 0-13.869873-25.255213C392.112092 9.559306 382.194682 2.04652 373.893179 1.47237c-10.553711-0.728046-11.379422-1.109827-2.475653-1.140902z" fill="#2FA7E7" p-id="5334"></path></svg>

+ 0 - 0
apps/models_provider/impl/deepseek_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
apps/models_provider/impl/deepseek_model_provider/icon/deepseek_icon_svg


+ 0 - 0
apps/models_provider/impl/docker_ai_model_provider/icon/__init__.py


+ 3 - 0
apps/models_provider/impl/docker_ai_model_provider/icon/docker_ai_icon_svg

@@ -0,0 +1,3 @@
+<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M13.1753 11.2238H10.6946V8.98998H13.1753V11.2238ZM13.1753 3.5H10.6946V5.80958H13.1753V3.5ZM16.107 8.98998H13.6263V11.2238H16.107V8.98998ZM10.2436 6.26392H7.76291V8.53563H10.2436V6.26392ZM13.1753 6.26392H10.6946V8.53563H13.1753V6.26392ZM23.5866 10.0501C23.0604 9.67149 21.7824 9.55791 20.8428 9.74722C20.73 8.83853 20.2038 8.04343 19.3018 7.32405L18.7756 6.9833L18.4373 7.51336C17.7607 8.5735 17.5728 10.3151 18.2869 11.451C17.9487 11.6403 17.3097 11.8675 16.4828 11.8675H0.0953884C-0.242884 13.7984 0.320904 16.2973 1.74917 18.0011C3.13984 19.667 5.24465 20.5 7.95083 20.5C13.8518 20.5 18.2494 17.7739 20.279 12.7762C21.0683 12.7762 22.8348 12.7762 23.6993 11.0724C23.7369 10.9967 23.9624 10.5802 24 10.4287L23.5866 10.0501ZM4.38018 8.98998H1.89951V11.2238H4.38018V8.98998ZM7.31188 8.98998H4.83121V11.2238H7.31188V8.98998ZM10.2436 8.98998H7.76291V11.2238H10.2436V8.98998ZM7.31188 6.26392H4.83121V8.53563H7.31188V6.26392Z" fill="#1D63ED"/>
+</svg>

+ 0 - 0
apps/models_provider/impl/gemini_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
apps/models_provider/impl/gemini_model_provider/icon/gemini_icon_svg


+ 0 - 0
apps/models_provider/impl/kimi_model_provider/icon/__init__.py


+ 1 - 0
apps/models_provider/impl/kimi_model_provider/icon/kimi_icon_svg

@@ -0,0 +1 @@
+<svg t="1724827730361" class="icon" viewBox="0 0 1075 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4327" width="100%" height="100%"><path d="M1049.6 0m0 186.1632l0 651.6736q0 186.1632-186.1632 186.1632l-651.6736 0q-186.1632 0-186.1632-186.1632l0-651.6736q0-186.1632 186.1632-186.1632l651.6736 0q186.1632 0 186.1632 186.1632Z" fill="#000000" p-id="4328"></path><path d="M605.7984 459.9808c57.1392 1.28 104.1408 52.3264 104.1408 115.1488v232.5504a2.048 2.048 0 0 1-2.048 2.0992h-99.9936a2.048 2.048 0 0 1-2.048-2.048l-1.7408-294.0928c0-1.2288-2.2528-1.4848-2.6112-0.256-13.312 43.9296-52.736 56.32-99.84 56.32H329.984a2.048 2.048 0 0 0-2.048 2.048v235.9296a2.048 2.048 0 0 1-2.0992 2.0992H220.4672a2.048 2.048 0 0 1-2.048-2.048V241.5104a2.048 2.048 0 0 1 2.048-2.048h105.3696a2.048 2.048 0 0 1 2.048 2.048v216.32c0 1.1264 0.9728 2.048 2.0992 2.048h135.2192a2.048 2.048 0 0 0 1.8944-1.2288l96.9216-218.0096a2.048 2.048 0 0 1 1.8944-1.2288h116.7872c1.536 0 2.56 1.5872 1.8944 2.9696l-66.2528 142.2848c-19.7632 36.1984-34.304 61.8496-67.2768 72.8064-1.1776 0.3584-0.9216 2.4576 0.3584 2.4576h54.3744z" fill="#FFFFFF" p-id="4329"></path><path d="M752.9472 227.9936c-11.776 9.8304-19.456 25.9072-19.456 50.176 0 22.784 7.2704 40.448 18.1248 50.9952-5.632 9.3696-11.4176 15.9744-15.7696 19.456-0.7168 0.6144-0.2048 2.2528 0.7168 2.2016l64.512-4.6592c14.336-1.1264 26.624-6.5536 36.9664-15.7696 12.3904-10.496 19.456-28.5696 19.456-52.224 0-24.2688-7.0656-40.3456-19.456-50.176a64.7168 64.7168 0 0 0-43.008-14.7968c-16.384 0-30.3616 4.9664-42.0864 14.7968z" fill="#007AFF" p-id="4330"></path></svg>

+ 0 - 0
apps/models_provider/impl/local_model_provider/icon/__init__.py


+ 3 - 0
apps/models_provider/impl/local_model_provider/icon/local_icon_svg

@@ -0,0 +1,3 @@
+<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M1 8.72778C1 8.36759 1.36935 8.12556 1.6996 8.26935L10.5885 12.1395C10.7709 12.2189 10.8889 12.3989 10.8889 12.5979V22.1723C10.8889 22.5484 10.4892 22.7899 10.1562 22.6148L1.37249 17.9978C1.26117 17.9368 1.16822 17.8484 1.10289 17.7416C1.03756 17.6347 1.00212 17.5131 1.0001 17.3888L1 17.3776V8.72778ZM22.2978 8.25648C22.6283 8.11032 23 8.35235 23 8.71377V17.3776C23 17.5038 22.9655 17.6278 22.9 17.7368C22.8346 17.8457 22.7405 17.9358 22.6275 17.9978L13.8437 22.6148C13.5108 22.7899 13.1111 22.5484 13.1111 22.1723L13.1111 12.6442C13.1111 12.4463 13.2279 12.267 13.4089 12.1869L22.2978 8.25648ZM11.6399 2.09198C11.7498 2.03168 11.8738 2 12 2C12.1262 2 12.2502 2.03168 12.3601 2.09198L20.8462 5.86125C21.2444 6.03811 21.2416 6.60423 20.8417 6.77714L12.1984 10.5141C12.0718 10.5689 11.9282 10.5689 11.8016 10.5141L3.15831 6.77714C2.75838 6.60422 2.75558 6.03811 3.15378 5.86125L11.6399 2.09198Z" fill="#14C0FF"/>
+</svg>

+ 0 - 0
apps/models_provider/impl/ollama_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 1 - 0
apps/models_provider/impl/ollama_model_provider/icon/ollama_icon_svg


+ 0 - 0
apps/models_provider/impl/openai_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
apps/models_provider/impl/openai_model_provider/icon/openai_icon_svg


+ 64 - 0
apps/models_provider/impl/regolo_model_provider/icon/regolo_icon_svg

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   id="Livello_2"
+   data-name="Livello 2"
+   viewBox="0 0 104.4 104.38"
+   version="1.1"
+   sodipodi:docname="Regolo_logo_positive.svg"
+   width="100%" height="100%"
+   inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <sodipodi:namedview
+     id="namedview13"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:zoom="2.1335227"
+     inkscape:cx="119.05193"
+     inkscape:cy="48.511318"
+     inkscape:window-width="1920"
+     inkscape:window-height="1025"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="g13" />
+  <defs
+     id="defs1">
+    <style
+       id="style1">
+      .cls-1 {
+        fill: #303030;
+      }
+
+      .cls-2 {
+        fill: #59e389;
+      }
+    </style>
+  </defs>
+  <g
+     id="Grafica"
+     transform="translate(0,-40.87)">
+    <g
+       id="g13">
+      <path
+         class="cls-1"
+         d="m 104.39,105.96 v 36.18 c 0,0.32 -0.05,0.62 -0.14,0.91 -0.39,1.27 -1.58,2.2 -2.99,2.2 H 65.08 c -1.73,0 -3.13,-1.41 -3.13,-3.13 V 113.4 c 0,-0.15 0,-0.29 0,-0.44 v -7 c 0,-1.73 1.4,-3.13 3.13,-3.13 h 36.19 c 1.5,0 2.77,1.07 3.06,2.5 0.05,0.21 0.07,0.41 0.07,0.63 z"
+         id="path1" />
+      <path
+         class="cls-1"
+         d="m 104.39,105.96 v 36.18 c 0,0.32 -0.05,0.62 -0.14,0.91 -0.39,1.27 -1.58,2.2 -2.99,2.2 H 65.08 c -1.73,0 -3.13,-1.41 -3.13,-3.13 V 113.4 c 0,-0.15 0,-0.29 0,-0.44 v -7 c 0,-1.73 1.4,-3.13 3.13,-3.13 h 36.19 c 1.5,0 2.77,1.07 3.06,2.5 0.05,0.21 0.07,0.41 0.07,0.63 z"
+         id="path2" />
+      <path
+         class="cls-2"
+         d="M 101.27,40.88 H 65.09 c -1.73,0 -3.13,1.4 -3.13,3.13 v 28.71 c 0,4.71 -1.88,9.23 -5.2,12.56 L 44.42,97.61 c -3.32,3.33 -7.85,5.2 -12.55,5.2 H 18.98 c -2.21,0 -3.99,-1.79 -3.99,-3.99 V 87.29 c 0,-2.21 1.79,-3.99 3.99,-3.99 h 20.34 c 1.41,0 2.59,-0.93 2.99,-2.2 0.09,-0.29 0.14,-0.59 0.14,-0.91 V 44 c 0,-0.22 -0.02,-0.42 -0.07,-0.63 -0.29,-1.43 -1.56,-2.5 -3.06,-2.5 H 3.13 C 1.4,40.87 0,42.27 0,44 v 7 c 0,0.15 0,0.29 0,0.44 v 28.72 c 0,1.72 1.41,3.13 3.13,3.13 h 3.16 c 2.21,0 3.99,1.79 3.99,3.99 v 11.53 c 0,2.21 -1.79,3.99 -3.99,3.99 H 3.15 c -1.73,0 -3.13,1.4 -3.13,3.13 v 36.19 c 0,1.72 1.41,3.13 3.13,3.13 h 36.19 c 1.73,0 3.13,-1.41 3.13,-3.13 V 113.4 c 0,-4.7 1.87,-9.23 5.2,-12.55 L 60,88.51 c 3.33,-3.32 7.85,-5.2 12.56,-5.2 h 28.71 c 1.73,0 3.13,-1.4 3.13,-3.13 V 44 c 0,-1.73 -1.4,-3.13 -3.13,-3.13 z"
+         id="path3" />
+    </g>
+  </g>
+</svg>

+ 0 - 0
apps/models_provider/impl/siliconCloud_model_provider/icon/__init__.py


+ 5 - 0
apps/models_provider/impl/siliconCloud_model_provider/icon/siliconCloud_icon_svg

@@ -0,0 +1,5 @@
+<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_10835_2)">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M20.4785 0H18.7463C13.203 0 10.0078 3.54162 10.0078 8.96931V9.9C9.36946 9.71693 8.70867 9.62403 8.04462 9.624C4.11139 9.62377 0.92308 12.8123 0.92308 16.7453C0.92308 20.6785 4.11139 23.8668 8.04462 23.8668C11.9779 23.8668 15.1662 20.6785 15.1662 16.7453C15.1662 16.2669 15.1179 15.7899 15.0224 15.321H20.4785C21.915 15.3157 23.0769 14.1496 23.0769 12.7131C23.0769 11.2763 21.915 10.1102 20.4785 10.1049H15.0508V8.73831C15.0508 6.65954 16.5519 5.15838 18.7463 5.15838H20.4785C21.8878 5.13692 23.0192 3.98862 23.0192 2.57908C23.0192 1.16977 21.8878 0.0212308 20.4785 0ZM10.1619 16.7453C10.1619 16.1838 9.93885 15.6452 9.54178 15.2481C9.14471 14.8511 8.60616 14.628 8.04462 14.628C7.48307 14.628 6.94453 14.8511 6.54746 15.2481C6.15038 15.6452 5.92731 16.1838 5.92731 16.7453C5.92731 17.3069 6.15038 17.8454 6.54746 18.2425C6.94453 18.6395 7.48307 18.8626 8.04462 18.8626C8.60616 18.8626 9.14471 18.6395 9.54178 18.2425C9.93885 17.8454 10.1619 17.3069 10.1619 16.7453Z" fill="#8358F6"/>
+</g>
+</svg>

+ 0 - 0
apps/models_provider/impl/tencent_cloud_model_provider/icon/__init__.py


+ 15 - 0
apps/models_provider/impl/tencent_cloud_model_provider/icon/tencent_cloud_icon_svg

@@ -0,0 +1,15 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg t="1739343874438" class="icon" viewBox="0 0 1402 1024" version="1.1"
+    xmlns="http://www.w3.org/2000/svg" p-id="1514" xmlns:xlink="http://www.w3.org/1999/xlink"
+    width="100%" height="100%">
+    <path
+        d="M1215.521013 836.730667c-22.304 22.698667-66.906667 56.746667-144.96 56.746666h-479.493333c144.96-141.872 267.621333-261.045333 278.773333-272.394666 11.146667-11.349333 39.024-39.722667 66.901334-62.421334 55.754667-51.077333 100.362667-56.746667 139.386666-56.746666 55.76 0 100.362667 22.693333 139.392 56.746666 78.053333 73.770667 78.053333 204.293333 0 278.069334z m94.778667-368.869334c-55.754667-62.421333-139.386667-102.149333-228.592-102.149333-78.058667 0-144.96 28.373333-206.293333 73.776-22.304 22.698667-55.754667 45.397333-83.626667 79.445333-22.309333 22.698667-501.797333 499.392-501.797333 499.392C317.86768 1024 351.32368 1024 379.19568 1024h607.728c44.602667 0 78.053333 0 111.509333-5.674667 72.48-5.674667 144.96-34.048 206.293334-90.8 128.234667-124.848 128.234667-334.816 5.573333-459.664z"
+        fill="#00A3FF" p-id="1515"></path>
+    <path
+        d="M517.921013 434.405333c-61.674667-45.792-123.349333-68.693333-196.234666-68.693333-89.706667 0-173.797333 40.069333-229.866667 103.04-123.344 131.658667-123.344 337.728 5.605333 469.386667 56.069333 51.52 112.133333 80.138667 179.413334 85.861333l128.949333-125.930667H332.902347c-72.885333-5.728-117.738667-28.624-145.770667-57.242666-78.490667-80.138667-78.490667-206.074667-5.605333-286.213334 39.242667-40.069333 84.096-57.242667 140.16-57.242666 33.642667 0 84.101333 5.722667 134.56 57.242666 22.426667 22.896 84.096 68.693333 106.522666 91.589334h5.605334l84.101333-85.866667v-5.722667c-39.248-40.069333-100.922667-91.589333-134.56-120.208"
+        fill="#00C8DC" p-id="1516"></path>
+    <path
+        d="M1111.62768 286.944C1049.17968 118.154667 884.55568 0 697.233013 0c-221.386667 0-397.354667 163.162667-431.413333 365.712 17.029333 0 34.058667-5.621333 56.762667-5.621333 22.709333 0 51.093333 5.621333 73.797333 5.621333 28.378667-140.656 153.264-241.930667 300.853333-241.930667 124.885333 0 232.736 73.141333 283.824 180.042667 0 0 5.68 5.626667 5.68 0 39.733333-5.626667 85.146667-16.88 124.88-16.88 0 5.626667 0 5.626667 0 0"
+        fill="#006EFF" p-id="1517"></path>
+</svg>

+ 89 - 0
apps/models_provider/impl/tencent_model_provider/credential/stt.py

@@ -0,0 +1,89 @@
+
+from common import forms
+from common.exception.app_exception import AppApiException
+from common.forms import BaseForm, TooltipLabel
+from django.utils.translation import gettext_lazy as _, gettext
+
+from models_provider.base_model_provider import BaseModelCredential, ValidCode
+from common.utils.logger import maxkb_logger
+
+class TencentSSTModelParams(BaseForm):
+    EngSerViceType = forms.SingleSelect(
+        TooltipLabel(_('Engine model type'), _('If not passed, the default value is 16k_zh (Chinese universal)')),
+        required=True,
+        default_value='16k_zh',
+        option_list=[
+            {"value": "8k_zh", "label": _("Chinese telephone universal")},
+            {"value": "8k_en", "label": _("English telephone universal")},
+            {"value": "16k_zh", "label": _("Commonly used in Chinese")},
+            {"value": "16k_zh-PY", "label": _("Chinese, English, and Guangdong")},
+            {"value": "16k_zh_medical", "label": _("Chinese medical")},
+            {"value": "16k_en", "label": _("English")},
+            {"value": "16k_yue", "label": _("Cantonese")},
+            {"value": "16k_ja", "label": _("Japanese")},
+            {"value": "16k_ko", "label": _("Korean")},
+            {"value": "16k_vi", "label": _("Vietnamese")},
+            {"value": "16k_ms", "label": _("Malay language")},
+            {"value": "16k_id", "label": _("Indonesian language")},
+            {"value": "16k_fil", "label": _("Filipino language")},
+            {"value": "16k_th", "label": _("Thai")},
+            {"value": "16k_pt", "label": _("Portuguese")},
+            {"value": "16k_tr", "label": _("Turkish")},
+            {"value": "16k_ar", "label": _("Arabic")},
+            {"value": "16k_es", "label": _("Spanish")},
+            {"value": "16k_hi", "label": _("Hindi")},
+            {"value": "16k_fr", "label": _("French")},
+            {"value": "16k_de", "label": _("German")},
+            {"value": "16k_zh_dialect", "label": _("Multiple dialects, supporting 23 dialects")}
+        ],
+        value_field='value',
+        text_field='label'
+    )
+
+class TencentSTTModelCredential(BaseForm, BaseModelCredential):
+    REQUIRED_FIELDS = ["SecretId", "SecretKey"]
+
+    @classmethod
+    def _validate_model_type(cls, model_type, provider, raise_exception=False):
+        if not any(mt['value'] == model_type for mt in provider.get_model_type_list()):
+            if raise_exception:
+                raise AppApiException(ValidCode.valid_error.value,
+                                      gettext('{model_type} Model type is not supported').format(model_type=model_type))
+            return False
+        return True
+
+    @classmethod
+    def _validate_credential_fields(cls, model_credential, raise_exception=False):
+        missing_keys = [key for key in cls.REQUIRED_FIELDS if key not in model_credential]
+        if missing_keys:
+            if raise_exception:
+                raise AppApiException(ValidCode.valid_error.value,
+                                      gettext('{keys} is required').format(keys=", ".join(missing_keys)))
+            return False
+        return True
+
+    def is_valid(self, model_type, model_name, model_credential, model_params, provider, raise_exception=False):
+        if not (self._validate_model_type(model_type, provider, raise_exception) and
+                self._validate_credential_fields(model_credential, raise_exception)):
+            return False
+        try:
+            model = provider.get_model(model_type, model_name, model_credential, **model_params)
+            model.check_auth()
+        except Exception as e:
+            maxkb_logger.error(f'Exception: {e}', exc_info=True)
+            if raise_exception:
+                raise AppApiException(ValidCode.valid_error.value,
+                                      gettext(
+                                          'Verification failed, please check whether the parameters are correct: {error}').format(
+                                          error=str(e)))
+            return False
+        return True
+
+    def encryption_dict(self, model):
+        return {**model, 'SecretKey': super().encryption(model.get('SecretKey', ''))}
+
+    SecretId = forms.PasswordInputField('SecretId', required=True)
+    SecretKey = forms.PasswordInputField('SecretKey', required=True)
+
+    def get_model_params_setting_form(self, model_name):
+        return TencentSSTModelParams()

+ 0 - 0
apps/models_provider/impl/tencent_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
apps/models_provider/impl/tencent_model_provider/icon/tencent_icon_svg


+ 84 - 0
apps/models_provider/impl/tencent_model_provider/model/stt.py

@@ -0,0 +1,84 @@
+import base64
+import json
+import os
+import traceback
+from typing import Dict
+
+from tencentcloud.asr.v20190614 import asr_client, models
+from tencentcloud.common import credential
+from tencentcloud.common.exception import TencentCloudSDKException
+from tencentcloud.common.profile.client_profile import ClientProfile
+from tencentcloud.common.profile.http_profile import HttpProfile
+
+from common.utils.logger import maxkb_logger
+from models_provider.base_model_provider import MaxKBBaseModel
+from models_provider.impl.base_stt import BaseSpeechToText
+
+
+class TencentSpeechToText(MaxKBBaseModel, BaseSpeechToText):
+    hunyuan_secret_id: str
+    hunyuan_secret_key: str
+    model: str
+    params: dict
+
+    def __init__(self, **kwargs):
+        super().__init__(**kwargs)
+        self.hunyuan_secret_id = kwargs.get('hunyuan_secret_id')
+        self.hunyuan_secret_key = kwargs.get('hunyuan_secret_key')
+        self.model = kwargs.get('model')
+        self.params = kwargs.get('params')
+
+    @staticmethod
+    def is_cache_model():
+        return False
+
+    @staticmethod
+    def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs):
+        return TencentSpeechToText(
+            hunyuan_secret_id=model_credential.get('SecretId'),
+            hunyuan_secret_key=model_credential.get('SecretKey'),
+            model=model_name,
+            params=model_kwargs,
+            **model_kwargs
+        )
+
+    def check_auth(self):
+        cwd = os.path.dirname(os.path.abspath(__file__))
+        with open(f'{cwd}/iat_mp3_16k.mp3', 'rb') as f:
+            self.speech_to_text(f)
+
+    def speech_to_text(self, audio_file):
+        try:
+            cred = credential.Credential(self.hunyuan_secret_id, self.hunyuan_secret_key)
+            # 实例化一个http选项,可选的,没有特殊需求可以跳过
+            httpProfile = HttpProfile()
+            httpProfile.endpoint = "asr.tencentcloudapi.com"
+
+            # 实例化一个client选项,可选的,没有特殊需求可以跳过
+            clientProfile = ClientProfile()
+            clientProfile.httpProfile = httpProfile
+            # 实例化要请求产品的client对象,clientProfile是可选的
+            client = asr_client.AsrClient(cred, "", clientProfile)
+            buf = audio_file.read()
+            _v = base64.b64encode(buf)
+
+            # 实例化一个请求对象,每个接口都会对应一个request对象
+            req = models.SentenceRecognitionRequest()
+            params = {
+                "EngSerViceType": self.params.get('EngSerViceType'),
+                "SourceType": 1,
+                "VoiceFormat": "mp3",
+                "Data": _v.decode(),
+                **self.params
+            }
+            req.from_json_string(json.dumps(params))
+
+            # 返回的resp是一个SentenceRecognitionResponse的实例,与请求对象对应
+            resp = client.SentenceRecognition(req)
+            # 输出json格式的字符串回包
+            return resp.Result
+
+
+        except TencentCloudSDKException as err:
+            maxkb_logger.error(f":Error: {str(err)}: {traceback.format_exc()}")
+            raise err

+ 0 - 0
apps/models_provider/impl/vllm_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
apps/models_provider/impl/vllm_model_provider/icon/vllm_icon_svg


+ 0 - 0
apps/models_provider/impl/volcanic_engine_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
apps/models_provider/impl/volcanic_engine_model_provider/icon/volcanic_engine_icon_svg


+ 0 - 0
apps/models_provider/impl/wenxin_model_provider/icon/__init__.py


+ 5 - 0
apps/models_provider/impl/wenxin_model_provider/icon/azure_icon_svg

@@ -0,0 +1,5 @@
+<svg width="100%" height="100%"  viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M2.47044 5.80656L12.1704 0.387207L21.4823 5.80656L17.3963 8.21545C17.2829 8.28231 17.1432 8.28719 17.0254 8.22842L12.3407 5.89151C12.2333 5.83793 12.107 5.83699 11.9988 5.88897L7.11512 8.23493C7.00066 8.28991 6.86647 8.28551 6.75588 8.22314L2.47044 5.80656Z" fill="#5BCA87"/>
+<path d="M11.2964 23.613L1.74219 17.9418V7.18647L5.92448 9.51244C6.03922 9.577 6.11329 9.69523 6.12119 9.82642L6.435 15.0425C6.4422 15.1621 6.50449 15.2716 6.60371 15.3391L11.082 18.3858C11.1869 18.4572 11.2502 18.5753 11.2513 18.702L11.2964 23.613Z" fill="#2464F5"/>
+<path d="M12.7041 23.613L22.2583 17.9418V7.18647L18.076 9.51244C17.9613 9.577 17.8872 9.69523 17.8793 9.82642L17.5655 15.0425C17.5583 15.1621 17.496 15.2716 17.3968 15.3391L12.9185 18.3858C12.8136 18.4572 12.7503 18.5753 12.7492 18.702L12.7041 23.613Z" fill="#EC5D3E"/>
+</svg>

+ 0 - 0
apps/models_provider/impl/xf_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
apps/models_provider/impl/xf_model_provider/icon/xf_icon_svg


+ 0 - 0
apps/models_provider/impl/xinference_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 3 - 0
apps/models_provider/impl/xinference_model_provider/icon/xinference_icon_svg


+ 0 - 0
apps/models_provider/impl/zhipu_model_provider/icon/__init__.py


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
apps/models_provider/impl/zhipu_model_provider/icon/zhipuai_icon_svg


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.