Revert "feat: support pinning, including, and excluding for Model Providers and Tools" (#7324)

This commit is contained in:
Xiyuan Chen
2024-08-15 11:51:00 -04:00
committed by GitHub
parent fcb6921b57
commit c7df6783df
8 changed files with 12 additions and 204 deletions

View File

@@ -406,7 +406,6 @@ class DataSetConfig(BaseSettings):
default=False,
)
class WorkspaceConfig(BaseSettings):
"""
Workspace configs
@@ -443,63 +442,6 @@ class CeleryBeatConfig(BaseSettings):
)
class PositionConfig(BaseSettings):
POSITION_PROVIDER_PINS: str = Field(
description='The heads of model providers',
default='',
)
POSITION_PROVIDER_INCLUDES: str = Field(
description='The included model providers',
default='',
)
POSITION_PROVIDER_EXCLUDES: str = Field(
description='The excluded model providers',
default='',
)
POSITION_TOOL_PINS: str = Field(
description='The heads of tools',
default='',
)
POSITION_TOOL_INCLUDES: str = Field(
description='The included tools',
default='',
)
POSITION_TOOL_EXCLUDES: str = Field(
description='The excluded tools',
default='',
)
@computed_field
def POSITION_PROVIDER_PINS_LIST(self) -> list[str]:
return [item.strip() for item in self.POSITION_PROVIDER_PINS.split(',') if item.strip() != '']
@computed_field
def POSITION_PROVIDER_INCLUDES_LIST(self) -> list[str]:
return [item.strip() for item in self.POSITION_PROVIDER_INCLUDES.split(',') if item.strip() != '']
@computed_field
def POSITION_PROVIDER_EXCLUDES_LIST(self) -> list[str]:
return [item.strip() for item in self.POSITION_PROVIDER_EXCLUDES.split(',') if item.strip() != '']
@computed_field
def POSITION_TOOL_PINS_LIST(self) -> list[str]:
return [item.strip() for item in self.POSITION_TOOL_PINS.split(',') if item.strip() != '']
@computed_field
def POSITION_TOOL_INCLUDES_LIST(self) -> list[str]:
return [item.strip() for item in self.POSITION_TOOL_INCLUDES.split(',') if item.strip() != '']
@computed_field
def POSITION_TOOL_EXCLUDES_LIST(self) -> list[str]:
return [item.strip() for item in self.POSITION_TOOL_EXCLUDES.split(',') if item.strip() != '']
class FeatureConfig(
# place the configs in alphabet order
AppExecutionConfig,
@@ -524,7 +466,6 @@ class FeatureConfig(
UpdateConfig,
WorkflowConfig,
WorkspaceConfig,
PositionConfig,
# hosted services config
HostedServiceConfig,