chore: fix unnecessary string concatation in single line (#8311)
This commit is contained in:
parent
08c486452f
commit
6613b8f2e0
30 changed files with 46 additions and 49 deletions
|
|
@ -238,7 +238,7 @@ class AppDslService:
|
|||
:param use_icon_as_answer_icon: use app icon as answer icon
|
||||
"""
|
||||
if not workflow_data:
|
||||
raise ValueError("Missing workflow in data argument " "when app mode is advanced-chat or workflow")
|
||||
raise ValueError("Missing workflow in data argument when app mode is advanced-chat or workflow")
|
||||
|
||||
app = cls._create_app(
|
||||
tenant_id=tenant_id,
|
||||
|
|
@ -283,7 +283,7 @@ class AppDslService:
|
|||
:param account: Account instance
|
||||
"""
|
||||
if not workflow_data:
|
||||
raise ValueError("Missing workflow in data argument " "when app mode is advanced-chat or workflow")
|
||||
raise ValueError("Missing workflow in data argument when app mode is advanced-chat or workflow")
|
||||
|
||||
# fetch draft workflow by app_model
|
||||
workflow_service = WorkflowService()
|
||||
|
|
@ -337,7 +337,7 @@ class AppDslService:
|
|||
:param icon_background: app icon background
|
||||
"""
|
||||
if not model_config_data:
|
||||
raise ValueError("Missing model_config in data argument " "when app mode is chat, agent-chat or completion")
|
||||
raise ValueError("Missing model_config in data argument when app mode is chat, agent-chat or completion")
|
||||
|
||||
app = cls._create_app(
|
||||
tenant_id=tenant_id,
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ class DatasetService:
|
|||
"in the Settings -> Model Provider."
|
||||
)
|
||||
except ProviderTokenNotInitError as ex:
|
||||
raise ValueError(f"The dataset in unavailable, due to: " f"{ex.description}")
|
||||
raise ValueError(f"The dataset in unavailable, due to: {ex.description}")
|
||||
|
||||
@staticmethod
|
||||
def check_embedding_model_setting(tenant_id: str, embedding_model_provider: str, embedding_model: str):
|
||||
|
|
@ -195,10 +195,10 @@ class DatasetService:
|
|||
)
|
||||
except LLMBadRequestError:
|
||||
raise ValueError(
|
||||
"No Embedding Model available. Please configure a valid provider " "in the Settings -> Model Provider."
|
||||
"No Embedding Model available. Please configure a valid provider in the Settings -> Model Provider."
|
||||
)
|
||||
except ProviderTokenNotInitError as ex:
|
||||
raise ValueError(f"The dataset in unavailable, due to: " f"{ex.description}")
|
||||
raise ValueError(f"The dataset in unavailable, due to: {ex.description}")
|
||||
|
||||
@staticmethod
|
||||
def update_dataset(dataset_id, data, user):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue