mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-15 05:04:27 +08:00
Go: implement provider: MinerU_Local (#15051)
### What problem does this PR solve? 1. Add model types when add model --- ``` RAGFlow(user)> add model 'pipeline' to provider 'mineru_local' instance 'test' with tokens 131072 doc_parse; SUCCESS ``` 2. implement provider: MinerU_Local --- **Verified from CLI** ``` RAGFlow(user)> parse with 'pipeline@test@mineru_local' file './internal/test.pdf' +--------------------------------------+ | task_id | +--------------------------------------+ | c7260e31-b6e2-4b36-955d-e9c60510c669 | +--------------------------------------+ RAGFlow(user)> show 'test@mineru_local' task 'c7260e31-b6e2-4b36-955d-e9c60510c669' +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+ | content | index | +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+ | # Repurposing Diffusion-Based Image Generators for Monocular Depth Estimation Bingxin Ke Anton Obukhov Shengyu Huang Nando Metzger Rodrigo Caye Daudt Konrad Schindler Photogrammetry and Remote Sensing, ETH Zurich ¨ 
This commit is contained in:
@@ -375,6 +375,8 @@ func (l *Lexer) lookupIdent(ident string) Token {
|
||||
return Token{Type: TokenDimension, Value: ident}
|
||||
case "OCR":
|
||||
return Token{Type: TokenOCR, Value: ident}
|
||||
case "DOC_PARSE":
|
||||
return Token{Type: TokenDocParse, Value: ident}
|
||||
case "ASYNC":
|
||||
return Token{Type: TokenAsync, Value: ident}
|
||||
case "SYNC":
|
||||
|
||||
@@ -102,6 +102,7 @@ const (
|
||||
TokenASR
|
||||
TokenTTS
|
||||
TokenOCR
|
||||
TokenDocParse
|
||||
TokenEmbed
|
||||
TokenText
|
||||
TokenQuery
|
||||
|
||||
@@ -862,6 +862,9 @@ func (p *Parser) parseAddModel() (*Command, error) {
|
||||
case TokenOCR:
|
||||
p.nextToken()
|
||||
modelTypes = append(modelTypes, "ocr")
|
||||
case TokenDocParse:
|
||||
p.nextToken()
|
||||
modelTypes = append(modelTypes, "doc_parse")
|
||||
case TokenTTS:
|
||||
p.nextToken()
|
||||
modelTypes = append(modelTypes, "tts")
|
||||
|
||||
Reference in New Issue
Block a user