from typing import TypedDict
class Movie(TypedDict):
str
name: int year:
36 Typing
36.1 TypedDict
= {'name': 'Blade Runner',
movie: Movie 'year': 1982}
def record_movie(movie: Movie) -> None: ...
'name': 'Blade Runner', 'year': 1982}) record_movie({
36.1.1 Example
class BaseGenerateResponse(TypedDict):
str
model: 'Model used to generate response.'
str
created_at: 'Time when the request was created.'
bool
done: 'True if response is complete, otherwise False. Useful for streaming to detect the final response.'