Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore:update gpt-3.5-turbo and gpt-4-turbo parameter for azure (#4596)

呆萌闷油瓶e57bdd4e58ac
diff --git a/api/core/model_runtime/model_providers/azure_openai/_constant.py b/api/core/model_runtime/model_providers/azure_openai/_constant.py
index 707b199417e..63a0b5c8bec 100644
--- a/api/core/model_runtime/model_providers/azure_openai/_constant.py
+++ b/api/core/model_runtime/model_providers/azure_openai/_constant.py
@@ -49,7 +49,7 @@ LLM_BASE_MODELS = [
fetch_from=FetchFrom.CUSTOMIZABLE_MODEL,
model_properties={
ModelPropertyKey.MODE: LLMMode.CHAT.value,
- ModelPropertyKey.CONTEXT_SIZE: 4096,
+ ModelPropertyKey.CONTEXT_SIZE: 16385,
},
parameter_rules=[
ParameterRule(
@@ -68,11 +68,25 @@ LLM_BASE_MODELS = [
name='frequency_penalty',
**PARAMETER_RULE_TEMPLATE[DefaultParameterName.FREQUENCY_PENALTY],
),
- _get_max_tokens(default=512, min_val=1, max_val=4096)
+ _get_max_tokens(default=512, min_val=1, max_val=4096),
+ ParameterRule(
+ name='response_format',
+ label=I18nObject(
+ zh_Hans='回复格式',
+ en_US='response_format'
+ ),
+ type='string',
+ help=I18nObject(
+ zh_Hans='指定模型必须输出的格式',
+ en_US='specifying the format that the model must output'
+ ),
+ required=False,
+ options=['text', 'json_object']
+ ),
],
pricing=PriceConfig(
- input=0.001,
- output=0.002,
+ input=0.0005,
+ output=0.0015,
unit=0.001,
currency='USD',
)
@@ -703,8 +717,8 @@ LLM_BASE_MODELS = [
),
],
pricing=PriceConfig(
- input=0.001,
- output=0.003,
+ input=0.01,
+ output=0.03,
unit=0.001,
currency='USD',
)
@@ -779,8 +793,8 @@ LLM_BASE_MODELS = [
),
],
pricing=PriceConfig(
- input=0.001,
- output=0.003,
+ input=0.01,
+ output=0.03,
unit=0.001,
currency='USD',
)