在服务器上部署llava时,出现问题
pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'starlette.requests.Request'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.
pydantic与fastapi版本不兼容
修改pydantic版本没效果,llava需要pydantic为2.x版本
在github上找到了方法
https://github.com/jhj0517/Whisper-WebUI/issues/258
降级fastapi为0.112.4即可
pip install -U fastapi==0.112.4