mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-28 11:48:10 +08:00
Go CLI: switch to admin/api server (#15861)
### What problem does this PR solve? ``` RAGFlow(api/default)> use admin SUCCESS RAGFlow(api/default)> use api 'abc'; SUCCESS ``` ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -1674,6 +1674,18 @@ func (p *Parser) parseAdminSaveCommand() (*Command, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Parser) parseAdminUseCommand() (*Command, error) {
|
||||
p.nextToken() // consume USE
|
||||
switch p.curToken.Type {
|
||||
case TokenAPI:
|
||||
return p.parseUseAPIServer()
|
||||
case TokenAdmin:
|
||||
return p.parseUseAdminServer()
|
||||
default:
|
||||
return nil, fmt.Errorf("expected MODEL or SKILL after USE")
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Parser) parseStartIngestion() (*Command, error) {
|
||||
p.nextToken() // consume Start
|
||||
|
||||
|
||||
Reference in New Issue
Block a user