Skip to content

Commit 797b18e

Browse files
[autofix.ci] apply automated fixes
1 parent 103ee19 commit 797b18e

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

api/core/provider_manager.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ def get_configurations(self, tenant_id: str) -> ProviderConfigurations:
157157

158158
# Get All provider model credentials
159159
provider_name_to_provider_model_credentials_dict = self._get_all_provider_model_credentials(
160-
session, tenant_id)
160+
session, tenant_id
161+
)
161162

162163
provider_configurations = ProviderConfigurations(tenant_id=tenant_id)
163164

@@ -199,11 +200,13 @@ def get_configurations(self, tenant_id: str) -> ProviderConfigurations:
199200

200201
# Get preferred provider type
201202
preferred_provider_type_record = provider_name_to_preferred_model_provider_records_dict.get(
202-
provider_name)
203+
provider_name
204+
)
203205

204206
if preferred_provider_type_record:
205207
preferred_provider_type = ProviderType.value_of(
206-
preferred_provider_type_record.preferred_provider_type)
208+
preferred_provider_type_record.preferred_provider_type
209+
)
207210
elif custom_configuration.provider or custom_configuration.models:
208211
preferred_provider_type = ProviderType.CUSTOM
209212
elif system_configuration.enabled:
@@ -421,8 +424,7 @@ def _get_all_providers(session: sa_orm.scoped_session[Any], tenant_id: str) -> d
421424
return provider_name_to_provider_records_dict
422425

423426
@staticmethod
424-
def _get_all_provider_models(
425-
session: sa_orm.scoped_session[Any], tenant_id: str) -> dict[str, list[ProviderModel]]:
427+
def _get_all_provider_models(session: sa_orm.scoped_session[Any], tenant_id: str) -> dict[str, list[ProviderModel]]:
426428
"""
427429
Get all provider model records of the workspace.
428430
@@ -438,7 +440,8 @@ def _get_all_provider_models(
438440

439441
@staticmethod
440442
def _get_all_preferred_model_providers(
441-
session: sa_orm.scoped_session[Any], tenant_id: str) -> dict[str, TenantPreferredModelProvider]:
443+
session: sa_orm.scoped_session[Any], tenant_id: str
444+
) -> dict[str, TenantPreferredModelProvider]:
442445
"""
443446
Get All preferred provider types of the workspace.
444447
@@ -456,7 +459,8 @@ def _get_all_preferred_model_providers(
456459

457460
@staticmethod
458461
def _get_all_provider_model_settings(
459-
session: sa_orm.scoped_session[Any], tenant_id: str) -> dict[str, list[ProviderModelSetting]]:
462+
session: sa_orm.scoped_session[Any], tenant_id: str
463+
) -> dict[str, list[ProviderModelSetting]]:
460464
"""
461465
Get All provider model settings of the workspace.
462466

0 commit comments

Comments
 (0)