Ver código fonte

Update the PerfXCloud provider model list,Update PerfXCloudProvider validate_provider_credentials method. (#8587)

Co-authored-by: xhb <466010723@qq.com>
Hongbin 10 meses atrás
pai
commit
5541248264
22 arquivos alterados com 520 adições e 24 exclusões
  1. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Llama3-Chinese_v2.yaml
  2. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Meta-Llama-3-70B-Instruct-GPTQ-Int4.yaml
  3. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Meta-Llama-3-8B-Instruct.yaml
  4. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Meta-Llama-3.1-405B-Instruct-AWQ-INT4.yaml
  5. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Qwen1.5-72B-Chat-GPTQ-Int4.yaml
  6. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Qwen1.5-7B.yaml
  7. 61 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2-72B-Instruct-AWQ-int4.yaml
  8. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2-72B-Instruct-GPTQ-Int4.yaml
  9. 63 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2-7B-Instruct.yaml
  10. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2-7B.yaml
  11. 61 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2.5-72B-Instruct.yaml
  12. 61 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2.5-7B-Instruct.yaml
  13. 61 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Reflection-Llama-3.1-70B.yaml
  14. 61 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Yi-1_5-9B-Chat-16K.yaml
  15. 61 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Yi-Coder-1.5B-Chat.yaml
  16. 61 0
      api/core/model_runtime/model_providers/perfxcloud/llm/Yi-Coder-9B-Chat.yaml
  17. 14 5
      api/core/model_runtime/model_providers/perfxcloud/llm/_position.yaml
  18. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/chatglm3-6b.yaml
  19. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/deepseek-v2-chat.yaml
  20. 1 0
      api/core/model_runtime/model_providers/perfxcloud/llm/deepseek-v2-lite-chat.yaml
  21. 1 19
      api/core/model_runtime/model_providers/perfxcloud/perfxcloud.py
  22. 4 0
      api/core/model_runtime/model_providers/perfxcloud/text_embedding/gte-Qwen2-7B-instruct.yaml

+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Llama3-Chinese_v2.yaml

@@ -59,3 +59,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Meta-Llama-3-70B-Instruct-GPTQ-Int4.yaml

@@ -59,3 +59,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Meta-Llama-3-8B-Instruct.yaml

@@ -59,3 +59,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Meta-Llama-3.1-405B-Instruct-AWQ-INT4.yaml

@@ -59,3 +59,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Qwen1.5-72B-Chat-GPTQ-Int4.yaml

@@ -59,3 +59,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Qwen1.5-7B.yaml

@@ -59,3 +59,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

Diferenças do arquivo suprimidas por serem muito extensas
+ 61 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2-72B-Instruct-AWQ-int4.yaml


+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2-72B-Instruct-GPTQ-Int4.yaml

@@ -61,3 +61,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

Diferenças do arquivo suprimidas por serem muito extensas
+ 63 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2-7B-Instruct.yaml


+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2-7B.yaml

@@ -61,3 +61,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

Diferenças do arquivo suprimidas por serem muito extensas
+ 61 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2.5-72B-Instruct.yaml


Diferenças do arquivo suprimidas por serem muito extensas
+ 61 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Qwen2.5-7B-Instruct.yaml


Diferenças do arquivo suprimidas por serem muito extensas
+ 61 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Reflection-Llama-3.1-70B.yaml


Diferenças do arquivo suprimidas por serem muito extensas
+ 61 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Yi-1_5-9B-Chat-16K.yaml


Diferenças do arquivo suprimidas por serem muito extensas
+ 61 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Yi-Coder-1.5B-Chat.yaml


Diferenças do arquivo suprimidas por serem muito extensas
+ 61 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/Yi-Coder-9B-Chat.yaml


+ 14 - 5
api/core/model_runtime/model_providers/perfxcloud/llm/_position.yaml

@@ -1,15 +1,24 @@
-- Meta-Llama-3.1-405B-Instruct-AWQ-INT4
+- Qwen2.5-72B-Instruct
+- Qwen2.5-7B-Instruct
+- Yi-Coder-1.5B-Chat
+- Yi-Coder-9B-Chat
+- Qwen2-72B-Instruct-AWQ-int4
+- Yi-1_5-9B-Chat-16K
+- Qwen2-7B-Instruct
+- Reflection-Llama-3.1-70B
+- Qwen2-72B-Instruct
 - Meta-Llama-3.1-8B-Instruct
+
+- Meta-Llama-3.1-405B-Instruct-AWQ-INT4
 - Meta-Llama-3-70B-Instruct-GPTQ-Int4
+- chatglm3-6b
 - Meta-Llama-3-8B-Instruct
+- Llama3-Chinese_v2
+- deepseek-v2-lite-chat
 - Qwen2-72B-Instruct-GPTQ-Int4
-- Qwen2-72B-Instruct
 - Qwen2-7B
 - Qwen-14B-Chat-Int4
 - Qwen1.5-72B-Chat-GPTQ-Int4
 - Qwen1.5-7B
 - Qwen1.5-110B-Chat-GPTQ-Int4
 - deepseek-v2-chat
-- deepseek-v2-lite-chat
-- Llama3-Chinese_v2
-- chatglm3-6b

+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/chatglm3-6b.yaml

@@ -59,3 +59,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/deepseek-v2-chat.yaml

@@ -59,3 +59,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

+ 1 - 0
api/core/model_runtime/model_providers/perfxcloud/llm/deepseek-v2-lite-chat.yaml

@@ -59,3 +59,4 @@ pricing:
   output: "0.000"
   unit: "0.000"
   currency: RMB
+deprecated: true

+ 1 - 19
api/core/model_runtime/model_providers/perfxcloud/perfxcloud.py

@@ -1,7 +1,5 @@
 import logging
 
-from core.model_runtime.entities.model_entities import ModelType
-from core.model_runtime.errors.validate import CredentialsValidateFailedError
 from core.model_runtime.model_providers.__base.model_provider import ModelProvider
 
 logger = logging.getLogger(__name__)
@@ -9,20 +7,4 @@ logger = logging.getLogger(__name__)
 
 class PerfXCloudProvider(ModelProvider):
     def validate_provider_credentials(self, credentials: dict) -> None:
-        """
-        Validate provider credentials
-        if validate failed, raise exception
-
-        :param credentials: provider credentials, credentials form defined in `provider_credential_schema`.
-        """
-        try:
-            model_instance = self.get_model_instance(ModelType.LLM)
-
-            # Use `Qwen2_72B_Chat_GPTQ_Int4` model for validate,
-            # no matter what model you pass in, text completion model or chat model
-            model_instance.validate_credentials(model="Qwen2-72B-Instruct-GPTQ-Int4", credentials=credentials)
-        except CredentialsValidateFailedError as ex:
-            raise ex
-        except Exception as ex:
-            logger.exception(f"{self.get_provider_schema().provider} credentials validate failed")
-            raise ex
+        pass

+ 4 - 0
api/core/model_runtime/model_providers/perfxcloud/text_embedding/gte-Qwen2-7B-instruct.yaml

@@ -0,0 +1,4 @@
+model: gte-Qwen2-7B-instruct
+model_type: text-embedding
+model_properties:
+  context_size: 2048