From 3d3677e9127a2a286fcba183858866a13b9ea3da Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 26 Jul 2024 17:37:21 +0800 Subject: [PATCH] Feat/model provider novita (#6717) Co-authored-by: takatost --- .../llm/Nous-Hermes-2-Mixtral-8x7B-DPO.yaml | 5 +++ .../novita/llm/airoboros-l2-70b.yaml | 41 +++++++++++++++++++ .../novita/llm/dolphin-mixtral-8x22b.yaml | 41 +++++++++++++++++++ .../novita/llm/gemma-2-9b-it.yaml | 41 +++++++++++++++++++ .../novita/llm/hermes-2-pro-llama-3-8b.yaml | 41 +++++++++++++++++++ .../novita/llm/l3-70b-euryale-v2.1.yaml | 41 +++++++++++++++++++ .../novita/llm/llama-3-70b-instruct.yaml | 5 +++ .../novita/llm/llama-3-8b-instruct.yaml | 5 +++ .../novita/llm/llama-3.1-405b-instruct.yaml | 41 +++++++++++++++++++ .../novita/llm/llama-3.1-70b-instruct.yaml | 41 +++++++++++++++++++ .../novita/llm/llama-3.1-8b-instruct.yaml | 41 +++++++++++++++++++ .../model_providers/novita/llm/lzlv_70b.yaml | 5 +++ .../novita/llm/midnight-rose-70b.yaml | 41 +++++++++++++++++++ .../novita/llm/mistral-7b-instruct.yaml | 41 +++++++++++++++++++ .../novita/llm/mythomax-l2-13b.yaml | 5 +++ .../novita/llm/nous-hermes-llama2-13b.yaml | 5 +++ .../novita/llm/openhermes-2.5-mistral-7b.yaml | 5 +++ .../novita/llm/wizardlm-2-8x22b.yaml | 5 +++ .../model_providers/novita/novita.yaml | 5 ++- 19 files changed, 454 insertions(+), 1 deletion(-) create mode 100644 api/core/model_runtime/model_providers/novita/llm/airoboros-l2-70b.yaml create mode 100644 api/core/model_runtime/model_providers/novita/llm/dolphin-mixtral-8x22b.yaml create mode 100644 api/core/model_runtime/model_providers/novita/llm/gemma-2-9b-it.yaml create mode 100644 api/core/model_runtime/model_providers/novita/llm/hermes-2-pro-llama-3-8b.yaml create mode 100644 api/core/model_runtime/model_providers/novita/llm/l3-70b-euryale-v2.1.yaml create mode 100644 api/core/model_runtime/model_providers/novita/llm/llama-3.1-405b-instruct.yaml create mode 100644 api/core/model_runtime/model_providers/novita/llm/llama-3.1-70b-instruct.yaml create mode 100644 api/core/model_runtime/model_providers/novita/llm/llama-3.1-8b-instruct.yaml create mode 100644 api/core/model_runtime/model_providers/novita/llm/midnight-rose-70b.yaml create mode 100644 api/core/model_runtime/model_providers/novita/llm/mistral-7b-instruct.yaml diff --git a/api/core/model_runtime/model_providers/novita/llm/Nous-Hermes-2-Mixtral-8x7B-DPO.yaml b/api/core/model_runtime/model_providers/novita/llm/Nous-Hermes-2-Mixtral-8x7B-DPO.yaml index 8b19316473f7e4..7ff30458e2ff0e 100644 --- a/api/core/model_runtime/model_providers/novita/llm/Nous-Hermes-2-Mixtral-8x7B-DPO.yaml +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/airoboros-l2-70b.yaml b/api/core/model_runtime/model_providers/novita/llm/airoboros-l2-70b.yaml new file mode 100644 index 00000000000000..b5994184613141 --- /dev/null +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/dolphin-mixtral-8x22b.yaml b/api/core/model_runtime/model_providers/novita/llm/dolphin-mixtral-8x22b.yaml new file mode 100644 index 00000000000000..72a181f5d37193 --- /dev/null +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/gemma-2-9b-it.yaml b/api/core/model_runtime/model_providers/novita/llm/gemma-2-9b-it.yaml new file mode 100644 index 00000000000000..d1749bc882bfea --- /dev/null +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/hermes-2-pro-llama-3-8b.yaml b/api/core/model_runtime/model_providers/novita/llm/hermes-2-pro-llama-3-8b.yaml new file mode 100644 index 00000000000000..8b3228e56a6726 --- /dev/null +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/l3-70b-euryale-v2.1.yaml b/api/core/model_runtime/model_providers/novita/llm/l3-70b-euryale-v2.1.yaml new file mode 100644 index 00000000000000..5e27941c529e8f --- /dev/null +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/llama-3-70b-instruct.yaml b/api/core/model_runtime/model_providers/novita/llm/llama-3-70b-instruct.yaml index 5298296de38aab..39709e10639b69 100644 --- a/api/core/model_runtime/model_providers/novita/llm/llama-3-70b-instruct.yaml +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/llama-3-8b-instruct.yaml b/api/core/model_runtime/model_providers/novita/llm/llama-3-8b-instruct.yaml index 45e62ee52aee45..9b5e5df4d071fe 100644 --- a/api/core/model_runtime/model_providers/novita/llm/llama-3-8b-instruct.yaml +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/llama-3.1-405b-instruct.yaml b/api/core/model_runtime/model_providers/novita/llm/llama-3.1-405b-instruct.yaml new file mode 100644 index 00000000000000..c5a45271ae94aa --- /dev/null +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/llama-3.1-70b-instruct.yaml b/api/core/model_runtime/model_providers/novita/llm/llama-3.1-70b-instruct.yaml new file mode 100644 index 00000000000000..3a5c29c40fd7c7 --- /dev/null +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/llama-3.1-8b-instruct.yaml b/api/core/model_runtime/model_providers/novita/llm/llama-3.1-8b-instruct.yaml new file mode 100644 index 00000000000000..e6ef772a3f0784 --- /dev/null +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/lzlv_70b.yaml b/api/core/model_runtime/model_providers/novita/llm/lzlv_70b.yaml index 0facc0c112b280..0cc68a8c45082d 100644 --- a/api/core/model_runtime/model_providers/novita/llm/lzlv_70b.yaml +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/midnight-rose-70b.yaml b/api/core/model_runtime/model_providers/novita/llm/midnight-rose-70b.yaml new file mode 100644 index 00000000000000..19876bee17ab4d --- /dev/null +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/mistral-7b-instruct.yaml b/api/core/model_runtime/model_providers/novita/llm/mistral-7b-instruct.yaml new file mode 100644 index 00000000000000..6fba47bcf09731 --- /dev/null +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/mythomax-l2-13b.yaml b/api/core/model_runtime/model_providers/novita/llm/mythomax-l2-13b.yaml index 28a8630ff290b0..7e4ac3ffe02d0f 100644 --- a/api/core/model_runtime/model_providers/novita/llm/mythomax-l2-13b.yaml +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/nous-hermes-llama2-13b.yaml b/api/core/model_runtime/model_providers/novita/llm/nous-hermes-llama2-13b.yaml index ce714a118b3937..75671c414c7424 100644 --- a/api/core/model_runtime/model_providers/novita/llm/nous-hermes-llama2-13b.yaml +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/openhermes-2.5-mistral-7b.yaml b/api/core/model_runtime/model_providers/novita/llm/openhermes-2.5-mistral-7b.yaml index 6cef39f8477824..8b0deba4f7889e 100644 --- a/api/core/model_runtime/model_providers/novita/llm/openhermes-2.5-mistral-7b.yaml +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/llm/wizardlm-2-8x22b.yaml b/api/core/model_runtime/model_providers/novita/llm/wizardlm-2-8x22b.yaml index b3e3a0369793d6..ef42568e8f627c 100644 --- a/api/core/model_runtime/model_providers/novita/llm/wizardlm-2-8x22b.yaml +++ b/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 diff --git a/api/core/model_runtime/model_providers/novita/novita.yaml b/api/core/model_runtime/model_providers/novita/novita.yaml index ef6a863569828d..f6341979891e65 100644 --- a/api/core/model_runtime/model_providers/novita/novita.yaml +++ b/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: