mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-02 19:27:48 +08:00
fix: Claude can not validate credientials (#8109)
This commit is contained in:
parent
d3658166fb
commit
ab7d79275e
@ -19,9 +19,9 @@ class AnthropicProvider(ModelProvider):
|
|||||||
try:
|
try:
|
||||||
model_instance = self.get_model_instance(ModelType.LLM)
|
model_instance = self.get_model_instance(ModelType.LLM)
|
||||||
|
|
||||||
# Use `claude-instant-1` model for validate,
|
# Use `claude-3-opus-20240229` model for validate,
|
||||||
model_instance.validate_credentials(
|
model_instance.validate_credentials(
|
||||||
model='claude-instant-1.2',
|
model='claude-3-opus-20240229',
|
||||||
credentials=credentials
|
credentials=credentials
|
||||||
)
|
)
|
||||||
except CredentialsValidateFailedError as ex:
|
except CredentialsValidateFailedError as ex:
|
||||||
|
@ -33,3 +33,4 @@ pricing:
|
|||||||
output: '5.51'
|
output: '5.51'
|
||||||
unit: '0.000001'
|
unit: '0.000001'
|
||||||
currency: USD
|
currency: USD
|
||||||
|
deprecated: true
|
||||||
|
Loading…
Reference in New Issue
Block a user