async-openai icon indicating copy to clipboard operation
async-openai copied to clipboard

Consider switching to typed-builder

Open kageiit opened this issue 7 months ago • 2 comments

derive_builder lets users create partially initialized models which results in lot more unnecessary boilerplate and needing to deal with errors that can be avoided during compile time instead (using the type state pattern)

typed-builder (https://crates.io/crates/typed-builder) does not allow building models unless all required properties are set

Moving to typed-builder would make the api less error-prone and more ergonomic to use. API compatibility with existing Args structs can also be maintained as a small wrapper layer if desired

kageiit avatar Apr 28 '25 09:04 kageiit