It will solve the TypeError caused by using typing.Literal in embedding.py because of the forward reference mechanism. Original Error screenshot is attached.
Solution
Creating a new class with enum.Enum for the literal value to bypass this error, as Literal cannot be subclassed and will cause the TypeError issue mentioned above. The modified parts were screenshots and attached below.
Description
It will solve the
TypeError
caused by usingtyping.Literal
inembedding.py
because of the forward reference mechanism. Original Error screenshot is attached.Solution
Creating a new class with
enum.Enum
for the literal value to bypass this error, asLiteral
cannot be subclassed and will cause theTypeError
issue mentioned above. The modified parts were screenshots and attached below.Example
Misc
(Links, notes, @people, etc.)
Inspired by this post