add deepseek-coder-v2 in siliconflow (#6149)
This commit is contained in:
parent
94d68b6a08
commit
3e18d32ce5
13 changed files with 165 additions and 24 deletions
|
|
@ -0,0 +1,21 @@
|
|||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from core.model_runtime.errors.validate import CredentialsValidateFailedError
|
||||
from core.model_runtime.model_providers.siliconflow.siliconflow import SiliconflowProvider
|
||||
|
||||
|
||||
def test_validate_provider_credentials():
|
||||
provider = SiliconflowProvider()
|
||||
|
||||
with pytest.raises(CredentialsValidateFailedError):
|
||||
provider.validate_provider_credentials(
|
||||
credentials={}
|
||||
)
|
||||
|
||||
provider.validate_provider_credentials(
|
||||
credentials={
|
||||
'api_key': os.environ.get('API_KEY')
|
||||
}
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue