Go CLI: fix key commands (#16306)

### What problem does this PR solve?

```
RAGFlow(api/default)> set key 'ragflow-JgnarFSCUiV99oOvvMDei7ZzZg1cVlqGd1AMHrHeKE4';
SUCCESS
RAGFlow(api/default)> unset key;
SUCCESS

RAGFlow(api/default)> list provider 'zhipu-ai' instances;

RAGFlow(api/default)> list providers;

RAGFlow(api/default)> list available providers;

RAGFlow(api/default)> list provider 'zhipu-ai' instance 'test' models;
```

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-06-24 18:48:09 +08:00
committed by GitHub
parent 9a91564194
commit 1fc02606ea
8 changed files with 202 additions and 196 deletions

View File

@@ -163,13 +163,11 @@ func (p *Parser) parseUserCommand() (*Command, error) {
case TokenAlter:
return p.parseAlterCommand()
case TokenSet:
return p.parseSetCommand()
return p.parseAPISetCommands()
case TokenUnset:
return p.parseUnsetCommand()
case TokenReset:
return p.parseResetCommand()
case TokenGenerate:
return p.parseGenerateCommand()
case TokenImport:
return p.parseImportCommand()
case TokenInsert: