You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got an exception like this when run the server:
Traceback (most recent call last):
File "/workspace/llm/langserve/examples/chat_with_persistence/server.py", line 105, in
add_routes(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/langserve/server.py", line 443, in add_routes
api_handler = APIHandler(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/langserve/api_handler.py", line 671, in init
output_type_ = _resolve_model(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/langserve/api_handler.py", line 338, in resolve_model
hash = model.schema_json()
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/main.py", line 675, in schema_json
cls.schema(by_alias=by_alias, ref_template=ref_template), default=pydantic_encoder, **dumps_kwargs
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/main.py", line 664, in schema
s = model_schema(cls, by_alias=by_alias, ref_template=ref_template)
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 188, in model_schema
m_schema, m_definitions, nested_models = model_process_schema(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 581, in model_process_schema
m_schema, m_definitions, nested_models = model_type_schema(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 622, in model_type_schema
f_schema, f_definitions, f_nested_models = field_schema(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 255, in field_schema
f_schema, f_definitions, f_nested_models = field_type_schema(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 527, in field_type_schema
f_schema, f_definitions, f_nested_models = field_singleton_schema(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 926, in field_singleton_schema
if issubclass(field_type, BaseModel):
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/abc.py", line 123, in subclasscheck
return _abc_subclasscheck(cls, subclass)
TypeError: issubclass() arg 1 must be a class
My langchain versions is as follows:
langchain 0.2.16
langchain-anthropic 0.1.23
langchain-community 0.2.16
langchain-core 0.2.38
langchain-openai 0.1.23
langchain-text-splitters 0.2.4
langserve 0.2.3
The text was updated successfully, but these errors were encountered:
yingflower
changed the title
Failed to run langserve/examples/chat_with_persistence_and_user
Failed to run langserve/examples/chat_with_persistence
Sep 4, 2024
I got an exception like this when run the server:
Traceback (most recent call last):
File "/workspace/llm/langserve/examples/chat_with_persistence/server.py", line 105, in
add_routes(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/langserve/server.py", line 443, in add_routes
api_handler = APIHandler(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/langserve/api_handler.py", line 671, in init
output_type_ = _resolve_model(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/langserve/api_handler.py", line 338, in resolve_model
hash = model.schema_json()
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/main.py", line 675, in schema_json
cls.schema(by_alias=by_alias, ref_template=ref_template), default=pydantic_encoder, **dumps_kwargs
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/main.py", line 664, in schema
s = model_schema(cls, by_alias=by_alias, ref_template=ref_template)
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 188, in model_schema
m_schema, m_definitions, nested_models = model_process_schema(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 581, in model_process_schema
m_schema, m_definitions, nested_models = model_type_schema(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 622, in model_type_schema
f_schema, f_definitions, f_nested_models = field_schema(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 255, in field_schema
f_schema, f_definitions, f_nested_models = field_type_schema(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 527, in field_type_schema
f_schema, f_definitions, f_nested_models = field_singleton_schema(
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/site-packages/pydantic/v1/schema.py", line 926, in field_singleton_schema
if issubclass(field_type, BaseModel):
File "/home/feirong.zfr/anaconda3/envs/lc/lib/python3.10/abc.py", line 123, in subclasscheck
return _abc_subclasscheck(cls, subclass)
TypeError: issubclass() arg 1 must be a class
My langchain versions is as follows:
langchain 0.2.16
langchain-anthropic 0.1.23
langchain-community 0.2.16
langchain-core 0.2.38
langchain-openai 0.1.23
langchain-text-splitters 0.2.4
langserve 0.2.3
The text was updated successfully, but these errors were encountered: