fix: udpate app_id

This commit is contained in:
2025-12-20 22:15:56 +08:00
parent 203c2b64c0
commit 08d5e37d0e
3 changed files with 11 additions and 8 deletions

View File

@@ -46,5 +46,5 @@ aliyun:
bucket_name: texpixel-doc
mathpix:
app_id: "576157025515297792"
app_id: "ocr_eede6f_ea9b5c"
app_key: "683f7133391a1039383161653531396234343536393263346632613437343332"

View File

@@ -46,5 +46,5 @@ aliyun:
mathpix:
app_id: "576157025515297792"
app_id: "ocr_eede6f_ea9b5c"
app_key: "fb72d251e33ac85c929bfd4eec40d78368d08d82fb2ee1cffb04a8bb967d1db5"

View File

@@ -236,13 +236,13 @@ type MathpixRequest struct {
// 输出格式列表text, data, html, latex_styled
Formats []string `json:"formats"`
// 数据选项
DataOptions *MathpixDataOptions `json:"data_options"`
DataOptions *MathpixDataOptions `json:"data_options,omitempty"`
// 返回检测到的字母表
IncludeDetectedAlphabets bool `json:"include_detected_alphabets"`
IncludeDetectedAlphabets *bool `json:"include_detected_alphabets,omitempty"`
// 允许的字母表
AlphabetsAllowed *MathpixAlphabetsAllowed `json:"alphabets_allowed"`
AlphabetsAllowed *MathpixAlphabetsAllowed `json:"alphabets_allowed,omitempty"`
// 指定图片区域
Region *MathpixRegion `json:"region"`
Region *MathpixRegion `json:"region,omitempty"`
// 蓝色HSV过滤模式
EnableBlueHsvFilter bool `json:"enable_blue_hsv_filter"`
// 置信度阈值
@@ -264,11 +264,11 @@ type MathpixRequest struct {
// 图表文本提取
IncludeDiagramText bool `json:"include_diagram_text"`
// 页面信息默认true
IncludePageInfo *bool `json:"include_page_info"`
IncludePageInfo *bool `json:"include_page_info,omitempty"`
// 自动旋转置信度阈值默认0.99
AutoRotateConfidenceThreshold float64 `json:"auto_rotate_confidence_threshold"`
// 移除多余空格默认true
RmSpaces *bool `json:"rm_spaces"`
RmSpaces *bool `json:"rm_spaces,omitempty"`
// 移除字体命令默认false
RmFonts bool `json:"rm_fonts"`
// 使用aligned/gathered/cases代替array默认false
@@ -719,6 +719,9 @@ func (s *RecognitionService) processMathpixTask(ctx context.Context, taskID int6
IncludeLatex: true,
IncludeTsv: true,
},
MathInlineDelimiters: []string{"$", "$"},
MathDisplayDelimiters: []string{"$$", "$$"},
RmSpaces: &[]bool{true}[0],
}
jsonData, err := json.Marshal(mathpixReq)