From 0c83f628489622492610583cac00021b7b6c87d2 Mon Sep 17 00:00:00 2001 From: CodingOnStar Date: Sat, 11 Oct 2025 14:02:24 +0800 Subject: [PATCH 1/5] feat: add new LLM icons and update related components for improved model support --- .../public/llm/anthropic-short-light.svg | 4 + .../base/icons/assets/public/llm/deepseek.svg | 4 + .../base/icons/assets/public/llm/gemini.svg | 105 +++ .../base/icons/assets/public/llm/grok.svg | 11 + .../icons/assets/public/llm/openai-small.svg | 17 + .../src/public/billing/AwsMarketplaceDark.tsx | 2 +- .../public/knowledge/OptionCardEffectBlue.tsx | 2 +- .../knowledge/OptionCardEffectBlueLight.tsx | 2 +- .../knowledge/OptionCardEffectOrange.tsx | 2 +- .../knowledge/OptionCardEffectPurple.tsx | 2 +- .../public/knowledge/OptionCardEffectTeal.tsx | 2 +- .../dataset-card/ExternalKnowledgeBase.tsx | 2 +- .../public/knowledge/dataset-card/General.tsx | 2 +- .../public/knowledge/dataset-card/Graph.tsx | 2 +- .../knowledge/dataset-card/ParentChild.tsx | 2 +- .../src/public/knowledge/dataset-card/Qa.tsx | 2 +- .../knowledge/online-drive/BucketsBlue.tsx | 2 +- .../knowledge/online-drive/BucketsGray.tsx | 2 +- .../public/knowledge/online-drive/Folder.tsx | 2 +- .../src/public/llm/AnthropicShortLight.json | 36 + .../src/public/llm/AnthropicShortLight.tsx | 20 + .../base/icons/src/public/llm/Deepseek.json | 36 + .../base/icons/src/public/llm/Deepseek.tsx | 20 + .../base/icons/src/public/llm/Gemini.json | 807 ++++++++++++++++++ .../base/icons/src/public/llm/Gemini.tsx | 20 + .../base/icons/src/public/llm/Grok.json | 72 ++ .../base/icons/src/public/llm/Grok.tsx | 20 + .../icons/src/public/llm/OpenaiSmall.json | 128 +++ .../base/icons/src/public/llm/OpenaiSmall.tsx | 20 + .../base/icons/src/public/llm/index.ts | 5 + .../icons/src/vender/knowledge/AddChunks.tsx | 2 +- .../icons/src/vender/knowledge/ArrowShape.tsx | 2 +- .../icons/src/vender/knowledge/Divider.tsx | 2 +- .../icons/src/vender/knowledge/Economic.tsx | 2 +- .../src/vender/knowledge/FullTextSearch.tsx | 2 +- .../src/vender/knowledge/GeneralChunk.tsx | 2 +- .../src/vender/knowledge/HighQuality.tsx | 2 +- .../src/vender/knowledge/HybridSearch.tsx | 2 +- .../src/vender/knowledge/ParentChildChunk.tsx | 2 +- .../vender/knowledge/QuestionAndAnswer.tsx | 2 +- .../icons/src/vender/knowledge/SearchMenu.tsx | 2 +- .../src/vender/knowledge/VectorSearch.tsx | 2 +- .../icons/src/vender/pipeline/InputField.tsx | 2 +- .../src/vender/pipeline/PipelineFill.tsx | 2 +- .../src/vender/pipeline/PipelineLine.tsx | 2 +- .../model-provider-page/index.tsx | 2 + .../provider-added-card/index.tsx | 11 +- .../provider-added-card/quota-panel.tsx | 155 +++- .../model-provider-page/utils.ts | 18 +- web/app/components/plugins/provider-card.tsx | 2 +- web/context/app-context.tsx | 3 + web/i18n/en-US/billing.ts | 2 +- web/i18n/en-US/common.ts | 6 +- web/i18n/ja-JP/billing.ts | 2 +- web/i18n/ja-JP/common.ts | 6 +- web/i18n/zh-Hans/billing.ts | 2 +- web/i18n/zh-Hans/common.ts | 6 +- web/models/common.ts | 3 + 58 files changed, 1508 insertions(+), 93 deletions(-) create mode 100644 web/app/components/base/icons/assets/public/llm/anthropic-short-light.svg create mode 100644 web/app/components/base/icons/assets/public/llm/deepseek.svg create mode 100644 web/app/components/base/icons/assets/public/llm/gemini.svg create mode 100644 web/app/components/base/icons/assets/public/llm/grok.svg create mode 100644 web/app/components/base/icons/assets/public/llm/openai-small.svg create mode 100644 web/app/components/base/icons/src/public/llm/AnthropicShortLight.json create mode 100644 web/app/components/base/icons/src/public/llm/AnthropicShortLight.tsx create mode 100644 web/app/components/base/icons/src/public/llm/Deepseek.json create mode 100644 web/app/components/base/icons/src/public/llm/Deepseek.tsx create mode 100644 web/app/components/base/icons/src/public/llm/Gemini.json create mode 100644 web/app/components/base/icons/src/public/llm/Gemini.tsx create mode 100644 web/app/components/base/icons/src/public/llm/Grok.json create mode 100644 web/app/components/base/icons/src/public/llm/Grok.tsx create mode 100644 web/app/components/base/icons/src/public/llm/OpenaiSmall.json create mode 100644 web/app/components/base/icons/src/public/llm/OpenaiSmall.tsx diff --git a/web/app/components/base/icons/assets/public/llm/anthropic-short-light.svg b/web/app/components/base/icons/assets/public/llm/anthropic-short-light.svg new file mode 100644 index 0000000000..c8e2370803 --- /dev/null +++ b/web/app/components/base/icons/assets/public/llm/anthropic-short-light.svg @@ -0,0 +1,4 @@ + + + + diff --git a/web/app/components/base/icons/assets/public/llm/deepseek.svg b/web/app/components/base/icons/assets/public/llm/deepseek.svg new file mode 100644 index 0000000000..046f89e1ce --- /dev/null +++ b/web/app/components/base/icons/assets/public/llm/deepseek.svg @@ -0,0 +1,4 @@ + + + + diff --git a/web/app/components/base/icons/assets/public/llm/gemini.svg b/web/app/components/base/icons/assets/public/llm/gemini.svg new file mode 100644 index 0000000000..698f6ea629 --- /dev/null +++ b/web/app/components/base/icons/assets/public/llm/gemini.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/app/components/base/icons/assets/public/llm/grok.svg b/web/app/components/base/icons/assets/public/llm/grok.svg new file mode 100644 index 0000000000..6c0cbe227d --- /dev/null +++ b/web/app/components/base/icons/assets/public/llm/grok.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/web/app/components/base/icons/assets/public/llm/openai-small.svg b/web/app/components/base/icons/assets/public/llm/openai-small.svg new file mode 100644 index 0000000000..4af58790e4 --- /dev/null +++ b/web/app/components/base/icons/assets/public/llm/openai-small.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/web/app/components/base/icons/src/public/billing/AwsMarketplaceDark.tsx b/web/app/components/base/icons/src/public/billing/AwsMarketplaceDark.tsx index 5aa2d6c430..7096a4d2eb 100644 --- a/web/app/components/base/icons/src/public/billing/AwsMarketplaceDark.tsx +++ b/web/app/components/base/icons/src/public/billing/AwsMarketplaceDark.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/OptionCardEffectBlue.tsx b/web/app/components/base/icons/src/public/knowledge/OptionCardEffectBlue.tsx index 85697f9dae..8d3e6a8a8a 100644 --- a/web/app/components/base/icons/src/public/knowledge/OptionCardEffectBlue.tsx +++ b/web/app/components/base/icons/src/public/knowledge/OptionCardEffectBlue.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/OptionCardEffectBlueLight.tsx b/web/app/components/base/icons/src/public/knowledge/OptionCardEffectBlueLight.tsx index bf4264f1bd..f44856be61 100644 --- a/web/app/components/base/icons/src/public/knowledge/OptionCardEffectBlueLight.tsx +++ b/web/app/components/base/icons/src/public/knowledge/OptionCardEffectBlueLight.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/OptionCardEffectOrange.tsx b/web/app/components/base/icons/src/public/knowledge/OptionCardEffectOrange.tsx index bd6cda4470..fe76f5917f 100644 --- a/web/app/components/base/icons/src/public/knowledge/OptionCardEffectOrange.tsx +++ b/web/app/components/base/icons/src/public/knowledge/OptionCardEffectOrange.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/OptionCardEffectPurple.tsx b/web/app/components/base/icons/src/public/knowledge/OptionCardEffectPurple.tsx index b70808ef8c..f5c5e7ba3a 100644 --- a/web/app/components/base/icons/src/public/knowledge/OptionCardEffectPurple.tsx +++ b/web/app/components/base/icons/src/public/knowledge/OptionCardEffectPurple.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/OptionCardEffectTeal.tsx b/web/app/components/base/icons/src/public/knowledge/OptionCardEffectTeal.tsx index ddd04a1911..0d2a07e405 100644 --- a/web/app/components/base/icons/src/public/knowledge/OptionCardEffectTeal.tsx +++ b/web/app/components/base/icons/src/public/knowledge/OptionCardEffectTeal.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/dataset-card/ExternalKnowledgeBase.tsx b/web/app/components/base/icons/src/public/knowledge/dataset-card/ExternalKnowledgeBase.tsx index ea6ce30704..06bb8086bc 100644 --- a/web/app/components/base/icons/src/public/knowledge/dataset-card/ExternalKnowledgeBase.tsx +++ b/web/app/components/base/icons/src/public/knowledge/dataset-card/ExternalKnowledgeBase.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/dataset-card/General.tsx b/web/app/components/base/icons/src/public/knowledge/dataset-card/General.tsx index 6508ed57c6..6665039002 100644 --- a/web/app/components/base/icons/src/public/knowledge/dataset-card/General.tsx +++ b/web/app/components/base/icons/src/public/knowledge/dataset-card/General.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/dataset-card/Graph.tsx b/web/app/components/base/icons/src/public/knowledge/dataset-card/Graph.tsx index c1360c52ca..127367f873 100644 --- a/web/app/components/base/icons/src/public/knowledge/dataset-card/Graph.tsx +++ b/web/app/components/base/icons/src/public/knowledge/dataset-card/Graph.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/dataset-card/ParentChild.tsx b/web/app/components/base/icons/src/public/knowledge/dataset-card/ParentChild.tsx index 7c6c3baa7b..922cb2c825 100644 --- a/web/app/components/base/icons/src/public/knowledge/dataset-card/ParentChild.tsx +++ b/web/app/components/base/icons/src/public/knowledge/dataset-card/ParentChild.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/dataset-card/Qa.tsx b/web/app/components/base/icons/src/public/knowledge/dataset-card/Qa.tsx index 34ef88141e..ac41a8b153 100644 --- a/web/app/components/base/icons/src/public/knowledge/dataset-card/Qa.tsx +++ b/web/app/components/base/icons/src/public/knowledge/dataset-card/Qa.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/online-drive/BucketsBlue.tsx b/web/app/components/base/icons/src/public/knowledge/online-drive/BucketsBlue.tsx index 9fd923458e..cfd9570081 100644 --- a/web/app/components/base/icons/src/public/knowledge/online-drive/BucketsBlue.tsx +++ b/web/app/components/base/icons/src/public/knowledge/online-drive/BucketsBlue.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/online-drive/BucketsGray.tsx b/web/app/components/base/icons/src/public/knowledge/online-drive/BucketsGray.tsx index a646251629..2e40a70367 100644 --- a/web/app/components/base/icons/src/public/knowledge/online-drive/BucketsGray.tsx +++ b/web/app/components/base/icons/src/public/knowledge/online-drive/BucketsGray.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/knowledge/online-drive/Folder.tsx b/web/app/components/base/icons/src/public/knowledge/online-drive/Folder.tsx index e7a3fdf167..c5c3ea5b72 100644 --- a/web/app/components/base/icons/src/public/knowledge/online-drive/Folder.tsx +++ b/web/app/components/base/icons/src/public/knowledge/online-drive/Folder.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/public/llm/AnthropicShortLight.json b/web/app/components/base/icons/src/public/llm/AnthropicShortLight.json new file mode 100644 index 0000000000..4de3d7bcdc --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/AnthropicShortLight.json @@ -0,0 +1,36 @@ +{ + "icon": { + "type": "element", + "isRootNode": true, + "name": "svg", + "attributes": { + "width": "40", + "height": "40", + "viewBox": "0 0 40 40", + "fill": "none", + "xmlns": "http://www.w3.org/2000/svg" + }, + "children": [ + { + "type": "element", + "name": "rect", + "attributes": { + "width": "40", + "height": "40", + "fill": "white" + }, + "children": [] + }, + { + "type": "element", + "name": "path", + "attributes": { + "d": "M25.7926 10.1311H21.5089L29.3208 29.869H33.6045L25.7926 10.1311ZM13.4164 10.1311L5.60449 29.869H9.97273L11.5703 25.724H19.743L21.3405 29.869H25.7087L17.8969 10.1311H13.4164ZM12.9834 22.0583L15.6566 15.1217L18.3299 22.0583H12.9834Z", + "fill": "black" + }, + "children": [] + } + ] + }, + "name": "AnthropicShortLight" +} diff --git a/web/app/components/base/icons/src/public/llm/AnthropicShortLight.tsx b/web/app/components/base/icons/src/public/llm/AnthropicShortLight.tsx new file mode 100644 index 0000000000..e54fb286a1 --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/AnthropicShortLight.tsx @@ -0,0 +1,20 @@ +// GENERATE BY script +// DON NOT EDIT IT MANUALLY + +import * as React from 'react' +import data from './AnthropicShortLight.json' +import IconBase from '@/app/components/base/icons/IconBase' +import type { IconData } from '@/app/components/base/icons/IconBase' + +const Icon = ( + { + ref, + ...props + }: React.SVGProps & { + ref?: React.RefObject>; + }, +) => + +Icon.displayName = 'AnthropicShortLight' + +export default Icon diff --git a/web/app/components/base/icons/src/public/llm/Deepseek.json b/web/app/components/base/icons/src/public/llm/Deepseek.json new file mode 100644 index 0000000000..7501e23f88 --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/Deepseek.json @@ -0,0 +1,36 @@ +{ + "icon": { + "type": "element", + "isRootNode": true, + "name": "svg", + "attributes": { + "width": "40", + "height": "40", + "viewBox": "0 0 40 40", + "fill": "none", + "xmlns": "http://www.w3.org/2000/svg" + }, + "children": [ + { + "type": "element", + "name": "rect", + "attributes": { + "width": "40", + "height": "40", + "fill": "white" + }, + "children": [] + }, + { + "type": "element", + "name": "path", + "attributes": { + "d": "M36.6676 11.2917C36.3316 11.1277 36.1871 11.4402 35.9906 11.599C35.9242 11.6511 35.8668 11.7188 35.8108 11.7787C35.3199 12.3048 34.747 12.6485 33.9996 12.6068C32.9046 12.5469 31.971 12.8907 31.1455 13.7293C30.9696 12.6954 30.3863 12.0782 29.4996 11.6824C29.0348 11.4766 28.5647 11.2709 28.2406 10.823C28.0127 10.5053 27.9515 10.1511 27.8368 9.80214C27.7652 9.59121 27.6923 9.37506 27.4502 9.33861C27.1871 9.29694 27.0843 9.51829 26.9814 9.70318C26.5674 10.4584 26.4084 11.2917 26.4228 12.1355C26.4592 14.0313 27.26 15.5417 28.8486 16.6173C29.0296 16.7397 29.0764 16.8646 29.0191 17.0443C28.9111 17.4141 28.7822 17.7735 28.6676 18.1433C28.596 18.3803 28.4879 18.4323 28.2354 18.3282C27.363 17.9637 26.609 17.4246 25.9436 16.7709C24.8135 15.6771 23.7914 14.4689 22.5166 13.5235C22.2171 13.3021 21.919 13.0964 21.609 12.9011C20.3082 11.6355 21.7796 10.5964 22.1194 10.474C22.4762 10.3464 22.2431 9.9037 21.092 9.90891C19.9423 9.91413 18.889 10.2995 17.5478 10.8126C17.3512 10.8907 17.1455 10.948 16.9332 10.9922C15.7158 10.7631 14.4515 10.711 13.1298 10.8594C10.6428 11.1381 8.65587 12.3152 7.19493 14.3255C5.44102 16.7397 5.02826 19.4845 5.53347 22.349C6.06473 25.3646 7.60249 27.8646 9.96707 29.8178C12.4176 31.8413 15.2406 32.8334 18.4606 32.6433C20.4163 32.5313 22.5947 32.2683 25.0504 30.1875C25.6702 30.4949 26.3199 30.6173 27.3994 30.711C28.2302 30.7891 29.0296 30.6694 29.6494 30.5417C30.6194 30.3361 30.5518 29.4375 30.2015 29.2709C27.3578 27.9454 27.9814 28.4845 27.4136 28.0495C28.859 26.3361 31.0374 24.5574 31.889 18.797C31.9554 18.3386 31.898 18.0522 31.889 17.6798C31.8838 17.4558 31.9346 17.3673 32.1923 17.3413C32.9046 17.2605 33.596 17.0651 34.2314 16.7137C36.0739 15.7058 36.816 14.0522 36.9918 12.0678C37.0179 11.7657 36.9866 11.4506 36.6676 11.2917ZM20.613 29.1485C17.8564 26.9793 16.5204 26.2657 15.9684 26.297C15.4527 26.3255 15.5452 26.9167 15.6584 27.3022C15.777 27.6823 15.9319 27.9454 16.1494 28.2787C16.2991 28.5001 16.402 28.8307 15.9996 29.0755C15.1116 29.6277 13.5687 28.8907 13.4958 28.8542C11.7001 27.797 10.1988 26.3985 9.14025 24.487C8.11941 22.6459 7.52566 20.6719 7.42801 18.5651C7.40197 18.0547 7.5517 17.875 8.05691 17.7839C8.72227 17.6615 9.40978 17.6355 10.0751 17.7318C12.8876 18.1433 15.2822 19.4037 17.2887 21.3959C18.4346 22.5339 19.3018 23.8907 20.195 25.2162C21.1442 26.6251 22.1663 27.9662 23.4671 29.0651C23.9254 29.4506 24.2926 29.7449 24.6428 29.961C23.5856 30.0782 21.8199 30.1042 20.613 29.1485ZM21.9332 20.6407C21.9332 20.4141 22.1142 20.2345 22.342 20.2345C22.3928 20.2345 22.4398 20.2449 22.4814 20.2605C22.5374 20.2813 22.5895 20.3126 22.6299 20.3594C22.7027 20.4298 22.7444 20.5339 22.7444 20.6407C22.7444 20.8673 22.5635 21.047 22.3368 21.047C22.109 21.047 21.9332 20.8673 21.9332 20.6407ZM26.036 22.7501C25.7731 22.8569 25.51 22.9506 25.2575 22.961C24.8655 22.9793 24.4371 22.8203 24.204 22.6251C23.8434 22.323 23.5856 22.1537 23.4762 21.6225C23.4306 21.3959 23.4567 21.047 23.497 20.8465C23.5908 20.4141 23.4866 20.1381 23.1832 19.8855C22.9346 19.6798 22.6207 19.6251 22.2744 19.6251C22.1455 19.6251 22.027 19.5678 21.9384 19.5209C21.7939 19.4479 21.6754 19.2683 21.7887 19.047C21.8251 18.9766 22.001 18.8022 22.0426 18.7709C22.5114 18.5027 23.053 18.5913 23.5543 18.7918C24.0191 18.9818 24.3694 19.3307 24.8746 19.823C25.3915 20.4194 25.484 20.5861 25.7783 21.0313C26.01 21.3829 26.2223 21.7422 26.3668 22.1537C26.454 22.4089 26.3408 22.6198 26.036 22.7501Z", + "fill": "#4D6BFE" + }, + "children": [] + } + ] + }, + "name": "Deepseek" +} diff --git a/web/app/components/base/icons/src/public/llm/Deepseek.tsx b/web/app/components/base/icons/src/public/llm/Deepseek.tsx new file mode 100644 index 0000000000..24ef972caf --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/Deepseek.tsx @@ -0,0 +1,20 @@ +// GENERATE BY script +// DON NOT EDIT IT MANUALLY + +import * as React from 'react' +import data from './Deepseek.json' +import IconBase from '@/app/components/base/icons/IconBase' +import type { IconData } from '@/app/components/base/icons/IconBase' + +const Icon = ( + { + ref, + ...props + }: React.SVGProps & { + ref?: React.RefObject>; + }, +) => + +Icon.displayName = 'Deepseek' + +export default Icon diff --git a/web/app/components/base/icons/src/public/llm/Gemini.json b/web/app/components/base/icons/src/public/llm/Gemini.json new file mode 100644 index 0000000000..aca8e86a05 --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/Gemini.json @@ -0,0 +1,807 @@ +{ + "icon": { + "type": "element", + "isRootNode": true, + "name": "svg", + "attributes": { + "width": "40", + "height": "40", + "viewBox": "0 0 40 40", + "fill": "none", + "xmlns": "http://www.w3.org/2000/svg" + }, + "children": [ + { + "type": "element", + "name": "rect", + "attributes": { + "width": "40", + "height": "40", + "fill": "white" + }, + "children": [] + }, + { + "type": "element", + "name": "mask", + "attributes": { + "id": "mask0_3892_95663", + "style": "mask-type:alpha", + "maskUnits": "userSpaceOnUse", + "x": "6", + "y": "6", + "width": "28", + "height": "29" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M20 6C20.2936 6 20.5488 6.2005 20.6205 6.48556C20.8393 7.3566 21.1277 8.20866 21.4828 9.03356C22.4116 11.191 23.6854 13.0791 25.3032 14.6968C26.9218 16.3146 28.8095 17.5888 30.9664 18.5172C31.7941 18.8735 32.6436 19.16 33.5149 19.3795C33.6533 19.4143 33.7762 19.4942 33.8641 19.6067C33.9519 19.7192 33.9998 19.8578 34 20.0005C34 20.2941 33.7995 20.5492 33.5149 20.621C32.6437 20.8399 31.7915 21.1282 30.9664 21.4833C28.8095 22.4121 26.9209 23.6859 25.3032 25.3036C23.6854 26.9223 22.4116 28.8099 21.4828 30.9669C21.1278 31.7919 20.8394 32.6439 20.6205 33.5149C20.586 33.6534 20.5062 33.7764 20.3937 33.8644C20.2813 33.9524 20.1427 34.0003 20 34.0005C19.8572 34.0003 19.7186 33.9525 19.6062 33.8645C19.4937 33.7765 19.414 33.6535 19.3795 33.5149C19.1605 32.6439 18.872 31.7918 18.5167 30.9669C17.5884 28.8099 16.3151 26.9214 14.6964 25.3036C13.0782 23.6859 11.1906 22.4121 9.03309 21.4833C8.20814 21.1283 7.35608 20.8399 6.48509 20.621C6.34667 20.5864 6.22377 20.5065 6.13589 20.3941C6.04801 20.2817 6.00018 20.1432 6 20.0005C6.00024 19.8578 6.04808 19.7192 6.13594 19.6067C6.2238 19.4942 6.34667 19.4143 6.48509 19.3795C7.35612 19.1607 8.20819 18.8723 9.03309 18.5172C11.1906 17.5888 13.0786 16.3146 14.6964 14.6968C16.3141 13.0791 17.5884 11.191 18.5167 9.03356C18.8719 8.20862 19.1604 7.35656 19.3795 6.48556C19.4508 6.2005 19.7064 6 20 6Z", + "fill": "black" + }, + "children": [] + }, + { + "type": "element", + "name": "path", + "attributes": { + "d": "M20 6C20.2936 6 20.5488 6.2005 20.6205 6.48556C20.8393 7.3566 21.1277 8.20866 21.4828 9.03356C22.4116 11.191 23.6854 13.0791 25.3032 14.6968C26.9218 16.3146 28.8095 17.5888 30.9664 18.5172C31.7941 18.8735 32.6436 19.16 33.5149 19.3795C33.6533 19.4143 33.7762 19.4942 33.8641 19.6067C33.9519 19.7192 33.9998 19.8578 34 20.0005C34 20.2941 33.7995 20.5492 33.5149 20.621C32.6437 20.8399 31.7915 21.1282 30.9664 21.4833C28.8095 22.4121 26.9209 23.6859 25.3032 25.3036C23.6854 26.9223 22.4116 28.8099 21.4828 30.9669C21.1278 31.7919 20.8394 32.6439 20.6205 33.5149C20.586 33.6534 20.5062 33.7764 20.3937 33.8644C20.2813 33.9524 20.1427 34.0003 20 34.0005C19.8572 34.0003 19.7186 33.9525 19.6062 33.8645C19.4937 33.7765 19.414 33.6535 19.3795 33.5149C19.1605 32.6439 18.872 31.7918 18.5167 30.9669C17.5884 28.8099 16.3151 26.9214 14.6964 25.3036C13.0782 23.6859 11.1906 22.4121 9.03309 21.4833C8.20814 21.1283 7.35608 20.8399 6.48509 20.621C6.34667 20.5864 6.22377 20.5065 6.13589 20.3941C6.04801 20.2817 6.00018 20.1432 6 20.0005C6.00024 19.8578 6.04808 19.7192 6.13594 19.6067C6.2238 19.4942 6.34667 19.4143 6.48509 19.3795C7.35612 19.1607 8.20819 18.8723 9.03309 18.5172C11.1906 17.5888 13.0786 16.3146 14.6964 14.6968C16.3141 13.0791 17.5884 11.191 18.5167 9.03356C18.8719 8.20862 19.1604 7.35656 19.3795 6.48556C19.4508 6.2005 19.7064 6 20 6Z", + "fill": "url(#paint0_linear_3892_95663)" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "mask": "url(#mask0_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter0_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M3.47232 27.8921C6.70753 29.0411 10.426 26.8868 11.7778 23.0804C13.1296 19.274 11.6028 15.2569 8.36763 14.108C5.13242 12.959 1.41391 15.1133 0.06211 18.9197C-1.28969 22.7261 0.23711 26.7432 3.47232 27.8921Z", + "fill": "#FFE432" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter1_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M17.8359 15.341C22.2806 15.341 25.8838 11.6588 25.8838 7.11644C25.8838 2.57412 22.2806 -1.10815 17.8359 -1.10815C13.3912 -1.10815 9.78809 2.57412 9.78809 7.11644C9.78809 11.6588 13.3912 15.341 17.8359 15.341Z", + "fill": "#FC413D" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter2_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M14.7081 41.6431C19.3478 41.4163 22.8707 36.3599 22.5768 30.3493C22.283 24.3387 18.2836 19.65 13.644 19.8769C9.00433 20.1037 5.48139 25.1601 5.77525 31.1707C6.06911 37.1813 10.0685 41.87 14.7081 41.6431Z", + "fill": "#00B95C" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter3_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M14.7081 41.6431C19.3478 41.4163 22.8707 36.3599 22.5768 30.3493C22.283 24.3387 18.2836 19.65 13.644 19.8769C9.00433 20.1037 5.48139 25.1601 5.77525 31.1707C6.06911 37.1813 10.0685 41.87 14.7081 41.6431Z", + "fill": "#00B95C" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter4_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M19.355 38.0071C23.2447 35.6405 24.2857 30.2506 21.6803 25.9684C19.0748 21.6862 13.8095 20.1334 9.91983 22.5C6.03016 24.8666 4.98909 30.2565 7.59454 34.5387C10.2 38.8209 15.4653 40.3738 19.355 38.0071Z", + "fill": "#00B95C" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter5_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M35.0759 24.5504C39.4477 24.5504 42.9917 21.1377 42.9917 16.9278C42.9917 12.7179 39.4477 9.30518 35.0759 9.30518C30.7042 9.30518 27.1602 12.7179 27.1602 16.9278C27.1602 21.1377 30.7042 24.5504 35.0759 24.5504Z", + "fill": "#3186FF" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter6_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M0.362818 23.6667C4.3882 26.7279 10.2688 25.7676 13.4976 21.5219C16.7264 17.2762 16.0806 11.3528 12.0552 8.29156C8.02982 5.23037 2.14917 6.19062 -1.07959 10.4364C-4.30835 14.6821 -3.66256 20.6055 0.362818 23.6667Z", + "fill": "#FBBC04" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter7_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M20.9877 28.1903C25.7924 31.4936 32.1612 30.5732 35.2128 26.1346C38.2644 21.696 36.8432 15.4199 32.0385 12.1166C27.2338 8.81334 20.865 9.73372 17.8134 14.1723C14.7618 18.611 16.183 24.887 20.9877 28.1903Z", + "fill": "#3186FF" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter8_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M29.7231 4.99175C30.9455 6.65415 29.3748 9.88535 26.2149 12.2096C23.0549 14.5338 19.5026 15.0707 18.2801 13.4088C17.0576 11.7468 18.6284 8.51514 21.7883 6.19092C24.9482 3.86717 28.5006 3.32982 29.7231 4.99175Z", + "fill": "#749BFF" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter9_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M19.6891 12.9486C24.5759 8.41581 26.2531 2.27858 23.4354 -0.759249C20.6176 -3.79708 14.3718 -2.58516 9.485 1.94765C4.59823 6.48046 2.92099 12.6177 5.73879 15.6555C8.55658 18.6933 14.8024 17.4814 19.6891 12.9486Z", + "fill": "#FC413D" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "g", + "attributes": { + "filter": "url(#filter10_f_3892_95663)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M9.6712 29.23C12.5757 31.3088 15.9102 31.6247 17.1191 29.9356C18.328 28.2465 16.9535 25.1921 14.049 23.1133C11.1446 21.0345 7.81003 20.7186 6.60113 22.4077C5.39223 24.0968 6.76675 27.1512 9.6712 29.23Z", + "fill": "#FFEE48" + }, + "children": [] + } + ] + } + ] + }, + { + "type": "element", + "name": "defs", + "attributes": {}, + "children": [ + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter0_f_3892_95663", + "x": "-3.44095", + "y": "10.7885", + "width": "18.7217", + "height": "20.4229", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "1.50514", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter1_f_3892_95663", + "x": "-4.76352", + "y": "-15.6598", + "width": "45.1989", + "height": "45.5524", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "7.2758", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter2_f_3892_95663", + "x": "-6.61209", + "y": "7.49899", + "width": "41.5757", + "height": "46.522", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "6.18495", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter3_f_3892_95663", + "x": "-6.61209", + "y": "7.49899", + "width": "41.5757", + "height": "46.522", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "6.18495", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter4_f_3892_95663", + "x": "-6.21073", + "y": "9.02316", + "width": "41.6959", + "height": "42.4608", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "6.18495", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter5_f_3892_95663", + "x": "15.405", + "y": "-2.44994", + "width": "39.3423", + "height": "38.7556", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "5.87756", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter6_f_3892_95663", + "x": "-13.7886", + "y": "-4.15284", + "width": "39.9951", + "height": "40.2639", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "5.32691", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter7_f_3892_95663", + "x": "6.6925", + "y": "0.620963", + "width": "39.6414", + "height": "39.065", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "4.75678", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter8_f_3892_95663", + "x": "9.35225", + "y": "-4.48661", + "width": "29.2984", + "height": "27.3739", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "4.25649", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter9_f_3892_95663", + "x": "-2.81919", + "y": "-9.62339", + "width": "34.8122", + "height": "34.143", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "3.59514", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "filter", + "attributes": { + "id": "filter10_f_3892_95663", + "x": "-2.73761", + "y": "12.4221", + "width": "29.1949", + "height": "27.4994", + "filterUnits": "userSpaceOnUse", + "color-interpolation-filters": "sRGB" + }, + "children": [ + { + "type": "element", + "name": "feFlood", + "attributes": { + "flood-opacity": "0", + "result": "BackgroundImageFix" + }, + "children": [] + }, + { + "type": "element", + "name": "feBlend", + "attributes": { + "mode": "normal", + "in": "SourceGraphic", + "in2": "BackgroundImageFix", + "result": "shape" + }, + "children": [] + }, + { + "type": "element", + "name": "feGaussianBlur", + "attributes": { + "stdDeviation": "4.44986", + "result": "effect1_foregroundBlur_3892_95663" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "linearGradient", + "attributes": { + "id": "paint0_linear_3892_95663", + "x1": "13.9595", + "y1": "24.7349", + "x2": "28.5025", + "y2": "12.4738", + "gradientUnits": "userSpaceOnUse" + }, + "children": [ + { + "type": "element", + "name": "stop", + "attributes": { + "stop-color": "#4893FC" + }, + "children": [] + }, + { + "type": "element", + "name": "stop", + "attributes": { + "offset": "0.27", + "stop-color": "#4893FC" + }, + "children": [] + }, + { + "type": "element", + "name": "stop", + "attributes": { + "offset": "0.777", + "stop-color": "#969DFF" + }, + "children": [] + }, + { + "type": "element", + "name": "stop", + "attributes": { + "offset": "1", + "stop-color": "#BD99FE" + }, + "children": [] + } + ] + } + ] + } + ] + }, + "name": "Gemini" +} diff --git a/web/app/components/base/icons/src/public/llm/Gemini.tsx b/web/app/components/base/icons/src/public/llm/Gemini.tsx new file mode 100644 index 0000000000..a8fefe5f66 --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/Gemini.tsx @@ -0,0 +1,20 @@ +// GENERATE BY script +// DON NOT EDIT IT MANUALLY + +import * as React from 'react' +import data from './Gemini.json' +import IconBase from '@/app/components/base/icons/IconBase' +import type { IconData } from '@/app/components/base/icons/IconBase' + +const Icon = ( + { + ref, + ...props + }: React.SVGProps & { + ref?: React.RefObject>; + }, +) => + +Icon.displayName = 'Gemini' + +export default Icon diff --git a/web/app/components/base/icons/src/public/llm/Grok.json b/web/app/components/base/icons/src/public/llm/Grok.json new file mode 100644 index 0000000000..b2758bfe92 --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/Grok.json @@ -0,0 +1,72 @@ +{ + "icon": { + "type": "element", + "isRootNode": true, + "name": "svg", + "attributes": { + "width": "40", + "height": "40", + "viewBox": "0 0 40 40", + "fill": "none", + "xmlns": "http://www.w3.org/2000/svg" + }, + "children": [ + { + "type": "element", + "name": "rect", + "attributes": { + "width": "40", + "height": "40", + "fill": "white" + }, + "children": [] + }, + { + "type": "element", + "name": "g", + "attributes": { + "clip-path": "url(#clip0_3892_95659)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M15.745 24.54L26.715 16.35C27.254 15.95 28.022 16.106 28.279 16.73C29.628 20.018 29.025 23.971 26.341 26.685C23.658 29.399 19.924 29.995 16.511 28.639L12.783 30.384C18.13 34.081 24.623 33.166 28.681 29.06C31.9 25.805 32.897 21.368 31.965 17.367L31.973 17.376C30.622 11.498 32.305 9.149 35.755 4.345L36 4L31.46 8.59V8.576L15.743 24.544M13.48 26.531C9.643 22.824 10.305 17.085 13.58 13.776C16 11.327 19.968 10.328 23.432 11.797L27.152 10.06C26.482 9.57 25.622 9.043 24.637 8.673C20.182 6.819 14.848 7.742 11.227 11.401C7.744 14.924 6.648 20.341 8.53 24.962C9.935 28.416 7.631 30.86 5.31 33.326C4.49 34.2 3.666 35.074 3 36L13.478 26.534", + "fill": "black" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "defs", + "attributes": {}, + "children": [ + { + "type": "element", + "name": "clipPath", + "attributes": { + "id": "clip0_3892_95659" + }, + "children": [ + { + "type": "element", + "name": "rect", + "attributes": { + "width": "33", + "height": "32", + "fill": "white", + "transform": "translate(3 4)" + }, + "children": [] + } + ] + } + ] + } + ] + }, + "name": "Grok" +} diff --git a/web/app/components/base/icons/src/public/llm/Grok.tsx b/web/app/components/base/icons/src/public/llm/Grok.tsx new file mode 100644 index 0000000000..6e5dbcf8b5 --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/Grok.tsx @@ -0,0 +1,20 @@ +// GENERATE BY script +// DON NOT EDIT IT MANUALLY + +import * as React from 'react' +import data from './Grok.json' +import IconBase from '@/app/components/base/icons/IconBase' +import type { IconData } from '@/app/components/base/icons/IconBase' + +const Icon = ( + { + ref, + ...props + }: React.SVGProps & { + ref?: React.RefObject>; + }, +) => + +Icon.displayName = 'Grok' + +export default Icon diff --git a/web/app/components/base/icons/src/public/llm/OpenaiSmall.json b/web/app/components/base/icons/src/public/llm/OpenaiSmall.json new file mode 100644 index 0000000000..baccaeb3fc --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/OpenaiSmall.json @@ -0,0 +1,128 @@ +{ + "icon": { + "type": "element", + "isRootNode": true, + "name": "svg", + "attributes": { + "width": "26", + "height": "26", + "viewBox": "0 0 26 26", + "fill": "none", + "xmlns": "http://www.w3.org/2000/svg", + "xmlns:xlink": "http://www.w3.org/1999/xlink" + }, + "children": [ + { + "type": "element", + "name": "g", + "attributes": { + "clip-path": "url(#clip0_3892_83671)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M1 13C1 9.27247 1 7.4087 1.60896 5.93853C2.42092 3.97831 3.97831 2.42092 5.93853 1.60896C7.4087 1 9.27247 1 13 1C16.7275 1 18.5913 1 20.0615 1.60896C22.0217 2.42092 23.5791 3.97831 24.391 5.93853C25 7.4087 25 9.27247 25 13C25 16.7275 25 18.5913 24.391 20.0615C23.5791 22.0217 22.0217 23.5791 20.0615 24.391C18.5913 25 16.7275 25 13 25C9.27247 25 7.4087 25 5.93853 24.391C3.97831 23.5791 2.42092 22.0217 1.60896 20.0615C1 18.5913 1 16.7275 1 13Z", + "fill": "white" + }, + "children": [] + }, + { + "type": "element", + "name": "rect", + "attributes": { + "width": "24", + "height": "24", + "transform": "translate(1 1)", + "fill": "url(#pattern0_3892_83671)" + }, + "children": [] + }, + { + "type": "element", + "name": "rect", + "attributes": { + "width": "24", + "height": "24", + "transform": "translate(1 1)", + "fill": "white", + "fill-opacity": "0.01" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "path", + "attributes": { + "d": "M13 0.75C14.8603 0.75 16.2684 0.750313 17.3945 0.827148C18.5228 0.904144 19.3867 1.05876 20.1572 1.37793C22.1787 2.21525 23.7847 3.82133 24.6221 5.84277C24.9412 6.61333 25.0959 7.47723 25.1729 8.60547C25.2497 9.73161 25.25 11.1397 25.25 13C25.25 14.8603 25.2497 16.2684 25.1729 17.3945C25.0959 18.5228 24.9412 19.3867 24.6221 20.1572C23.7847 22.1787 22.1787 23.7847 20.1572 24.6221C19.3867 24.9412 18.5228 25.0959 17.3945 25.1729C16.2684 25.2497 14.8603 25.25 13 25.25C11.1397 25.25 9.73161 25.2497 8.60547 25.1729C7.47723 25.0959 6.61333 24.9412 5.84277 24.6221C3.82133 23.7847 2.21525 22.1787 1.37793 20.1572C1.05876 19.3867 0.904144 18.5228 0.827148 17.3945C0.750313 16.2684 0.75 14.8603 0.75 13C0.75 11.1397 0.750313 9.73161 0.827148 8.60547C0.904144 7.47723 1.05876 6.61333 1.37793 5.84277C2.21525 3.82133 3.82133 2.21525 5.84277 1.37793C6.61333 1.05876 7.47723 0.904144 8.60547 0.827148C9.73161 0.750313 11.1397 0.75 13 0.75Z", + "stroke": "#101828", + "stroke-opacity": "0.08", + "stroke-width": "0.5" + }, + "children": [] + }, + { + "type": "element", + "name": "defs", + "attributes": {}, + "children": [ + { + "type": "element", + "name": "pattern", + "attributes": { + "id": "pattern0_3892_83671", + "patternContentUnits": "objectBoundingBox", + "width": "1", + "height": "1" + }, + "children": [ + { + "type": "element", + "name": "use", + "attributes": { + "xlink:href": "#image0_3892_83671", + "transform": "scale(0.00625)" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "clipPath", + "attributes": { + "id": "clip0_3892_83671" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M1 13C1 9.27247 1 7.4087 1.60896 5.93853C2.42092 3.97831 3.97831 2.42092 5.93853 1.60896C7.4087 1 9.27247 1 13 1C16.7275 1 18.5913 1 20.0615 1.60896C22.0217 2.42092 23.5791 3.97831 24.391 5.93853C25 7.4087 25 9.27247 25 13C25 16.7275 25 18.5913 24.391 20.0615C23.5791 22.0217 22.0217 23.5791 20.0615 24.391C18.5913 25 16.7275 25 13 25C9.27247 25 7.4087 25 5.93853 24.391C3.97831 23.5791 2.42092 22.0217 1.60896 20.0615C1 18.5913 1 16.7275 1 13Z", + "fill": "white" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "image", + "attributes": { + "id": "image0_3892_83671", + "width": "160", + "height": "160", + "preserveAspectRatio": "none", + "xlink:href": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAYAAACLz2ctAAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA0ySURBVHgB7Z3vsdM6E8Z93nm/QwdABUAFgQqACgIVABUAFcCpAKgAOoBUwKECOBUAFfj6yYzumNx4pV2vtKtkfzO+3CHESezHWu0frS7GiSEIjPjfEASGhAADU0KAgSkhwMCUEGBgSggwMCUEGJgSAgxMCQEGpoQAA1NCgIEpIcDAlBBgYEoIMDAlBBiYEgIMTAkBBqaEAAN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+ ] + }, + "name": "OpenaiSmall" +} diff --git a/web/app/components/base/icons/src/public/llm/OpenaiSmall.tsx b/web/app/components/base/icons/src/public/llm/OpenaiSmall.tsx new file mode 100644 index 0000000000..42cd853fab --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/OpenaiSmall.tsx @@ -0,0 +1,20 @@ +// GENERATE BY script +// DON NOT EDIT IT MANUALLY + +import * as React from 'react' +import data from './OpenaiSmall.json' +import IconBase from '@/app/components/base/icons/IconBase' +import type { IconData } from '@/app/components/base/icons/IconBase' + +const Icon = ( + { + ref, + ...props + }: React.SVGProps & { + ref?: React.RefObject>; + }, +) => + +Icon.displayName = 'OpenaiSmall' + +export default Icon diff --git a/web/app/components/base/icons/src/public/llm/index.ts b/web/app/components/base/icons/src/public/llm/index.ts index fa4a1bdd10..ba96f901a3 100644 --- a/web/app/components/base/icons/src/public/llm/index.ts +++ b/web/app/components/base/icons/src/public/llm/index.ts @@ -1,5 +1,6 @@ export { default as AnthropicDark } from './AnthropicDark' export { default as AnthropicLight } from './AnthropicLight' +export { default as AnthropicShortLight } from './AnthropicShortLight' export { default as AnthropicText } from './AnthropicText' export { default as Anthropic } from './Anthropic' export { default as AzureOpenaiServiceText } from './AzureOpenaiServiceText' @@ -12,8 +13,11 @@ export { default as ChatglmText } from './ChatglmText' export { default as Chatglm } from './Chatglm' export { default as CohereText } from './CohereText' export { default as Cohere } from './Cohere' +export { default as Deepseek } from './Deepseek' +export { default as Gemini } from './Gemini' export { default as Gpt3 } from './Gpt3' export { default as Gpt4 } from './Gpt4' +export { default as Grok } from './Grok' export { default as HuggingfaceTextHub } from './HuggingfaceTextHub' export { default as HuggingfaceText } from './HuggingfaceText' export { default as Huggingface } from './Huggingface' @@ -28,6 +32,7 @@ export { default as Microsoft } from './Microsoft' export { default as OpenaiBlack } from './OpenaiBlack' export { default as OpenaiBlue } from './OpenaiBlue' export { default as OpenaiGreen } from './OpenaiGreen' +export { default as OpenaiSmall } from './OpenaiSmall' export { default as OpenaiTeal } from './OpenaiTeal' export { default as OpenaiText } from './OpenaiText' export { default as OpenaiTransparent } from './OpenaiTransparent' diff --git a/web/app/components/base/icons/src/vender/knowledge/AddChunks.tsx b/web/app/components/base/icons/src/vender/knowledge/AddChunks.tsx index fc1270ae66..8068f7113c 100644 --- a/web/app/components/base/icons/src/vender/knowledge/AddChunks.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/AddChunks.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/ArrowShape.tsx b/web/app/components/base/icons/src/vender/knowledge/ArrowShape.tsx index 72ae12c7dd..b93cd2a325 100644 --- a/web/app/components/base/icons/src/vender/knowledge/ArrowShape.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/ArrowShape.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/Divider.tsx b/web/app/components/base/icons/src/vender/knowledge/Divider.tsx index 56606448be..8f7537b0db 100644 --- a/web/app/components/base/icons/src/vender/knowledge/Divider.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/Divider.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/Economic.tsx b/web/app/components/base/icons/src/vender/knowledge/Economic.tsx index c69560689e..52e2262fc1 100644 --- a/web/app/components/base/icons/src/vender/knowledge/Economic.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/Economic.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/FullTextSearch.tsx b/web/app/components/base/icons/src/vender/knowledge/FullTextSearch.tsx index 0e36656343..714e63ecc0 100644 --- a/web/app/components/base/icons/src/vender/knowledge/FullTextSearch.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/FullTextSearch.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/GeneralChunk.tsx b/web/app/components/base/icons/src/vender/knowledge/GeneralChunk.tsx index 6e75ed920a..e269f3ad91 100644 --- a/web/app/components/base/icons/src/vender/knowledge/GeneralChunk.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/GeneralChunk.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/HighQuality.tsx b/web/app/components/base/icons/src/vender/knowledge/HighQuality.tsx index 880e63a003..964e4f1a2b 100644 --- a/web/app/components/base/icons/src/vender/knowledge/HighQuality.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/HighQuality.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/HybridSearch.tsx b/web/app/components/base/icons/src/vender/knowledge/HybridSearch.tsx index 45d76c2fd1..b9a83245ee 100644 --- a/web/app/components/base/icons/src/vender/knowledge/HybridSearch.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/HybridSearch.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/ParentChildChunk.tsx b/web/app/components/base/icons/src/vender/knowledge/ParentChildChunk.tsx index 949cd508de..87664b706a 100644 --- a/web/app/components/base/icons/src/vender/knowledge/ParentChildChunk.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/ParentChildChunk.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/QuestionAndAnswer.tsx b/web/app/components/base/icons/src/vender/knowledge/QuestionAndAnswer.tsx index 6ebc279a15..2492e63710 100644 --- a/web/app/components/base/icons/src/vender/knowledge/QuestionAndAnswer.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/QuestionAndAnswer.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/SearchMenu.tsx b/web/app/components/base/icons/src/vender/knowledge/SearchMenu.tsx index 4826abb20f..497f24a984 100644 --- a/web/app/components/base/icons/src/vender/knowledge/SearchMenu.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/SearchMenu.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/knowledge/VectorSearch.tsx b/web/app/components/base/icons/src/vender/knowledge/VectorSearch.tsx index 2346033f89..fa22a54587 100644 --- a/web/app/components/base/icons/src/vender/knowledge/VectorSearch.tsx +++ b/web/app/components/base/icons/src/vender/knowledge/VectorSearch.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/pipeline/InputField.tsx b/web/app/components/base/icons/src/vender/pipeline/InputField.tsx index 4c224844d0..981b2d38d2 100644 --- a/web/app/components/base/icons/src/vender/pipeline/InputField.tsx +++ b/web/app/components/base/icons/src/vender/pipeline/InputField.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/pipeline/PipelineFill.tsx b/web/app/components/base/icons/src/vender/pipeline/PipelineFill.tsx index e0c2cc5386..2a31601cb3 100644 --- a/web/app/components/base/icons/src/vender/pipeline/PipelineFill.tsx +++ b/web/app/components/base/icons/src/vender/pipeline/PipelineFill.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/base/icons/src/vender/pipeline/PipelineLine.tsx b/web/app/components/base/icons/src/vender/pipeline/PipelineLine.tsx index e18df7af48..5f37828ed5 100644 --- a/web/app/components/base/icons/src/vender/pipeline/PipelineLine.tsx +++ b/web/app/components/base/icons/src/vender/pipeline/PipelineLine.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject>; + ref?: React.RefObject>; }, ) => diff --git a/web/app/components/header/account-setting/model-provider-page/index.tsx b/web/app/components/header/account-setting/model-provider-page/index.tsx index 35de29185f..98de1203b1 100644 --- a/web/app/components/header/account-setting/model-provider-page/index.tsx +++ b/web/app/components/header/account-setting/model-provider-page/index.tsx @@ -21,6 +21,7 @@ import InstallFromMarketplace from './install-from-marketplace' import { useProviderContext } from '@/context/provider-context' import cn from '@/utils/classnames' import { useGlobalPublicStore } from '@/context/global-public-context' +import QuotaPanel from './provider-added-card/quota-panel' type Props = { searchText: string @@ -106,6 +107,7 @@ const ModelProviderPage = ({ searchText }: Props) => { /> + {!filteredConfiguredProviders?.length && (
diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/index.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/index.tsx index d3601d04f9..895e25bce8 100644 --- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/index.tsx +++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/index.tsx @@ -11,6 +11,7 @@ import type { ModelProvider, } from '../declarations' import { ConfigurationMethodEnum } from '../declarations' +import type { ModelProviderQuotaGetPaid } from '../utils' import { MODEL_PROVIDER_QUOTA_GET_PAID, modelTypeFormat, @@ -18,7 +19,6 @@ import { import ProviderIcon from '../provider-icon' import ModelBadge from '../model-badge' import CredentialPanel from './credential-panel' -import QuotaPanel from './quota-panel' import ModelList from './model-list' import { fetchModelProviderModelList } from '@/service/common' import { useEventEmitterContextContext } from '@/context/event-emitter' @@ -49,7 +49,7 @@ const ProviderAddedCard: FC = ({ const systemConfig = provider.system_configuration const hasModelList = fetched && !!modelList.length const { isCurrentWorkspaceManager } = useAppContext() - const showQuota = systemConfig.enabled && [...MODEL_PROVIDER_QUOTA_GET_PAID].includes(provider.provider) && !IS_CE_EDITION + const showQuota = systemConfig.enabled && [...MODEL_PROVIDER_QUOTA_GET_PAID].includes(provider.provider as ModelProviderQuotaGetPaid) && !IS_CE_EDITION const showCredential = configurationMethods.includes(ConfigurationMethodEnum.predefinedModel) && isCurrentWorkspaceManager const getModelList = async (providerName: string) => { @@ -104,13 +104,6 @@ const ProviderAddedCard: FC = ({ }
- { - showQuota && ( - - ) - } { showCredential && ( = { + [ModelProviderQuotaGetPaid.OPENAI]: 'langgenius/openai', + [ModelProviderQuotaGetPaid.ANTHROPIC]: 'langgenius/anthropic', + [ModelProviderQuotaGetPaid.GEMINI]: 'langgenius/gemini', + [ModelProviderQuotaGetPaid.X]: 'langgenius/x', + [ModelProviderQuotaGetPaid.DEEPSEEK]: 'langgenius/deepseek', +} type QuotaPanelProps = { - provider: ModelProvider + providers: ModelProvider[] } const QuotaPanel: FC = ({ - provider, + providers, }) => { const { t } = useTranslation() + const { currentWorkspace } = useAppContext() + const credits = Math.max(currentWorkspace.trial_credits - currentWorkspace.trial_credits_used, 0) + const providerSet = new Set(providers.map(p => p.provider)) + const { formatTime } = useTimestamp() + const { + plugins: allPlugins, + } = useMarketplaceAllPlugins(providers, '') + const [selectedPlugin, setSelectedPlugin] = useState(null) + const [isShowInstallModal, { + setTrue: showInstallFromMarketplace, + setFalse: hideInstallFromMarketplace, + }] = useBoolean(false) + const selectedPluginIdRef = useRef(null) - const customConfig = provider.custom_configuration - const priorityUseType = provider.preferred_provider_type - const systemConfig = provider.system_configuration - const currentQuota = systemConfig.enabled && systemConfig.quota_configurations.find(item => item.quota_type === systemConfig.current_quota_type) - const openaiOrAnthropic = MODEL_PROVIDER_QUOTA_GET_PAID.includes(provider.provider) + const handleIconClick = useCallback((key: string, isAvailable: boolean) => { + if (!isAvailable && allPlugins) { + const pluginId = providerKeyToPluginId[key] + const plugin = allPlugins.find(p => p.plugin_id === pluginId) + if (plugin) { + setSelectedPlugin(plugin) + selectedPluginIdRef.current = pluginId + showInstallFromMarketplace() + } + } + }, [allPlugins, showInstallFromMarketplace]) + + // Listen to providers changes and auto-close modal if installation succeeds + useEffect(() => { + if (isShowInstallModal && selectedPluginIdRef.current) { + const isInstalled = providers.some(p => p.provider.startsWith(selectedPluginIdRef.current!)) + if (isInstalled) { + hideInstallFromMarketplace() + selectedPluginIdRef.current = null + } + } + }, [providers, isShowInstallModal, hideInstallFromMarketplace]) return ( -
+
{t('common.modelProvider.quota')} -
- { - currentQuota && ( -
- {formatNumber(Math.max((currentQuota?.quota_limit || 0) - (currentQuota?.quota_used || 0), 0))} - { - currentQuota?.quota_unit === QuotaUnitEnum.tokens && 'Tokens' - } - { - currentQuota?.quota_unit === QuotaUnitEnum.times && t('common.modelProvider.callTimes') - } - { - currentQuota?.quota_unit === QuotaUnitEnum.credits && t('common.modelProvider.credits') - } -
- ) - } - { - priorityUseType === PreferredProviderTypeEnum.system && customConfig.status === CustomConfigurationStatusEnum.active && ( - - ) - } +
+
+ {formatNumber(credits)} + {t('common.modelProvider.credits')} + {currentWorkspace.next_credit_reset_date ? ( + <> + · + {t('common.modelProvider.resetDate', { + date: formatTime(currentWorkspace.next_credit_reset_date, t('appLog.dateFormat') as string), + interpolation: { escapeValue: false }, + })} + + ) : null} +
+
+ {allProviders.map(({ key, Icon }) => { + const isAvailable = providerSet.has(key) + return ( + +
handleIconClick(key, isAvailable)} + > + + {!isAvailable && ( +
+ )} +
+ + ) + })} +
+
+ {isShowInstallModal && ( + + )}
) } -export default QuotaPanel +export default React.memo(QuotaPanel) diff --git a/web/app/components/header/account-setting/model-provider-page/utils.ts b/web/app/components/header/account-setting/model-provider-page/utils.ts index f19999cc1f..11fdcaf08d 100644 --- a/web/app/components/header/account-setting/model-provider-page/utils.ts +++ b/web/app/components/header/account-setting/model-provider-page/utils.ts @@ -17,7 +17,23 @@ import { validateModelProvider, } from '@/service/common' -export const MODEL_PROVIDER_QUOTA_GET_PAID = ['langgenius/anthropic/anthropic', 'langgenius/openai/openai', 'langgenius/azure_openai/azure_openai'] +export enum ModelProviderQuotaGetPaid { + ANTHROPIC = 'langgenius/anthropic/anthropic', + OPENAI = 'langgenius/openai/openai', + // AZURE_OPENAI = 'langgenius/azure_openai/azure_openai', + GEMINI = 'langgenius/gemini/google', + X = 'langgenius/x/x', + DEEPSEEK = 'langgenius/deepseek/deepseek', +} +export const MODEL_PROVIDER_QUOTA_GET_PAID = [ModelProviderQuotaGetPaid.ANTHROPIC, ModelProviderQuotaGetPaid.OPENAI, ModelProviderQuotaGetPaid.GEMINI, ModelProviderQuotaGetPaid.X, ModelProviderQuotaGetPaid.DEEPSEEK] + +export const modelNameMap = { + [ModelProviderQuotaGetPaid.OPENAI]: 'OpenAI', + [ModelProviderQuotaGetPaid.ANTHROPIC]: 'Anthropic', + [ModelProviderQuotaGetPaid.GEMINI]: 'Gemini', + [ModelProviderQuotaGetPaid.X]: 'Grok', + [ModelProviderQuotaGetPaid.DEEPSEEK]: 'DeepSeek', +} export const isNullOrUndefined = (value: any) => { return value === undefined || value === null diff --git a/web/app/components/plugins/provider-card.tsx b/web/app/components/plugins/provider-card.tsx index c8555ffcee..fe7f301e50 100644 --- a/web/app/components/plugins/provider-card.tsx +++ b/web/app/components/plugins/provider-card.tsx @@ -88,7 +88,7 @@ const ProviderCard: FC = ({ manifest={payload} uniqueIdentifier={payload.latest_package_identifier} onClose={hideInstallFromMarketplace} - onSuccess={() => hideInstallFromMarketplace()} + onSuccess={hideInstallFromMarketplace} /> ) } diff --git a/web/context/app-context.tsx b/web/context/app-context.tsx index 9fd6481440..210ef273da 100644 --- a/web/context/app-context.tsx +++ b/web/context/app-context.tsx @@ -52,6 +52,9 @@ const initialWorkspaceInfo: ICurrentWorkspace = { created_at: 0, role: 'normal', providers: [], + trial_credits: 200, + trial_credits_used: 0, + next_credit_reset_date: 0, } const AppContext = createContext({ diff --git a/web/i18n/en-US/billing.ts b/web/i18n/en-US/billing.ts index 72cf9a3fca..d85dccf6ac 100644 --- a/web/i18n/en-US/billing.ts +++ b/web/i18n/en-US/billing.ts @@ -98,7 +98,7 @@ const translation = { messageRequest: { title: '{{count,number}} message credits', titlePerMonth: '{{count,number}} message credits/month', - tooltip: 'Message credits are provided to help you easily try out different OpenAI models in Dify. Credits are consumed based on the model type. Once they’re used up, you can switch to your own OpenAI API key.', + tooltip: 'Message credits are provided to help you easily try out different models from OpenAI, Anthropic, Gemini, Grok, and DeepSeek in Dify. Credits are consumed based on the model type. Once they\'re used up, you can switch to your own API key.', }, annotatedResponse: { title: '{{count,number}} Annotation Quota Limits', diff --git a/web/i18n/en-US/common.ts b/web/i18n/en-US/common.ts index b9d315388f..e30e079132 100644 --- a/web/i18n/en-US/common.ts +++ b/web/i18n/en-US/common.ts @@ -440,7 +440,9 @@ const translation = { buyQuota: 'Buy Quota', priorityUse: 'Priority use', removeKey: 'Remove API Key', - tip: 'Priority will be given to the paid quota. The Trial quota will be used after the paid quota is exhausted.', + tip: 'Message Credits supports models from OpenAI, Anthropic, Gemini, Grok, and DeepSeek. Priority will be given to the paid quota. The free quota will be used after the paid quota is exhausted.', + modelSupported: '{{modelName}} models are using this quota.', + modelNotSupported: '{{modelName}} models are not installed.', }, item: { deleteDesc: '{{modelName}} are being used as system reasoning models. Some functions will not be available after removal. Please confirm.', @@ -467,12 +469,12 @@ const translation = { featureSupported: '{{feature}} supported', callTimes: 'Call times', credits: 'Message Credits', + resetDate: 'Reset on {{date}}', buyQuota: 'Buy Quota', getFreeTokens: 'Get free Tokens', priorityUsing: 'Prioritize using', deprecated: 'Deprecated', confirmDelete: 'Confirm deletion?', - quotaTip: 'Remaining available free tokens', loadPresets: 'Load Presets', parameters: 'PARAMETERS', loadBalancing: 'Load balancing', diff --git a/web/i18n/ja-JP/billing.ts b/web/i18n/ja-JP/billing.ts index 426687da6c..428ce29ed2 100644 --- a/web/i18n/ja-JP/billing.ts +++ b/web/i18n/ja-JP/billing.ts @@ -96,7 +96,7 @@ const translation = { messageRequest: { title: '{{count,number}}メッセージクレジット', titlePerMonth: '{{count,number}}メッセージクレジット/月', - tooltip: 'メッセージクレジットは、Dify でさまざまな OpenAI モデルを簡単にお試しいただくためのものです。モデルタイプに応じてクレジットが消費され、使い切った後はご自身の OpenAI API キーに切り替えていただけます。', + tooltip: 'メッセージクレジットは、DifyでOpenAI、Anthropic、Gemini、Grok、DeepSeekなどのさまざまなモデルを簡単に試すために提供されています。クレジットはモデルの種類に基づいて消費されます。使い切ったら、独自のAPIキーに切り替えることができます。', }, annotatedResponse: { title: '{{count,number}}の注釈クォータ制限', diff --git a/web/i18n/ja-JP/common.ts b/web/i18n/ja-JP/common.ts index 5526ac0441..6cdfa3d33d 100644 --- a/web/i18n/ja-JP/common.ts +++ b/web/i18n/ja-JP/common.ts @@ -431,7 +431,9 @@ const translation = { buyQuota: 'クォータを購入', priorityUse: '優先利用', removeKey: 'API キーを削除', - tip: '有料クォータは優先して使用されます。有料クォータを使用し終えた後、トライアルクォータが利用されます。', + tip: 'メッセージ枠はOpen AI、Anthropic、Gemini、Grok、DeepSeekのモデルを使用することをサポートしています。無料枠は有料枠が使い果たされた後に消費されます。', + modelSupported: 'このクォータは現在{{modelName}}に使用されでいます。', + modelNotSupported: '{{modelName}} 未インストール。', }, item: { deleteDesc: '{{modelName}}はシステムが推測するモデルとして利用されています。削除すると、一部の機能が使用不可能になる可能性があります。ご確認ください。', @@ -458,12 +460,12 @@ const translation = { featureSupported: '{{feature}}に対応', callTimes: '呼び出し回数', credits: 'クレジット', + resetDate: '{{date}} にリセット', buyQuota: 'クォータ購入', getFreeTokens: '無料トークンを獲得', priorityUsing: '優先利用', deprecated: '廃止予定', confirmDelete: '削除を確認', - quotaTip: '残りの無料トークン', loadPresets: 'プリセットの読み込み', parameters: 'パラメータ', loadBalancing: '負荷分散', diff --git a/web/i18n/zh-Hans/billing.ts b/web/i18n/zh-Hans/billing.ts index 96ba7970c8..6d21693f88 100644 --- a/web/i18n/zh-Hans/billing.ts +++ b/web/i18n/zh-Hans/billing.ts @@ -97,7 +97,7 @@ const translation = { messageRequest: { title: '{{count,number}} 条消息额度', titlePerMonth: '{{count,number}} 条消息额度/月', - tooltip: '消息额度旨在帮助您便捷地试用 Dify 中的各类 OpenAI 模型。不同模型会消耗不同额度。额度用尽后,您可以切换为使用自己的 OpenAI API 密钥。', + tooltip: '消息额度旨在帮助您便捷地试用 Dify 中来自 OpenAI、Anthropic、Gemini、Grok、DeepSeek 的模型的的不同模型。不同模型会消耗不同额度。额度用尽后,您可以切换为使用自己的 API 密钥。', }, annotatedResponse: { title: '{{count,number}} 个标注回复数', diff --git a/web/i18n/zh-Hans/common.ts b/web/i18n/zh-Hans/common.ts index 0ecdb20d5e..6b4ca5a34b 100644 --- a/web/i18n/zh-Hans/common.ts +++ b/web/i18n/zh-Hans/common.ts @@ -433,7 +433,9 @@ const translation = { buyQuota: '购买额度', priorityUse: '优先使用', removeKey: '删除 API 密钥', - tip: '已付费额度将优先考虑。试用额度将在付费额度用完后使用。', + tip: '消息额度支持使用 OpenAI、Anthropic、Gemini、Grok、DeepSeek 的模型;免费额度会在付费额度用尽后才会消耗。', + modelSupported: '{{modelName}} 模型正在使用此额度。', + modelNotSupported: '{{modelName}} 模型未安装。', }, item: { deleteDesc: '{{modelName}} 被用作系统推理模型。删除后部分功能将无法使用。请确认。', @@ -460,12 +462,12 @@ const translation = { featureSupported: '支持 {{feature}} 功能', callTimes: '调用次数', credits: '消息额度', + resetDate: '于 {{date}} 重置', buyQuota: '购买额度', getFreeTokens: '获得免费 Tokens', priorityUsing: '优先使用', deprecated: '已弃用', confirmDelete: '确认删除?', - quotaTip: '剩余免费额度', loadPresets: '加载预设', parameters: '参数', loadBalancing: '负载均衡', diff --git a/web/models/common.ts b/web/models/common.ts index 92aa263717..8a99cfd4e9 100644 --- a/web/models/common.ts +++ b/web/models/common.ts @@ -142,6 +142,9 @@ export type IWorkspace = { export type ICurrentWorkspace = Omit & { role: 'owner' | 'admin' | 'editor' | 'dataset_operator' | 'normal' providers: Provider[] + trial_credits: number + trial_credits_used: number + next_credit_reset_date: number trial_end_reason?: string custom_config?: { remove_webapp_brand?: boolean From 8b9a9d05742caefb19b8edac57d98995d36babaa Mon Sep 17 00:00:00 2001 From: CodingOnStar Date: Sat, 11 Oct 2025 17:39:37 +0800 Subject: [PATCH 2/5] feat: integrate loading state in QuotaPanel and update ModelProviderPage to handle workspace validation --- .../account-setting/model-provider-page/index.tsx | 11 +++++++++-- .../provider-added-card/quota-panel.tsx | 11 +++++++++++ web/context/app-context.tsx | 5 ++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/web/app/components/header/account-setting/model-provider-page/index.tsx b/web/app/components/header/account-setting/model-provider-page/index.tsx index 98de1203b1..583ee5ba33 100644 --- a/web/app/components/header/account-setting/model-provider-page/index.tsx +++ b/web/app/components/header/account-setting/model-provider-page/index.tsx @@ -1,4 +1,4 @@ -import { useMemo } from 'react' +import { useEffect, useMemo } from 'react' import { useTranslation } from 'react-i18next' import { useDebounce } from 'ahooks' import { @@ -22,6 +22,7 @@ import { useProviderContext } from '@/context/provider-context' import cn from '@/utils/classnames' import { useGlobalPublicStore } from '@/context/global-public-context' import QuotaPanel from './provider-added-card/quota-panel' +import { useAppContext } from '@/context/app-context' type Props = { searchText: string @@ -32,6 +33,7 @@ const FixedModelProvider = ['langgenius/openai/openai', 'langgenius/anthropic/an const ModelProviderPage = ({ searchText }: Props) => { const debouncedSearchText = useDebounce(searchText, { wait: 500 }) const { t } = useTranslation() + const { mutateCurrentWorkspace, isValidatingCurrentWorkspace } = useAppContext() const { data: textGenerationDefaultModel } = useDefaultModel(ModelTypeEnum.textGeneration) const { data: embeddingsDefaultModel } = useDefaultModel(ModelTypeEnum.textEmbedding) const { data: rerankDefaultModel } = useDefaultModel(ModelTypeEnum.rerank) @@ -40,6 +42,7 @@ const ModelProviderPage = ({ searchText }: Props) => { const { modelProviders: providers } = useProviderContext() const { enable_marketplace } = useGlobalPublicStore(s => s.systemFeatures) const defaultModelNotConfigured = !textGenerationDefaultModel && !embeddingsDefaultModel && !speech2textDefaultModel && !rerankDefaultModel && !ttsDefaultModel + const [configuredProviders, notConfiguredProviders] = useMemo(() => { const configuredProviders: ModelProvider[] = [] const notConfiguredProviders: ModelProvider[] = [] @@ -82,6 +85,10 @@ const ModelProviderPage = ({ searchText }: Props) => { return [filteredConfiguredProviders, filteredNotConfiguredProviders] }, [configuredProviders, debouncedSearchText, notConfiguredProviders]) + useEffect(() => { + mutateCurrentWorkspace() + }, [mutateCurrentWorkspace]) + return (
@@ -107,7 +114,7 @@ const ModelProviderPage = ({ searchText }: Props) => { />
- + {!filteredConfiguredProviders?.length && (
diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx index d5734c5acc..b9143578d1 100644 --- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx +++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx @@ -12,6 +12,7 @@ import InstallFromMarketplace from '@/app/components/plugins/install-plugin/inst import { useMarketplaceAllPlugins } from '../hooks' import { useBoolean } from 'ahooks' import useTimestamp from '@/hooks/use-timestamp' +import Loading from '@/app/components/base/loading' const allProviders = [ { key: ModelProviderQuotaGetPaid.OPENAI, Icon: OpenaiSmall }, @@ -33,9 +34,11 @@ const providerKeyToPluginId: Record = { type QuotaPanelProps = { providers: ModelProvider[] + isLoading?: boolean } const QuotaPanel: FC = ({ providers, + isLoading = false, }) => { const { t } = useTranslation() const { currentWorkspace } = useAppContext() @@ -74,6 +77,14 @@ const QuotaPanel: FC = ({ } } }, [providers, isShowInstallModal, hideInstallFromMarketplace]) + console.log('isLoading', isLoading) + if (isLoading) { + return ( +
+ +
+ ) + } return (
diff --git a/web/context/app-context.tsx b/web/context/app-context.tsx index 210ef273da..5f5f18499b 100644 --- a/web/context/app-context.tsx +++ b/web/context/app-context.tsx @@ -23,6 +23,7 @@ export type AppContextValue = { langGeniusVersionInfo: LangGeniusVersionResponse useSelector: typeof useSelector isLoadingCurrentWorkspace: boolean + isValidatingCurrentWorkspace: boolean } const userProfilePlaceholder = { @@ -69,6 +70,7 @@ const AppContext = createContext({ langGeniusVersionInfo: initialLangGeniusVersionInfo, useSelector, isLoadingCurrentWorkspace: false, + isValidatingCurrentWorkspace: false, }) export function useSelector(selector: (value: AppContextValue) => T): T { @@ -81,7 +83,7 @@ export type AppContextProviderProps = { export const AppContextProvider: FC = ({ children }) => { const { data: userProfileResponse, mutate: mutateUserProfile, error: userProfileError } = useSWR({ url: '/account/profile', params: {} }, fetchUserProfile) - const { data: currentWorkspaceResponse, mutate: mutateCurrentWorkspace, isLoading: isLoadingCurrentWorkspace } = useSWR({ url: '/workspaces/current', params: {} }, fetchCurrentWorkspace) + const { data: currentWorkspaceResponse, mutate: mutateCurrentWorkspace, isLoading: isLoadingCurrentWorkspace, isValidating: isValidatingCurrentWorkspace } = useSWR({ url: '/workspaces/current', params: {} }, fetchCurrentWorkspace) const [userProfile, setUserProfile] = useState(userProfilePlaceholder) const [langGeniusVersionInfo, setLangGeniusVersionInfo] = useState(initialLangGeniusVersionInfo) @@ -171,6 +173,7 @@ export const AppContextProvider: FC = ({ children }) => isCurrentWorkspaceDatasetOperator, mutateCurrentWorkspace, isLoadingCurrentWorkspace, + isValidatingCurrentWorkspace, }}>
{globalThis.document?.body?.getAttribute('data-public-maintenance-notice') && } From dac13ae604a065c66ff17673dc7b599675c112a2 Mon Sep 17 00:00:00 2001 From: CodingOnStar Date: Wed, 15 Oct 2025 10:16:51 +0800 Subject: [PATCH 3/5] fix: remove unnecessary console log and add rounded corners to Icon in QuotaPanel --- .../model-provider-page/provider-added-card/quota-panel.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx index b9143578d1..5898c08903 100644 --- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx +++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx @@ -77,7 +77,7 @@ const QuotaPanel: FC = ({ } } }, [providers, isShowInstallModal, hideInstallFromMarketplace]) - console.log('isLoading', isLoading) + if (isLoading) { return (
@@ -119,7 +119,7 @@ const QuotaPanel: FC = ({ className={cn('relative h-6 w-6', !isAvailable && 'cursor-pointer hover:opacity-80')} onClick={() => handleIconClick(key, isAvailable)} > - + {!isAvailable && (
)} From b033002d9f6fb90f2785f829fc2b94123d419afc Mon Sep 17 00:00:00 2001 From: CodingOnStar Date: Thu, 25 Dec 2025 11:15:53 +0800 Subject: [PATCH 4/5] add TONGYI icon --- .../base/icons/assets/public/llm/Tongyi.svg | 17 +++ .../base/icons/src/public/llm/Tongyi.json | 128 ++++++++++++++++++ .../base/icons/src/public/llm/Tongyi.tsx | 20 +++ .../base/icons/src/public/llm/index.ts | 1 + .../src/public/tracing/DatabricksIcon.tsx | 2 +- .../src/public/tracing/DatabricksIconBig.tsx | 2 +- .../icons/src/public/tracing/MlflowIcon.tsx | 2 +- .../src/public/tracing/MlflowIconBig.tsx | 2 +- .../icons/src/public/tracing/TencentIcon.json | 6 +- .../src/public/tracing/TencentIconBig.json | 10 +- 10 files changed, 180 insertions(+), 10 deletions(-) create mode 100644 web/app/components/base/icons/assets/public/llm/Tongyi.svg create mode 100644 web/app/components/base/icons/src/public/llm/Tongyi.json create mode 100644 web/app/components/base/icons/src/public/llm/Tongyi.tsx diff --git a/web/app/components/base/icons/assets/public/llm/Tongyi.svg b/web/app/components/base/icons/assets/public/llm/Tongyi.svg new file mode 100644 index 0000000000..cca23b3aae --- /dev/null +++ b/web/app/components/base/icons/assets/public/llm/Tongyi.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/web/app/components/base/icons/src/public/llm/Tongyi.json b/web/app/components/base/icons/src/public/llm/Tongyi.json new file mode 100644 index 0000000000..9150ca226b --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/Tongyi.json @@ -0,0 +1,128 @@ +{ + "icon": { + "type": "element", + "isRootNode": true, + "name": "svg", + "attributes": { + "width": "25", + "height": "25", + "viewBox": "0 0 25 25", + "fill": "none", + "xmlns": "http://www.w3.org/2000/svg", + "xmlns:xlink": "http://www.w3.org/1999/xlink" + }, + "children": [ + { + "type": "element", + "name": "g", + "attributes": { + "clip-path": "url(#clip0_6305_73327)" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M0.5 12.5C0.5 8.77247 0.5 6.9087 1.10896 5.43853C1.92092 3.47831 3.47831 1.92092 5.43853 1.10896C6.9087 0.5 8.77247 0.5 12.5 0.5C16.2275 0.5 18.0913 0.5 19.5615 1.10896C21.5217 1.92092 23.0791 3.47831 23.891 5.43853C24.5 6.9087 24.5 8.77247 24.5 12.5C24.5 16.2275 24.5 18.0913 23.891 19.5615C23.0791 21.5217 21.5217 23.0791 19.5615 23.891C18.0913 24.5 16.2275 24.5 12.5 24.5C8.77247 24.5 6.9087 24.5 5.43853 23.891C3.47831 23.0791 1.92092 21.5217 1.10896 19.5615C0.5 18.0913 0.5 16.2275 0.5 12.5Z", + "fill": "white" + }, + "children": [] + }, + { + "type": "element", + "name": "rect", + "attributes": { + "width": "24", + "height": "24", + "transform": "translate(0.5 0.5)", + "fill": "url(#pattern0_6305_73327)" + }, + "children": [] + }, + { + "type": "element", + "name": "rect", + "attributes": { + "width": "24", + "height": "24", + "transform": "translate(0.5 0.5)", + "fill": "white", + "fill-opacity": "0.01" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "path", + "attributes": { + "d": "M12.5 0.25C14.3603 0.25 15.7684 0.250313 16.8945 0.327148C18.0228 0.404144 18.8867 0.558755 19.6572 0.87793C21.6787 1.71525 23.2847 3.32133 24.1221 5.34277C24.4412 6.11333 24.5959 6.97723 24.6729 8.10547C24.7497 9.23161 24.75 10.6397 24.75 12.5C24.75 14.3603 24.7497 15.7684 24.6729 16.8945C24.5959 18.0228 24.4412 18.8867 24.1221 19.6572C23.2847 21.6787 21.6787 23.2847 19.6572 24.1221C18.8867 24.4412 18.0228 24.5959 16.8945 24.6729C15.7684 24.7497 14.3603 24.75 12.5 24.75C10.6397 24.75 9.23161 24.7497 8.10547 24.6729C6.97723 24.5959 6.11333 24.4412 5.34277 24.1221C3.32133 23.2847 1.71525 21.6787 0.87793 19.6572C0.558755 18.8867 0.404144 18.0228 0.327148 16.8945C0.250313 15.7684 0.25 14.3603 0.25 12.5C0.25 10.6397 0.250313 9.23161 0.327148 8.10547C0.404144 6.97723 0.558755 6.11333 0.87793 5.34277C1.71525 3.32133 3.32133 1.71525 5.34277 0.87793C6.11333 0.558755 6.97723 0.404144 8.10547 0.327148C9.23161 0.250313 10.6397 0.25 12.5 0.25Z", + "stroke": "#101828", + "stroke-opacity": "0.08", + "stroke-width": "0.5" + }, + "children": [] + }, + { + "type": "element", + "name": "defs", + "attributes": {}, + "children": [ + { + "type": "element", + "name": "pattern", + "attributes": { + "id": "pattern0_6305_73327", + "patternContentUnits": "objectBoundingBox", + "width": "1", + "height": "1" + }, + "children": [ + { + "type": "element", + "name": "use", + "attributes": { + "xlink:href": "#image0_6305_73327", + "transform": "scale(0.00625)" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "clipPath", + "attributes": { + "id": "clip0_6305_73327" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "d": "M0.5 12.5C0.5 8.77247 0.5 6.9087 1.10896 5.43853C1.92092 3.47831 3.47831 1.92092 5.43853 1.10896C6.9087 0.5 8.77247 0.5 12.5 0.5C16.2275 0.5 18.0913 0.5 19.5615 1.10896C21.5217 1.92092 23.0791 3.47831 23.891 5.43853C24.5 6.9087 24.5 8.77247 24.5 12.5C24.5 16.2275 24.5 18.0913 23.891 19.5615C23.0791 21.5217 21.5217 23.0791 19.5615 23.891C18.0913 24.5 16.2275 24.5 12.5 24.5C8.77247 24.5 6.9087 24.5 5.43853 23.891C3.47831 23.0791 1.92092 21.5217 1.10896 19.5615C0.5 18.0913 0.5 16.2275 0.5 12.5Z", + "fill": "white" + }, + "children": [] + } + ] + }, + { + "type": "element", + "name": "image", + "attributes": { + "id": "image0_6305_73327", + "width": "160", + "height": "160", + "preserveAspectRatio": "none", + "xlink:href": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAACgCAYAAACLz2ctAAAACXBIWXMAACxLAAAsSwGlPZapAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAm6SURBVHgB7Z09jFVFGIZn/Wf9I5FSKIVSKYndErolVJJQQUKliRWFNhY2UGxFItUmUJFARZaOQGekA0poF8slUcFFRVnPu9cDw/HuPWdmvpnvu3PeJ9m4MQH23H3P/DzzzczCVoMjRInXHCGKMIBEFQaQqMIAElUYQKIKA0hUYQCJKgwgUYUBJKowgEQVBpCowgASVRhAogoDSFRhAIkqDCBRhQEkqjCARBUGkKjCABJVGECiCgNIVGEAiSpvuJGyubnlLq0+cQ/u/739fSyLiwvu8JF33PKxXY6EM9oW8Mrl393dO8+Swgfw59euPXU//finI+GMMoCPNp43gflr+3u0YBJcubzZhPG5I2GMMoA/nH/84vvjJxbd/gPpIxG0hDdvsBUMZXQBRFf5cP2f7e8Pff729tfysUUnwa0bf7iNDbaCIYwugNeb8VpLO3FAC4ggpoJW8GoztiTDGVUAEb62hULg9ux5+fjoiiXGg5jYYGZNhjGaAGLicbPpIs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bjWePwcmAojwhW5K/6qZeJQGLZcV7aLx/DkwdTTH0DGVhrVvx20WtIvWqkUOTD3FyQFdm8aBkhLaBRt8JLSL1XtOYjEVwCFaZl61y4Xzj50ES4qrFjkw9ySzKjI0tYuFaheN58+NuQC2WmYa1C51hQ+YbMunaRkN7YDqaWqXvJgM4DQto6EdsH+E2iUvZk9GQCt42xs7fXvmF6fB3oQja6ld+jH9VCcTuj4pYjcxUbsMY2GrwRkGv8gSpzR1weQBtYIAXfCZwLNl0GJLjP0QvhonHy3mA6jJhfNPmhZwEkJUvwydBEC7XFyN33/cgtn3uZXdrmbqHFgI4W9EH3q2DLVLGAzgDPyN6EM3MVG7hMEA9hByhQG1SzgMYA/+RvS+s2WoXcJhAAfgy+idtAy1SxwM4ED6rjBgtUscDOBA/PMBu2fLsNolHgYwAF/LtGfLULukwQAGME3LULukwZWQQBA8LLPhv+19GhKcbVY8xjT2a2ELGEhXy0gwJu3ShQGMAIFZFrpg+5NmcpPjeth5gV0wUYUtIFGFASSqMIBEFQaQqMIAElUYQKIKA0hUYQCJKgwgUYUBJKowgEQVBpCowgASVRhAogoDSFRhAIkqDCBRhQEkqjCARBUGkKjCABJVGECiCgNIVPkXGPWKHZj1nMYAAAAASUVORK5CYII=" + }, + "children": [] + } + ] + } + ] + }, + "name": "Tongyi" +} diff --git a/web/app/components/base/icons/src/public/llm/Tongyi.tsx b/web/app/components/base/icons/src/public/llm/Tongyi.tsx new file mode 100644 index 0000000000..9934dee856 --- /dev/null +++ b/web/app/components/base/icons/src/public/llm/Tongyi.tsx @@ -0,0 +1,20 @@ +// GENERATE BY script +// DON NOT EDIT IT MANUALLY + +import type { IconData } from '@/app/components/base/icons/IconBase' +import * as React from 'react' +import IconBase from '@/app/components/base/icons/IconBase' +import data from './Tongyi.json' + +const Icon = ( + { + ref, + ...props + }: React.SVGProps & { + ref?: React.RefObject> + }, +) => + +Icon.displayName = 'Tongyi' + +export default Icon diff --git a/web/app/components/base/icons/src/public/llm/index.ts b/web/app/components/base/icons/src/public/llm/index.ts index 52daafaeb5..0c5cef4a36 100644 --- a/web/app/components/base/icons/src/public/llm/index.ts +++ b/web/app/components/base/icons/src/public/llm/index.ts @@ -42,6 +42,7 @@ export { default as Openllm } from './Openllm' export { default as OpenllmText } from './OpenllmText' export { default as Replicate } from './Replicate' export { default as ReplicateText } from './ReplicateText' +export { default as Tongyi } from './Tongyi' export { default as XorbitsInference } from './XorbitsInference' export { default as XorbitsInferenceText } from './XorbitsInferenceText' export { default as Zhipuai } from './Zhipuai' diff --git a/web/app/components/base/icons/src/public/tracing/DatabricksIcon.tsx b/web/app/components/base/icons/src/public/tracing/DatabricksIcon.tsx index 87abe453ec..a1e45d8bdf 100644 --- a/web/app/components/base/icons/src/public/tracing/DatabricksIcon.tsx +++ b/web/app/components/base/icons/src/public/tracing/DatabricksIcon.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject> + ref?: React.RefObject> }, ) => diff --git a/web/app/components/base/icons/src/public/tracing/DatabricksIconBig.tsx b/web/app/components/base/icons/src/public/tracing/DatabricksIconBig.tsx index bebaa1b40e..ef21c05a23 100644 --- a/web/app/components/base/icons/src/public/tracing/DatabricksIconBig.tsx +++ b/web/app/components/base/icons/src/public/tracing/DatabricksIconBig.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject> + ref?: React.RefObject> }, ) => diff --git a/web/app/components/base/icons/src/public/tracing/MlflowIcon.tsx b/web/app/components/base/icons/src/public/tracing/MlflowIcon.tsx index 3c86ed61f4..09a31882c9 100644 --- a/web/app/components/base/icons/src/public/tracing/MlflowIcon.tsx +++ b/web/app/components/base/icons/src/public/tracing/MlflowIcon.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject> + ref?: React.RefObject> }, ) => diff --git a/web/app/components/base/icons/src/public/tracing/MlflowIconBig.tsx b/web/app/components/base/icons/src/public/tracing/MlflowIconBig.tsx index fbb288d46a..03fef44991 100644 --- a/web/app/components/base/icons/src/public/tracing/MlflowIconBig.tsx +++ b/web/app/components/base/icons/src/public/tracing/MlflowIconBig.tsx @@ -11,7 +11,7 @@ const Icon = ( ref, ...props }: React.SVGProps & { - ref?: React.RefObject> + ref?: React.RefObject> }, ) => diff --git a/web/app/components/base/icons/src/public/tracing/TencentIcon.json b/web/app/components/base/icons/src/public/tracing/TencentIcon.json index 642fa75a92..9fd54c0ce9 100644 --- a/web/app/components/base/icons/src/public/tracing/TencentIcon.json +++ b/web/app/components/base/icons/src/public/tracing/TencentIcon.json @@ -1,14 +1,16 @@ { "icon": { "type": "element", + "isRootNode": true, "name": "svg", "attributes": { "width": "80px", "height": "18px", "viewBox": "0 0 80 18", - "version": "1.1" + "version": "1.1", + "xmlns": "http://www.w3.org/2000/svg", + "xmlns:xlink": "http://www.w3.org/1999/xlink" }, - "isRootNode": true, "children": [ { "type": "element", diff --git a/web/app/components/base/icons/src/public/tracing/TencentIconBig.json b/web/app/components/base/icons/src/public/tracing/TencentIconBig.json index d0582e7f8d..9abd81455f 100644 --- a/web/app/components/base/icons/src/public/tracing/TencentIconBig.json +++ b/web/app/components/base/icons/src/public/tracing/TencentIconBig.json @@ -1,14 +1,16 @@ { "icon": { "type": "element", + "isRootNode": true, "name": "svg", "attributes": { - "width": "80px", - "height": "18px", + "width": "120px", + "height": "27px", "viewBox": "0 0 80 18", - "version": "1.1" + "version": "1.1", + "xmlns": "http://www.w3.org/2000/svg", + "xmlns:xlink": "http://www.w3.org/1999/xlink" }, - "isRootNode": true, "children": [ { "type": "element", From 9a5a06bb40cc4bbab3b1fc16a267b38c608b4e67 Mon Sep 17 00:00:00 2001 From: CodingOnStar Date: Thu, 25 Dec 2025 13:58:08 +0800 Subject: [PATCH 5/5] feat: add TONGYI model support and update related translations --- .../provider-added-card/quota-panel.tsx | 39 ++++++++++++------- .../model-provider-page/utils.ts | 6 ++- web/i18n/en-US/billing.ts | 2 +- web/i18n/en-US/common.ts | 3 +- web/i18n/ja-JP/billing.ts | 2 +- web/i18n/ja-JP/common.ts | 3 +- web/i18n/zh-Hans/billing.ts | 2 +- web/i18n/zh-Hans/common.ts | 3 +- 8 files changed, 39 insertions(+), 21 deletions(-) diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx index 106ab54901..90cf1f363c 100644 --- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx +++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/quota-panel.tsx @@ -2,9 +2,9 @@ import type { FC } from 'react' import type { ModelProvider } from '../declarations' import { useBoolean } from 'ahooks' import * as React from 'react' -import { useCallback, useEffect, useRef, useState } from 'react' +import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' -import { AnthropicShortLight, Deepseek, Gemini, Grok, OpenaiSmall } from '@/app/components/base/icons/src/public/llm' +import { AnthropicShortLight, Deepseek, Gemini, Grok, OpenaiSmall, Tongyi } from '@/app/components/base/icons/src/public/llm' import Loading from '@/app/components/base/loading' import Tooltip from '@/app/components/base/tooltip' import InstallFromMarketplace from '@/app/components/plugins/install-plugin/install-from-marketplace' @@ -12,6 +12,7 @@ import { useAppContext } from '@/context/app-context' import useTimestamp from '@/hooks/use-timestamp' import { cn } from '@/utils/classnames' import { formatNumber } from '@/utils/format' +import { PreferredProviderTypeEnum } from '../declarations' import { useMarketplaceAllPlugins } from '../hooks' import { modelNameMap, ModelProviderQuotaGetPaid } from '../utils' @@ -21,6 +22,7 @@ const allProviders = [ { key: ModelProviderQuotaGetPaid.GEMINI, Icon: Gemini }, { key: ModelProviderQuotaGetPaid.X, Icon: Grok }, { key: ModelProviderQuotaGetPaid.DEEPSEEK, Icon: Deepseek }, + { key: ModelProviderQuotaGetPaid.TONGYI, Icon: Tongyi }, ] as const // Map provider key to plugin ID @@ -31,6 +33,7 @@ const providerKeyToPluginId: Record = { [ModelProviderQuotaGetPaid.GEMINI]: 'langgenius/gemini', [ModelProviderQuotaGetPaid.X]: 'langgenius/x', [ModelProviderQuotaGetPaid.DEEPSEEK]: 'langgenius/deepseek', + [ModelProviderQuotaGetPaid.TONGYI]: 'langgenius/tongyi', } type QuotaPanelProps = { @@ -43,8 +46,10 @@ const QuotaPanel: FC = ({ }) => { const { t } = useTranslation() const { currentWorkspace } = useAppContext() - const credits = Math.max(currentWorkspace.trial_credits - currentWorkspace.trial_credits_used, 0) - const providerSet = new Set(providers.map(p => p.provider)) + const credits = Math.max(currentWorkspace.trial_credits - currentWorkspace.trial_credits_used || 0, 0) + const providerMap = useMemo(() => new Map( + providers.map(p => [p.provider, p.preferred_provider_type]), + ), [providers]) const { formatTime } = useTimestamp() const { plugins: allPlugins, @@ -56,8 +61,9 @@ const QuotaPanel: FC = ({ }] = useBoolean(false) const selectedPluginIdRef = useRef(null) - const handleIconClick = useCallback((key: string, isAvailable: boolean) => { - if (!isAvailable && allPlugins) { + const handleIconClick = useCallback((key: string) => { + const providerType = providerMap.get(key) + if (!providerType && allPlugins) { const pluginId = providerKeyToPluginId[key] const plugin = allPlugins.find(p => p.plugin_id === pluginId) if (plugin) { @@ -66,9 +72,8 @@ const QuotaPanel: FC = ({ showInstallFromMarketplace() } } - }, [allPlugins, showInstallFromMarketplace]) + }, [allPlugins, providerMap, showInstallFromMarketplace]) - // Listen to providers changes and auto-close modal if installation succeeds useEffect(() => { if (isShowInstallModal && selectedPluginIdRef.current) { const isInstalled = providers.some(p => p.provider.startsWith(selectedPluginIdRef.current!)) @@ -113,18 +118,26 @@ const QuotaPanel: FC = ({
{allProviders.map(({ key, Icon }) => { - const isAvailable = providerSet.has(key) + const providerType = providerMap.get(key) + const usingQuota = providerType === PreferredProviderTypeEnum.system + const getTooltipKey = () => { + if (usingQuota) + return 'common.modelProvider.card.modelSupported' + if (providerType === PreferredProviderTypeEnum.custom) + return 'common.modelProvider.card.modelAPI' + return 'common.modelProvider.card.modelNotSupported' + } return (
handleIconClick(key, isAvailable)} + className={cn('relative h-6 w-6', !providerType && 'cursor-pointer hover:opacity-80')} + onClick={() => handleIconClick(key)} > - {!isAvailable && ( + {!usingQuota && (
)}
diff --git a/web/app/components/header/account-setting/model-provider-page/utils.ts b/web/app/components/header/account-setting/model-provider-page/utils.ts index c81c90aa24..d958f3eef3 100644 --- a/web/app/components/header/account-setting/model-provider-page/utils.ts +++ b/web/app/components/header/account-setting/model-provider-page/utils.ts @@ -24,15 +24,17 @@ export enum ModelProviderQuotaGetPaid { GEMINI = 'langgenius/gemini/google', X = 'langgenius/x/x', DEEPSEEK = 'langgenius/deepseek/deepseek', + TONGYI = 'langgenius/tongyi/tongyi', } -export const MODEL_PROVIDER_QUOTA_GET_PAID = [ModelProviderQuotaGetPaid.ANTHROPIC, ModelProviderQuotaGetPaid.OPENAI, ModelProviderQuotaGetPaid.GEMINI, ModelProviderQuotaGetPaid.X, ModelProviderQuotaGetPaid.DEEPSEEK] +export const MODEL_PROVIDER_QUOTA_GET_PAID = [ModelProviderQuotaGetPaid.ANTHROPIC, ModelProviderQuotaGetPaid.OPENAI, ModelProviderQuotaGetPaid.GEMINI, ModelProviderQuotaGetPaid.X, ModelProviderQuotaGetPaid.DEEPSEEK, ModelProviderQuotaGetPaid.TONGYI] export const modelNameMap = { [ModelProviderQuotaGetPaid.OPENAI]: 'OpenAI', [ModelProviderQuotaGetPaid.ANTHROPIC]: 'Anthropic', [ModelProviderQuotaGetPaid.GEMINI]: 'Gemini', - [ModelProviderQuotaGetPaid.X]: 'Grok', + [ModelProviderQuotaGetPaid.X]: 'xAI', [ModelProviderQuotaGetPaid.DEEPSEEK]: 'DeepSeek', + [ModelProviderQuotaGetPaid.TONGYI]: 'TONGYI', } export const isNullOrUndefined = (value: any) => { diff --git a/web/i18n/en-US/billing.ts b/web/i18n/en-US/billing.ts index f1975a8f79..3a18eebb4e 100644 --- a/web/i18n/en-US/billing.ts +++ b/web/i18n/en-US/billing.ts @@ -130,7 +130,7 @@ const translation = { messageRequest: { title: '{{count,number}} message credits', titlePerMonth: '{{count,number}} message credits/month', - tooltip: 'Message credits are provided to help you easily try out different models from OpenAI, Anthropic, Gemini, Grok, and DeepSeek in Dify. Credits are consumed based on the model type. Once they\'re used up, you can switch to your own API key.', + tooltip: 'Message credits are provided to help you easily try out different models from OpenAI, Anthropic, Gemini, Grok, DeepSeek and TONGYI in Dify. Credits are consumed based on the model type. Once they\'re used up, you can switch to your own API key.', }, annotatedResponse: { title: '{{count,number}} Annotation Quota Limits', diff --git a/web/i18n/en-US/common.ts b/web/i18n/en-US/common.ts index 520f5cd607..c3c6581047 100644 --- a/web/i18n/en-US/common.ts +++ b/web/i18n/en-US/common.ts @@ -462,8 +462,9 @@ const translation = { buyQuota: 'Buy Quota', priorityUse: 'Priority use', removeKey: 'Remove API Key', - tip: 'Message Credits supports models from OpenAI, Anthropic, Gemini, Grok, and DeepSeek. Priority will be given to the paid quota. The free quota will be used after the paid quota is exhausted.', + tip: 'Message Credits supports models from OpenAI, Anthropic, Gemini, Grok, DeepSeek and TONGYI. Priority will be given to the paid quota. The free quota will be used after the paid quota is exhausted.', modelSupported: '{{modelName}} models are using this quota.', + modelAPI: '{{modelName}} models are using the API Key.', modelNotSupported: '{{modelName}} models are not installed.', }, item: { diff --git a/web/i18n/ja-JP/billing.ts b/web/i18n/ja-JP/billing.ts index 775cf4c958..5dae80f40c 100644 --- a/web/i18n/ja-JP/billing.ts +++ b/web/i18n/ja-JP/billing.ts @@ -128,7 +128,7 @@ const translation = { messageRequest: { title: '{{count,number}}メッセージクレジット', titlePerMonth: '{{count,number}}メッセージクレジット/月', - tooltip: 'メッセージクレジットは、DifyでOpenAI、Anthropic、Gemini、Grok、DeepSeekなどのさまざまなモデルを簡単に試すために提供されています。クレジットはモデルの種類に基づいて消費されます。使い切ったら、独自のAPIキーに切り替えることができます。', + tooltip: 'メッセージクレジットは、DifyでOpenAI、Anthropic、Gemini、Grok、DeepSeek、TONGYIなどのさまざまなモデルを簡単に試すために提供されています。クレジットはモデルの種類に基づいて消費されます。使い切ったら、独自のAPIキーに切り替えることができます。', }, annotatedResponse: { title: '{{count,number}}の注釈クォータ制限', diff --git a/web/i18n/ja-JP/common.ts b/web/i18n/ja-JP/common.ts index 6e5a97a994..1669597d5c 100644 --- a/web/i18n/ja-JP/common.ts +++ b/web/i18n/ja-JP/common.ts @@ -451,8 +451,9 @@ const translation = { buyQuota: 'クォータを購入', priorityUse: '優先利用', removeKey: 'API キーを削除', - tip: 'メッセージ枠はOpen AI、Anthropic、Gemini、Grok、DeepSeekのモデルを使用することをサポートしています。無料枠は有料枠が使い果たされた後に消費されます。', + tip: 'メッセージ枠はOpen AI、Anthropic、Gemini、Grok、DeepSeek、TONGYIのモデルを使用することをサポートしています。無料枠は有料枠が使い果たされた後に消費されます。', modelSupported: 'このクォータは現在{{modelName}}に使用されでいます。', + modelAPI: '{{modelName}} は現在 APIキーを使用しています。', modelNotSupported: '{{modelName}} 未インストール。', }, item: { diff --git a/web/i18n/zh-Hans/billing.ts b/web/i18n/zh-Hans/billing.ts index d40fd231e1..dd69e7ae4a 100644 --- a/web/i18n/zh-Hans/billing.ts +++ b/web/i18n/zh-Hans/billing.ts @@ -129,7 +129,7 @@ const translation = { messageRequest: { title: '{{count,number}} 条消息额度', titlePerMonth: '{{count,number}} 条消息额度/月', - tooltip: '消息额度旨在帮助您便捷地试用 Dify 中来自 OpenAI、Anthropic、Gemini、Grok、DeepSeek 的模型的的不同模型。不同模型会消耗不同额度。额度用尽后,您可以切换为使用自己的 API 密钥。', + tooltip: '消息额度旨在帮助您便捷地试用 Dify 中来自 OpenAI、Anthropic、Gemini、Grok、DeepSeek、TONGYI 的模型的的不同模型。不同模型会消耗不同额度。额度用尽后,您可以切换为使用自己的 API 密钥。', }, annotatedResponse: { title: '{{count,number}} 个标注回复数', diff --git a/web/i18n/zh-Hans/common.ts b/web/i18n/zh-Hans/common.ts index 1475369132..70e33f45bc 100644 --- a/web/i18n/zh-Hans/common.ts +++ b/web/i18n/zh-Hans/common.ts @@ -454,8 +454,9 @@ const translation = { buyQuota: '购买额度', priorityUse: '优先使用', removeKey: '删除 API 密钥', - tip: '消息额度支持使用 OpenAI、Anthropic、Gemini、Grok、DeepSeek 的模型;免费额度会在付费额度用尽后才会消耗。', + tip: '消息额度支持使用 OpenAI、Anthropic、Gemini、Grok、DeepSeek、TONGYI 的模型;免费额度会在付费额度用尽后才会消耗。', modelSupported: '{{modelName}} 模型正在使用此额度。', + modelAPI: '{{modelName}} 模型正在使用 API Key。', modelNotSupported: '{{modelName}} 模型未安装。', }, item: {