mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-15 05:04:27 +08:00
Go CLI: Add list configs and set log level command (#13983)
### What problem does this PR solve? 1. list configs 2. set log level debug/info/warn/error/fatal/panic ``` RAGFlow(user)> list configs; +--------------------+-----------------------+ | key | value | +--------------------+-----------------------+ | redis_host | localhost:6379 | | doc_engine | elasticsearch | | elasticsearch_host | http://localhost:1200 | | log_level | info | | database | mysql | | database_host | localhost:3306 | | admin | 0.0.0.0:9383 | | storage_engine | minio | | minio_host | localhost:9000 | +--------------------+-----------------------+ ``` ### Type of change - [x] New Feature (non-breaking change which adds functionality) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added `LIST CONFIGS` command to view system configuration details (Redis, database, log level, storage engine, and host settings). * Added `SET LOG LEVEL` command to adjust logging verbosity at runtime. * **Improvements** * Enhanced log level configuration defaults and runtime state management. * Reorganized token management and system endpoints under `/system/` routes for better API organization. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -706,9 +706,9 @@ func (c *RAGFlowClient) ShowUser(cmd *Command) (ResponseIf, error) {
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// ListDatasets lists datasets for a specific user (admin mode)
|
||||
// ListUserDatasets lists datasets for a specific user (admin mode)
|
||||
// Returns (result_map, error) - result_map is non-nil for benchmark mode
|
||||
func (c *RAGFlowClient) ListDatasets(cmd *Command) (ResponseIf, error) {
|
||||
func (c *RAGFlowClient) ListUserDatasets(cmd *Command) (ResponseIf, error) {
|
||||
if c.ServerType != "admin" {
|
||||
return nil, fmt.Errorf("this command is only allowed in ADMIN mode")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user