Fix linting
This commit is contained in:
@@ -1786,9 +1786,9 @@ def create_app(args):
|
|||||||
"created_at": ollama_server_infos.LIGHTRAG_CREATED_AT,
|
"created_at": ollama_server_infos.LIGHTRAG_CREATED_AT,
|
||||||
"error": {
|
"error": {
|
||||||
"code": "STREAM_CANCELLED",
|
"code": "STREAM_CANCELLED",
|
||||||
"message": "Stream was cancelled by server"
|
"message": "Stream was cancelled by server",
|
||||||
},
|
},
|
||||||
"done": False
|
"done": False,
|
||||||
}
|
}
|
||||||
yield f"{json.dumps(error_data, ensure_ascii=False)}\n"
|
yield f"{json.dumps(error_data, ensure_ascii=False)}\n"
|
||||||
raise
|
raise
|
||||||
@@ -1820,11 +1820,8 @@ def create_app(args):
|
|||||||
error_data = {
|
error_data = {
|
||||||
"model": ollama_server_infos.LIGHTRAG_MODEL,
|
"model": ollama_server_infos.LIGHTRAG_MODEL,
|
||||||
"created_at": ollama_server_infos.LIGHTRAG_CREATED_AT,
|
"created_at": ollama_server_infos.LIGHTRAG_CREATED_AT,
|
||||||
"error": {
|
"error": {"code": "STREAM_ERROR", "message": error_msg},
|
||||||
"code": "STREAM_ERROR",
|
"done": False,
|
||||||
"message": error_msg
|
|
||||||
},
|
|
||||||
"done": False
|
|
||||||
}
|
}
|
||||||
yield f"{json.dumps(error_data, ensure_ascii=False)}\n"
|
yield f"{json.dumps(error_data, ensure_ascii=False)}\n"
|
||||||
|
|
||||||
@@ -1832,7 +1829,7 @@ def create_app(args):
|
|||||||
final_data = {
|
final_data = {
|
||||||
"model": ollama_server_infos.LIGHTRAG_MODEL,
|
"model": ollama_server_infos.LIGHTRAG_MODEL,
|
||||||
"created_at": ollama_server_infos.LIGHTRAG_CREATED_AT,
|
"created_at": ollama_server_infos.LIGHTRAG_CREATED_AT,
|
||||||
"done": True
|
"done": True,
|
||||||
}
|
}
|
||||||
yield f"{json.dumps(final_data, ensure_ascii=False)}\n"
|
yield f"{json.dumps(final_data, ensure_ascii=False)}\n"
|
||||||
raise
|
raise
|
||||||
|
Reference in New Issue
Block a user