fix: use gpt-4o-mini for validating credentials (#9387)

This commit is contained in:
crazywoola 2024-10-16 10:18:06 +08:00 committed by GitHub
parent 568d5c46ed
commit 423df67042
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,9 +19,9 @@ class OpenAIProvider(ModelProvider):
try: try:
model_instance = self.get_model_instance(ModelType.LLM) model_instance = self.get_model_instance(ModelType.LLM)
# Use `gpt-3.5-turbo` model for validate, # Use `gpt-4o-mini` model for validate,
# no matter what model you pass in, text completion model or chat model # no matter what model you pass in, text completion model or chat model
model_instance.validate_credentials(model="gpt-3.5-turbo", credentials=credentials) model_instance.validate_credentials(model="gpt-4o-mini", credentials=credentials)
except CredentialsValidateFailedError as ex: except CredentialsValidateFailedError as ex:
raise ex raise ex
except Exception as ex: except Exception as ex: