Verba
Verba copied to clipboard
type object 'GeneratePayload' has no attribute 'model_validate_json'
Error:
✘ WebSocket Error: type object 'GeneratePayload' has no attribute
'model_validate_json'
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/output/Verba/goldenverba/server/api.py", line 597, in websocket_generate_stream
payload = GeneratePayload.model_validate_json(data)
AttributeError: type object 'GeneratePayload' has no attribute 'model_validate_json'
Solution:
# api.py
import json
# change the code in line 597
payload = GeneratePayload.parse_obj(json.loads(data))