docs(ops): salvage task docs and mineru gofmt in closeout batch

This commit is contained in:
weichen
2026-09-23 12:49:33 +00:00
parent e6ddfab9e8
commit 15b388fc86
4 changed files with 176 additions and 9 deletions
+9 -9
View File
@@ -29,8 +29,8 @@ type Client struct {
Language string
HTTP *http.Client
submitMu sync.Mutex
submitLog []time.Time
submitMu sync.Mutex
submitLog []time.Time
}
// Config wires Client from application settings.
@@ -200,9 +200,9 @@ func (c *Client) applyUploadURL(ctx context.Context, fileName string) (batchID,
"files": []map[string]any{
{"name": fileName},
},
"model_version": c.ModelVersion,
"language": c.Language,
"enable_table": true,
"model_version": c.ModelVersion,
"language": c.Language,
"enable_table": true,
"enable_formula": true,
}
raw, err := c.postJSON(ctx, c.Endpoint+"/api/v4/file-urls/batch", body)
@@ -266,10 +266,10 @@ func (c *Client) pollBatch(ctx context.Context, batchID, fileName string) (zipUR
var data struct {
BatchID string `json:"batch_id"`
ExtractResult []struct {
FileName string `json:"file_name"`
State string `json:"state"`
FullZipURL string `json:"full_zip_url"`
ErrMsg string `json:"err_msg"`
FileName string `json:"file_name"`
State string `json:"state"`
FullZipURL string `json:"full_zip_url"`
ErrMsg string `json:"err_msg"`
} `json:"extract_result"`
}
if err := json.Unmarshal(env.Data, &data); err != nil {