Преглед изворни кода

Feat/model provider novita (#6717)

Co-authored-by: takatost <takatost@gmail.com>
Jason пре 9 месеци
родитељ
комит
3d3677e912
19 измењених фајлова са 454 додато и 1 уклоњено
  1. 5 0
      api/core/model_runtime/model_providers/novita/llm/Nous-Hermes-2-Mixtral-8x7B-DPO.yaml
  2. 41 0
      api/core/model_runtime/model_providers/novita/llm/airoboros-l2-70b.yaml
  3. 41 0
      api/core/model_runtime/model_providers/novita/llm/dolphin-mixtral-8x22b.yaml
  4. 41 0
      api/core/model_runtime/model_providers/novita/llm/gemma-2-9b-it.yaml
  5. 41 0
      api/core/model_runtime/model_providers/novita/llm/hermes-2-pro-llama-3-8b.yaml
  6. 41 0
      api/core/model_runtime/model_providers/novita/llm/l3-70b-euryale-v2.1.yaml
  7. 5 0
      api/core/model_runtime/model_providers/novita/llm/llama-3-70b-instruct.yaml
  8. 5 0
      api/core/model_runtime/model_providers/novita/llm/llama-3-8b-instruct.yaml
  9. 41 0
      api/core/model_runtime/model_providers/novita/llm/llama-3.1-405b-instruct.yaml
  10. 41 0
      api/core/model_runtime/model_providers/novita/llm/llama-3.1-70b-instruct.yaml
  11. 41 0
      api/core/model_runtime/model_providers/novita/llm/llama-3.1-8b-instruct.yaml
  12. 5 0
      api/core/model_runtime/model_providers/novita/llm/lzlv_70b.yaml
  13. 41 0
      api/core/model_runtime/model_providers/novita/llm/midnight-rose-70b.yaml
  14. 41 0
      api/core/model_runtime/model_providers/novita/llm/mistral-7b-instruct.yaml
  15. 5 0
      api/core/model_runtime/model_providers/novita/llm/mythomax-l2-13b.yaml
  16. 5 0
      api/core/model_runtime/model_providers/novita/llm/nous-hermes-llama2-13b.yaml
  17. 5 0
      api/core/model_runtime/model_providers/novita/llm/openhermes-2.5-mistral-7b.yaml
  18. 5 0
      api/core/model_runtime/model_providers/novita/llm/wizardlm-2-8x22b.yaml
  19. 4 1
      api/core/model_runtime/model_providers/novita/novita.yaml

+ 5 - 0
api/core/model_runtime/model_providers/novita/llm/Nous-Hermes-2-Mixtral-8x7B-DPO.yaml

@@ -34,3 +34,8 @@ parameter_rules:
     min: -2
     max: 2
     default: 0
+pricing:
+  input: '0.0027'
+  output: '0.0027'
+  unit: '0.0001'
+  currency: USD

+ 41 - 0
api/core/model_runtime/model_providers/novita/llm/airoboros-l2-70b.yaml

@@ -0,0 +1,41 @@
+model: jondurbin/airoboros-l2-70b
+label:
+  zh_Hans: jondurbin/airoboros-l2-70b
+  en_US: jondurbin/airoboros-l2-70b
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 4096
+parameter_rules:
+  - name: temperature
+    use_template: temperature
+    min: 0
+    max: 2
+    default: 1
+  - name: top_p
+    use_template: top_p
+    min: 0
+    max: 1
+    default: 1
+  - name: max_tokens
+    use_template: max_tokens
+    min: 1
+    max: 2048
+    default: 512
+  - name: frequency_penalty
+    use_template: frequency_penalty
+    min: -2
+    max: 2
+    default: 0
+  - name: presence_penalty
+    use_template: presence_penalty
+    min: -2
+    max: 2
+    default: 0
+pricing:
+  input: '0.005'
+  output: '0.005'
+  unit: '0.0001'
+  currency: USD

+ 41 - 0
api/core/model_runtime/model_providers/novita/llm/dolphin-mixtral-8x22b.yaml

@@ -0,0 +1,41 @@
+model: cognitivecomputations/dolphin-mixtral-8x22b
+label:
+  zh_Hans: cognitivecomputations/dolphin-mixtral-8x22b
+  en_US: cognitivecomputations/dolphin-mixtral-8x22b
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 16000
+parameter_rules:
+  - name: temperature
+    use_template: temperature
+    min: 0
+    max: 2
+    default: 1
+  - name: top_p
+    use_template: top_p
+    min: 0
+    max: 1
+    default: 1
+  - name: max_tokens
+    use_template: max_tokens
+    min: 1
+    max: 2048
+    default: 512
+  - name: frequency_penalty
+    use_template: frequency_penalty
+    min: -2
+    max: 2
+    default: 0
+  - name: presence_penalty
+    use_template: presence_penalty
+    min: -2
+    max: 2
+    default: 0
+pricing:
+  input: '0.009'
+  output: '0.009'
+  unit: '0.0001'
+  currency: USD

+ 41 - 0
api/core/model_runtime/model_providers/novita/llm/gemma-2-9b-it.yaml

@@ -0,0 +1,41 @@
+model: google/gemma-2-9b-it
+label:
+  zh_Hans: google/gemma-2-9b-it
+  en_US: google/gemma-2-9b-it
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 8192
+parameter_rules:
+  - name: temperature
+    use_template: temperature
+    min: 0
+    max: 2
+    default: 1
+  - name: top_p
+    use_template: top_p
+    min: 0
+    max: 1
+    default: 1
+  - name: max_tokens
+    use_template: max_tokens
+    min: 1
+    max: 2048
+    default: 512
+  - name: frequency_penalty
+    use_template: frequency_penalty
+    min: -2
+    max: 2
+    default: 0
+  - name: presence_penalty
+    use_template: presence_penalty
+    min: -2
+    max: 2
+    default: 0
+pricing:
+  input: '0.0008'
+  output: '0.0008'
+  unit: '0.0001'
+  currency: USD

+ 41 - 0
api/core/model_runtime/model_providers/novita/llm/hermes-2-pro-llama-3-8b.yaml

@@ -0,0 +1,41 @@
+model: nousresearch/hermes-2-pro-llama-3-8b
+label:
+  zh_Hans: nousresearch/hermes-2-pro-llama-3-8b
+  en_US: nousresearch/hermes-2-pro-llama-3-8b
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 8192
+parameter_rules:
+  - name: temperature
+    use_template: temperature
+    min: 0
+    max: 2
+    default: 1
+  - name: top_p
+    use_template: top_p
+    min: 0
+    max: 1
+    default: 1
+  - name: max_tokens
+    use_template: max_tokens
+    min: 1
+    max: 2048
+    default: 512
+  - name: frequency_penalty
+    use_template: frequency_penalty
+    min: -2
+    max: 2
+    default: 0
+  - name: presence_penalty
+    use_template: presence_penalty
+    min: -2
+    max: 2
+    default: 0
+pricing:
+  input: '0.0014'
+  output: '0.0014'
+  unit: '0.0001'
+  currency: USD

+ 41 - 0
api/core/model_runtime/model_providers/novita/llm/l3-70b-euryale-v2.1.yaml

@@ -0,0 +1,41 @@
+model: sao10k/l3-70b-euryale-v2.1
+label:
+  zh_Hans: sao10k/l3-70b-euryale-v2.1
+  en_US: sao10k/l3-70b-euryale-v2.1
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 16000
+parameter_rules:
+  - name: temperature
+    use_template: temperature
+    min: 0
+    max: 2
+    default: 1
+  - name: top_p
+    use_template: top_p
+    min: 0
+    max: 1
+    default: 1
+  - name: max_tokens
+    use_template: max_tokens
+    min: 1
+    max: 2048
+    default: 512
+  - name: frequency_penalty
+    use_template: frequency_penalty
+    min: -2
+    max: 2
+    default: 0
+  - name: presence_penalty
+    use_template: presence_penalty
+    min: -2
+    max: 2
+    default: 0
+pricing:
+  input: '0.0148'
+  output: '0.0148'
+  unit: '0.0001'
+  currency: USD

+ 5 - 0
api/core/model_runtime/model_providers/novita/llm/llama-3-70b-instruct.yaml

@@ -34,3 +34,8 @@ parameter_rules:
     min: -2
     max: 2
     default: 0
+pricing:
+  input: '0.0051'
+  output: '0.0074'
+  unit: '0.0001'
+  currency: USD

+ 5 - 0
api/core/model_runtime/model_providers/novita/llm/llama-3-8b-instruct.yaml

@@ -34,3 +34,8 @@ parameter_rules:
     min: -2
     max: 2
     default: 0
+pricing:
+  input: '0.00063'
+  output: '0.00063'
+  unit: '0.0001'
+  currency: USD

+ 41 - 0
api/core/model_runtime/model_providers/novita/llm/llama-3.1-405b-instruct.yaml

@@ -0,0 +1,41 @@
+model: meta-llama/llama-3.1-405b-instruct
+label:
+  zh_Hans: meta-llama/llama-3.1-405b-instruct
+  en_US: meta-llama/llama-3.1-405b-instruct
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 32768
+parameter_rules:
+  - name: temperature
+    use_template: temperature
+    min: 0
+    max: 2
+    default: 1
+  - name: top_p
+    use_template: top_p
+    min: 0
+    max: 1
+    default: 1
+  - name: max_tokens
+    use_template: max_tokens
+    min: 1
+    max: 2048
+    default: 512
+  - name: frequency_penalty
+    use_template: frequency_penalty
+    min: -2
+    max: 2
+    default: 0
+  - name: presence_penalty
+    use_template: presence_penalty
+    min: -2
+    max: 2
+    default: 0
+pricing:
+  input: '0.03'
+  output: '0.05'
+  unit: '0.0001'
+  currency: USD

+ 41 - 0
api/core/model_runtime/model_providers/novita/llm/llama-3.1-70b-instruct.yaml

@@ -0,0 +1,41 @@
+model: meta-llama/llama-3.1-70b-instruct
+label:
+  zh_Hans: meta-llama/llama-3.1-70b-instruct
+  en_US: meta-llama/llama-3.1-70b-instruct
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 8192
+parameter_rules:
+  - name: temperature
+    use_template: temperature
+    min: 0
+    max: 2
+    default: 1
+  - name: top_p
+    use_template: top_p
+    min: 0
+    max: 1
+    default: 1
+  - name: max_tokens
+    use_template: max_tokens
+    min: 1
+    max: 2048
+    default: 512
+  - name: frequency_penalty
+    use_template: frequency_penalty
+    min: -2
+    max: 2
+    default: 0
+  - name: presence_penalty
+    use_template: presence_penalty
+    min: -2
+    max: 2
+    default: 0
+pricing:
+  input: '0.0055'
+  output: '0.0076'
+  unit: '0.0001'
+  currency: USD

+ 41 - 0
api/core/model_runtime/model_providers/novita/llm/llama-3.1-8b-instruct.yaml

@@ -0,0 +1,41 @@
+model: meta-llama/llama-3.1-8b-instruct
+label:
+  zh_Hans: meta-llama/llama-3.1-8b-instruct
+  en_US: meta-llama/llama-3.1-8b-instruct
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 8192
+parameter_rules:
+  - name: temperature
+    use_template: temperature
+    min: 0
+    max: 2
+    default: 1
+  - name: top_p
+    use_template: top_p
+    min: 0
+    max: 1
+    default: 1
+  - name: max_tokens
+    use_template: max_tokens
+    min: 1
+    max: 2048
+    default: 512
+  - name: frequency_penalty
+    use_template: frequency_penalty
+    min: -2
+    max: 2
+    default: 0
+  - name: presence_penalty
+    use_template: presence_penalty
+    min: -2
+    max: 2
+    default: 0
+pricing:
+  input: '0.001'
+  output: '0.001'
+  unit: '0.0001'
+  currency: USD

+ 5 - 0
api/core/model_runtime/model_providers/novita/llm/lzlv_70b.yaml

@@ -34,3 +34,8 @@ parameter_rules:
     min: -2
     max: 2
     default: 0
+pricing:
+  input: '0.0058'
+  output: '0.0078'
+  unit: '0.0001'
+  currency: USD

+ 41 - 0
api/core/model_runtime/model_providers/novita/llm/midnight-rose-70b.yaml

@@ -0,0 +1,41 @@
+model: sophosympatheia/midnight-rose-70b
+label:
+  zh_Hans: sophosympatheia/midnight-rose-70b
+  en_US: sophosympatheia/midnight-rose-70b
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 4096
+parameter_rules:
+  - name: temperature
+    use_template: temperature
+    min: 0
+    max: 2
+    default: 1
+  - name: top_p
+    use_template: top_p
+    min: 0
+    max: 1
+    default: 1
+  - name: max_tokens
+    use_template: max_tokens
+    min: 1
+    max: 2048
+    default: 512
+  - name: frequency_penalty
+    use_template: frequency_penalty
+    min: -2
+    max: 2
+    default: 0
+  - name: presence_penalty
+    use_template: presence_penalty
+    min: -2
+    max: 2
+    default: 0
+pricing:
+  input: '0.008'
+  output: '0.008'
+  unit: '0.0001'
+  currency: USD

+ 41 - 0
api/core/model_runtime/model_providers/novita/llm/mistral-7b-instruct.yaml

@@ -0,0 +1,41 @@
+model: mistralai/mistral-7b-instruct
+label:
+  zh_Hans: mistralai/mistral-7b-instruct
+  en_US: mistralai/mistral-7b-instruct
+model_type: llm
+features:
+  - agent-thought
+model_properties:
+  mode: chat
+  context_size: 32768
+parameter_rules:
+  - name: temperature
+    use_template: temperature
+    min: 0
+    max: 2
+    default: 1
+  - name: top_p
+    use_template: top_p
+    min: 0
+    max: 1
+    default: 1
+  - name: max_tokens
+    use_template: max_tokens
+    min: 1
+    max: 2048
+    default: 512
+  - name: frequency_penalty
+    use_template: frequency_penalty
+    min: -2
+    max: 2
+    default: 0
+  - name: presence_penalty
+    use_template: presence_penalty
+    min: -2
+    max: 2
+    default: 0
+pricing:
+  input: '0.00059'
+  output: '0.00059'
+  unit: '0.0001'
+  currency: USD

+ 5 - 0
api/core/model_runtime/model_providers/novita/llm/mythomax-l2-13b.yaml

@@ -34,3 +34,8 @@ parameter_rules:
     min: -2
     max: 2
     default: 0
+pricing:
+  input: '0.00119'
+  output: '0.00119'
+  unit: '0.0001'
+  currency: USD

+ 5 - 0
api/core/model_runtime/model_providers/novita/llm/nous-hermes-llama2-13b.yaml

@@ -34,3 +34,8 @@ parameter_rules:
     min: -2
     max: 2
     default: 0
+pricing:
+  input: '0.0017'
+  output: '0.0017'
+  unit: '0.0001'
+  currency: USD

+ 5 - 0
api/core/model_runtime/model_providers/novita/llm/openhermes-2.5-mistral-7b.yaml

@@ -34,3 +34,8 @@ parameter_rules:
     min: -2
     max: 2
     default: 0
+pricing:
+  input: '0.0017'
+  output: '0.0017'
+  unit: '0.0001'
+  currency: USD

+ 5 - 0
api/core/model_runtime/model_providers/novita/llm/wizardlm-2-8x22b.yaml

@@ -34,3 +34,8 @@ parameter_rules:
     min: -2
     max: 2
     default: 0
+pricing:
+  input: '0.0064'
+  output: '0.0064'
+  unit: '0.0001'
+  currency: USD

+ 4 - 1
api/core/model_runtime/model_providers/novita/novita.yaml

@@ -1,6 +1,9 @@
 provider: novita
 label:
   en_US: novita.ai
+description:
+  en_US: An LLM API that matches various application scenarios with high cost-effectiveness.
+  zh_Hans: 适配多种海外应用场景的高性价比 LLM API
 icon_small:
   en_US: icon_s_en.svg
 icon_large:
@@ -11,7 +14,7 @@ help:
     en_US: Get your API key from novita.ai
     zh_Hans: 从 novita.ai 获取 API Key
   url:
-    en_US: https://novita.ai/dashboard/key?utm_source=dify
+    en_US: https://novita.ai/settings#key-management?utm_source=dify&utm_medium=ch&utm_campaign=api
 supported_model_types:
   - llm
 configurate_methods: