Open berkecanrizai opened 3 months ago
If you have a schema that has an optional parameter, and you create a subclass of that schema, the optional parameter becomes non-optional.
Example:
class SummarizeQuerySchema(pw.Schema): text_list: list[str] model: str | None = pw.column_definition(default_value="gpt-3.5-turbo")
class SummarizeQuerySchemaAPI(SummarizeQuerySchema): openai_api_key: str
In this case, model that was optional becomes non-optional in the second schema.
model
I get an error message stating `model` is needed during runtime.
It should keep the initial behavior after inheriting.
0.8.2
No response
Linux
x86-64
Steps to reproduce
If you have a schema that has an optional parameter, and you create a subclass of that schema, the optional parameter becomes non-optional.
Example:
In this case,
model
that was optional becomes non-optional in the second schema.Relevant log output
What did you expect to happen?
It should keep the initial behavior after inheriting.
Version
0.8.2
Docker Versions (if used)
No response
OS
Linux
On which CPU architecture did you run Pathway?
x86-64