Fix pipeline component schema

This commit is contained in:
Ines Montani 2020-07-10 20:32:53 +02:00
parent 9fe1fa88ad
commit 931250e1f5
1 changed files with 8 additions and 1 deletions

View File

@ -233,10 +233,17 @@ class ConfigSchemaNlpComponent(BaseModel):
arbitrary_types_allowed = True
class ConfigSchemaPipeline(BaseModel):
__root__: Dict[str, ConfigSchemaNlpComponent]
class Config:
extra = "allow"
class ConfigSchemaNlp(BaseModel):
lang: StrictStr = Field(..., title="The base language to use")
vectors: Optional[DirectoryPath] = Field(..., title="Path to vectors")
pipeline: Optional[Dict[str, ConfigSchemaNlpComponent]]
pipeline: Optional[ConfigSchemaPipeline]
class Config:
extra = "forbid"