Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run langserve/examples/chat_with_persistence #740

Closed
yingflower opened this issue Sep 4, 2024 · 1 comment
Closed

Failed to run langserve/examples/chat_with_persistence #740

yingflower opened this issue Sep 4, 2024 · 1 comment

Comments

@yingflower
Copy link

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

@yingflower 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
@eyurtsev
Copy link
Collaborator

duplicate of #742

@eyurtsev eyurtsev closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants