Open ishaan-jaff opened 9 months ago
ideally those properties are in the code as models.
So you would have something like: messages: list[MessageModel], functions: list[FunctionModel]
And the MessageModel could look like:
class MessageModel(TypedDict): role: str content: str | None name: string | None function_call: FunctionCall | None
Is this completed? Is it just missing the py.typed
marker?
Nope - open to contributions on this @JamesHutchison
this contribution would be very appreciated @JamesHutchison
@ishaan-jaff could you have a look at the PR. Did you meant annotating with the TypedDict? I referenced the OpenAI spec to replicate the type check.
I find couple of existing issues that have similar objective, Improving code quality by adding type annotations.
I am interested to work on it. See https://github.com/BerriAI/litellm/pull/3291
please help here - this would be very useful @edwinjosegeorge
The Feature
Motivation, pitch
user request
Twitter / LinkedIn details
No response