Closed gubatron closed 1 year ago
hmm, now I'm wondering if you named it this way because that's how it might be coming from in JSON from openai... in any case it should be mappable.
yup, works now.
If the goal is to map fields identically to the openai api then I can understand if you don't accept this patch.
The comment is a documentation comment, so in most IDEs when you hover over the field it'll show that description. I don't think renaming it is really necessary. (Also, yeah, the API returns a name
field, that would be renamed with the #[serde(rename = "user_name")]
macro.)
name
is kind of ambiguous, might as well make the property name self-explanatory. Thanks for including the comment in the struct.Cheers