-
Notifications
You must be signed in to change notification settings - Fork 253
Open
Description
bug at this line https://github.com/langchain-ai/langserve/blob/main/langserve/api_handler.py#L316
TypeError: issubclass() arg 1 must be a class
when I use APIHandler with different input schema runnable.
My model is
from pydantic import BaseModel
class A(BaseModel):
foo: list[str]
pydantic use V2.
Very simple to produce issue:
>>> from pydantic import BaseModel
>>> issubclass(list,BaseModel)
False
>>> issubclass(list[str],BaseModel)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../lib/python3.10/abc.py", line 123, in __subclasscheck__
return _abc_subclasscheck(cls, subclass)
TypeError: issubclass() arg 1 must be a class
Metadata
Metadata
Assignees
Labels
No labels