feat: add mml from backend
This commit is contained in:
@@ -180,6 +180,7 @@ func (s *RecognitionService) GetFormualTask(ctx context.Context, taskNo string)
|
||||
Latex: taskRet.Latex,
|
||||
Markdown: markdown,
|
||||
MathML: taskRet.MathML,
|
||||
MML: taskRet.MML,
|
||||
Status: int(task.Status),
|
||||
}, nil
|
||||
}
|
||||
@@ -544,6 +545,7 @@ func (s *RecognitionService) processFormulaTask(ctx context.Context, taskID int6
|
||||
Latex: ocrResp.Latex,
|
||||
Markdown: ocrResp.Markdown,
|
||||
MathML: ocrResp.MathML,
|
||||
MML: ocrResp.MML,
|
||||
})
|
||||
if err != nil {
|
||||
log.Error(ctx, "func", "processFormulaTask", "msg", "保存任务结果失败", "error", err)
|
||||
|
||||
@@ -92,11 +92,13 @@ func (svc *TaskService) GetTaskList(ctx context.Context, req *task.TaskListReque
|
||||
var latex string
|
||||
var markdown string
|
||||
var mathML string
|
||||
var mml string
|
||||
recognitionResult := recognitionResultMap[item.ID]
|
||||
if recognitionResult != nil {
|
||||
latex = recognitionResult.Latex
|
||||
markdown = recognitionResult.Markdown
|
||||
mathML = recognitionResult.MathML
|
||||
mml = recognitionResult.MML
|
||||
}
|
||||
originURL, err := oss.GetDownloadURL(ctx, item.FileURL)
|
||||
if err != nil {
|
||||
@@ -106,6 +108,7 @@ func (svc *TaskService) GetTaskList(ctx context.Context, req *task.TaskListReque
|
||||
Latex: latex,
|
||||
Markdown: markdown,
|
||||
MathML: mathML,
|
||||
MML: mml,
|
||||
TaskID: item.TaskUUID,
|
||||
FileName: item.FileName,
|
||||
Status: int(item.Status),
|
||||
|
||||
Reference in New Issue
Block a user