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:
Jin Hai
2026-06-10 10:57:00 +08:00
committed by GitHub
parent 9d9c2dc92c
commit 7c1bd9a5a5
5 changed files with 147 additions and 11 deletions

View File

@@ -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