sllm = llm.as_structured_llm(output_cls) index.as_query_engine(llm=sllm)
pydantic_core._pydantic_core.ValidationError: 1 validation error for StructuredLLM worker-1 | output_cls worker-1 | Input should be a subclass of BaseModel [type=is_subclass_of, input_value=<class 'models.MyCustomModel'>, input_type=ModelMetaclass]
from pydantic.v1 import BaseModel as BaseModelV1 from pydantic.v1 import Field as FieldV1 class MyCustomModel(BaseModelV1): test: str = FieldV1(..., description="Test")