fix wrong syntax of type definitions (#1678)
This commit is contained in:
parent
8fbc374f31
commit
d3a2c0ed34
13 changed files with 29 additions and 29 deletions
|
|
@ -161,7 +161,7 @@ class ChatMessageApi(Resource):
|
|||
raise InternalServerError()
|
||||
|
||||
|
||||
def compact_response(response: Union[dict | Generator]) -> Response:
|
||||
def compact_response(response: Union[dict, Generator]) -> Response:
|
||||
if isinstance(response, dict):
|
||||
return Response(response=json.dumps(response), status=200, mimetype='application/json')
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ class MessageMoreLikeThisApi(Resource):
|
|||
raise InternalServerError()
|
||||
|
||||
|
||||
def compact_response(response: Union[dict | Generator]) -> Response:
|
||||
def compact_response(response: Union[dict, Generator]) -> Response:
|
||||
if isinstance(response, dict):
|
||||
return Response(response=json.dumps(response), status=200, mimetype='application/json')
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue