Open mhashas opened 1 month ago
Hi @mhashas sorry for not getting to this sooner. Could you please give a bit more details on how you image that integration? We're using pydantic dataclasses for our vllm engine integration here. I am not 100% what your proposal would mean. Do you mean we automatically serialize outside the handler if the return value is a pydantic dataclass?
🚀 The feature
It would be great for type-hints to be able to return pydantic models. It would just require a check in serializability, if instance pydantic model -> use pydantic function for serializing.
Motivation, pitch
Better type hints, cleaner code, solving hate in the world as we can all agree that pydantic data classes are vastly superior.
Alternatives
No response
Additional context
No response