mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-06 11:28:38 +08:00
Go CLI: admin list providers (#16243)
### What problem does this PR solve? ``` RAGFlow(admin)> list providers; +----------------------+-------------------------------------------------------------+ | command | error | +----------------------+-------------------------------------------------------------+ | list_model_providers | 'list model providers' is implemented in enterprise edition | +----------------------+-------------------------------------------------------------+ RAGFlow(admin)> add provider 'zhipu-ai'; +-------------+-----------------------------------------------------------+ | field | value | +-------------+-----------------------------------------------------------+ | command | add_model_provider | | error | 'add model provider' is implemented in enterprise edition | | provider_id | admin | | user_id | zhipu-ai | +-------------+-----------------------------------------------------------+ RAGFlow(admin)> delete provider 'zhipu-ai'; +-------------+--------------------------------------------------------------+ | field | value | +-------------+--------------------------------------------------------------+ | command | delete_model_provider | | error | 'delete model provider' is implemented in enterprise edition | | provider_id | admin | | user_id | zhipu-ai | +-------------+--------------------------------------------------------------+ RAGFlow(admin)> add provider 'zhipu-ai' instance 'instance1'; +---------------+-----------------------------------------------------------+ | field | value | +---------------+-----------------------------------------------------------+ | command | add_model_instance | | error | 'add model instance' is implemented in enterprise edition | | instance_name | instance1 | | provider_id | zhipu-ai | | user_id | admin | +---------------+-----------------------------------------------------------+ RAGFlow(admin)> delete provider 'zhipu-ai' instance 'test' +-------------+--------------------------------------------------------------+ | field | value | +-------------+--------------------------------------------------------------+ | instances | [test] | | provider_id | zhipu-ai | | user_id | admin | | command | delete_model_provider | | error | 'delete model instance' is implemented in enterprise edition | +-------------+--------------------------------------------------------------+ RAGFlow(admin)> add provider 'zhipu-ai' instance 'instance1' model 'xxx'; +---------------+--------------------------------------------------+ | field | value | +---------------+--------------------------------------------------+ | command | add_model | | error | 'add model' is implemented in enterprise edition | | instance_name | instance1 | | model_names | [xxx] | | provider_id | zhipu-ai | | user_id | admin | +---------------+--------------------------------------------------+ RAGFlow(admin)> delete provider 'zhipu-ai' instance 'test' model 'xxx'; +---------------+------------------------------------------------------+ | field | value | +---------------+------------------------------------------------------+ | command | delete_model_provider | | error | 'delete models' is implemented in enterprise edition | | instance_name | test | | models | [xxx] | | provider_id | zhipu-ai | | user_id | admin | +---------------+------------------------------------------------------+ ``` ### 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:
@@ -87,7 +87,7 @@ func (p *Parser) parseAdminCommand() (*Command, error) {
|
||||
case TokenPing:
|
||||
return p.parseAdminPingServer()
|
||||
case TokenList:
|
||||
return p.parseAdminListCommand()
|
||||
return p.parseAdminListCommands()
|
||||
case TokenShow:
|
||||
return p.parseAdminShowCommands()
|
||||
case TokenCheck:
|
||||
@@ -123,7 +123,7 @@ func (p *Parser) parseAdminCommand() (*Command, error) {
|
||||
case TokenAdd:
|
||||
return p.parseAdminAddCommand()
|
||||
case TokenDelete:
|
||||
return p.parseAdminDeleteCommand()
|
||||
return p.parseAdminDeleteCommands()
|
||||
case TokenSave:
|
||||
return p.parseAdminSaveCommand()
|
||||
case TokenUse:
|
||||
|
||||
Reference in New Issue
Block a user