mirror of https://github.com/hwchase17/langchain
Fix subclassing OpenAIEmbeddings (#4500)
# Fix subclassing OpenAIEmbeddings
Fixes #4498
## Before submitting
- Problem: Due to annotated type `Tuple[()]`.
- Fix: Change the annotated type to "Iterable[str]". Even though
tiktoken use
[Collection[str]](095924e02c/tiktoken/core.py (L80)
)
type annotation, but pydantic doesn't support Collection type, and
[Iterable](https://docs.pydantic.dev/latest/usage/types/#typing-iterables)
is the closest to Collection.
pull/4824/head
parent
08df80bed6
commit
49e4aaf673
Loading…
Reference in New Issue