-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Confirm this is a feature request for the Python library and not the underlying OpenAI API.
- This is a feature request for the Python library
Describe the feature or improvement you're requesting
Hello,
I have been using library for some time now and lately started to update from 0.x to newest (1.7.x)
From the start we are using pydantic models for requests and responses handling, mostly due to being very type-safe but also because it works nicely with FastApi.
Let's take chat completion as example.
Right now you are creating different dictionary type for every role, then you have one common return type which is Union of these possible values.
Couldn't it be replaced by one pydantic model?
I am wondering why was there a choice to use TypedDict instead of pydantic models for requests objects?
Searched the issues/PRs but couldn't find anything.
Thanks in advance for response!
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels