14 Commits

Author SHA1 Message Date
Jin Hai
6370fce3f0 Go CLI: add show users plan summary (#16463)
### Summary

```
RAGFlow(admin)> show users plan summary;
+---------+----------------------------------------------------------------+
| field   | value                                                          |
+---------+----------------------------------------------------------------+
| command | show_users_plan_summary                                        |
| error   | 'Show users plan summary' is implemented in enterprise edition |
+---------+----------------------------------------------------------------+
```

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-29 22:28:45 +08:00
Jin Hai
3202ec6abf Go CLI: refactor commands (#16447)
### Summary

1. Move debug commands to dev file.
2. Refactor some commands syntax

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-29 17:03:26 +08:00
Jin Hai
2667995b25 Go CLI: Fix show model and list models (#16380)
### What problem does this PR solve?

```
RAGFlow(api/default)> show model 'WiseDiag-Z1 Think';

RAGFlow(api/default)> list models;

RAGFlow(admin)> show model 'WiseDiag-Z1 Think';

RAGFlow(admin)> list models;
```

### Type of change

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

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-26 15:36:01 +08:00
Jin Hai
4f02ba4cf4 Go: show model and list all models (#16272)
### What problem does this PR solve?
```
RAGFlow(admin)> show model 'abc';
+------------+----------------------------------------------------------------+
| field      | value                                                          |
+------------+----------------------------------------------------------------+
| command    | get_model_by_model_name                                        |
| error      | 'get model by model name' is implemented in enterprise edition |
| model_name | abc                                                            |
+------------+----------------------------------------------------------------+

RAGFlow(admin)> list models;
+-----------------+--------------------------------------------------------+
| command         | error                                                  |
+-----------------+--------------------------------------------------------+
| list_all_models | 'list all models' is implemented in enterprise edition |
+-----------------+--------------------------------------------------------+
```

### Type of change

- [x] Refactoring

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-23 19:29:06 +08:00
Jin Hai
dec2ce4a60 Go CLI: admin model framework (#16252) 2026-06-23 16:57:05 +08:00
Jin Hai
b661e9c19e 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>
2026-06-23 10:26:31 +08:00
Jin Hai
0e6b28a7fe Add show / set role default models (#16240)
### What problem does this PR solve?

```
RAGFlow(admin)> show role 'user' default models;
+--------------------------+-----------------------------------------------------------------+-----------+
| command                  | error                                                           | role_name |
+--------------------------+-----------------------------------------------------------------+-----------+
| show_role_default_models | 'show role default models' is implemented in enterprise edition | user      |
+--------------------------+-----------------------------------------------------------------+-----------+

RAGFlow(admin)> set role 'user' default chat 'glm4.5@test@zhipu-ai';
+------------+---------------------------------------------------------------+
| field      | value                                                         |
+------------+---------------------------------------------------------------+
| model_id   |                                                               |
| model_type | chat                                                          |
| role_name  | user                                                          |
| command    | set_role_default_model                                        |
| error      | 'set role default model' is implemented in enterprise edition |
+------------+---------------------------------------------------------------+

RAGFlow(admin)> reset role 'user' default chat;
+------------+-----------------------------------------------------------------+
| field      | value                                                           |
+------------+-----------------------------------------------------------------+
| command    | reset_role_default_model                                        |
| error      | 'reset role default model' is implemented in enterprise edition |
| model_type | chat                                                            |
| role_name  | user                                                            |
+------------+-----------------------------------------------------------------+

```

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-22 19:03:36 +08:00
Jin Hai
05e758e4fe Go CLI: Fix alter role (#16226)
### What problem does this PR solve?

As title.

### Type of change

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

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-22 17:33:47 +08:00
Jin Hai
760229d917 Go CLI: admin list configs (#16221)
### What problem does this PR solve?

- list configs;

### Type of change

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

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-22 08:19:23 +08:00
Jin Hai
5039f46999 Go CLI: refactor commands (#16213)
### What problem does this PR solve?

As title.

### Type of change

- [x] Refactoring

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-21 16:50:02 +08:00
Jin Hai
1b712be599 Go CLI: refactor some commands (#16204)
### What problem does this PR solve?

- list resources

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
- [x] Refactoring

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-20 02:31:07 +08:00
Jin Hai
11499f7bb3 Go CLI: add list user commands framework (#16201) 2026-06-19 15:09:54 +08:00
Jin Hai
5eedd13d49 Go: add command, show tasks summary (#16187)
### What problem does this PR solve?

RAGFlow(admin)> show tasks summary;

+---------+-----------------------------------------------------------------+
| field | value |

+---------+-----------------------------------------------------------------+
| command | show_users_quota_summary |
| error | 'Show users quota summary' is implemented in enterprise
edition |

+---------+-----------------------------------------------------------------+

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-18 17:09:20 +08:00
Jin Hai
20d11648a4 Go: add statistics command (#16119)
### What problem does this PR solve?

Prepare for enterprise command

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-06-18 15:21:44 +08:00