Jin Hai
b3d536c48e
Go: merge functions ( #16622 )
...
### Summary
Merge HTTP response functions into common/response.go
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-07-06 18:14:05 +08:00
Zhichang Yu
014c3f634f
Align Go ingestion boundaries with Python ( #16647 )
...
Moves doc_id blob resolution into Parser, tightens chunker/tokenizer to
Python output_format semantics, updates extractor list handling, and
fixes real-template integration tests.
2026-07-05 20:43:52 +08:00
Jin Hai
6b571694df
Go: Update error info ( #16619 )
...
As title.
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-07-03 19:37:25 +08:00
Jin Hai
a4c370c5ba
Go: fix 'list services' ( #16598 )
...
### Summary
```
RAGFlow(admin)> list services;
+-----------------------------------------------------------------------------+-----------+----+---------------+------+---------------+-----------+
| extra | host | id | name | port | service_type | status |
+-----------------------------------------------------------------------------+-----------+----+---------------+------+---------------+-----------+
| map[database:1 mq_type:redis password:infini_rag_flow] | localhost | 0 | redis | 6379 | message_queue | alive |
| map[password:infini_rag_flow retrieval_type:elasticsearch username:elastic] | localhost | 1 | elasticsearch | 1200 | retrieval | alive |
| | 0.0.0.0 | 2 | nats | 4222 | message_queue | CONNECTED |
| map[meta_type:mysql password:infini_rag_flow username:root] | localhost | 3 | mysql | 3306 | meta_data | alive |
| map[password:infini_rag_flow store_type:minio user:rag_flow] | localhost | 4 | minio | 9000 | file_store | alive |
+-----------------------------------------------------------------------------+-----------+----+---------------+------+---------------+-----------+
```
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-07-03 15:08:37 +08:00
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
8bc27d8df1
Go CLI: fix show variable ( #16370 )
...
### What problem does this PR solve?
```
RAGFlow(api/default)> show var 'mail.port';
+-----------+-----------+--------------+-------+
| data_type | name | setting_type | value |
+-----------+-----------+--------------+-------+
| integer | mail.port | config | 30 |
+-----------+-----------+--------------+-------+
```
### 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 13:51:56 +08:00
Jin Hai
dbefadd86a
Go CLI: refactor ( #16355 )
2026-06-25 20:36:50 +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
7214a23614
Go: fix duplicate models ( #16197 )
...
### What problem does this PR solve?
1. Remove unused file
2. Remove duplicate models
3. Resort the function order
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] Refactoring
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-06-19 09:57:58 +08:00
Jin Hai
3eb49ca7f8
Go: add command, list, remove, stop tasks ( #16190 )
...
### What problem does this PR solve?
```
RAGFlow(admin)> stop user 'abc' ingestion tasks;
+-----------------------------------+-------+--------------------------------------------------------------------------+-------+
| command | email | error | tasks |
+-----------------------------------+-------+--------------------------------------------------------------------------+-------+
| stop_ingestion_tasks_by_condition | abc | 'Stop ingestion tasks by condition' is implemented in enterprise edition | |
+-----------------------------------+-------+--------------------------------------------------------------------------+-------+
RAGFlow(admin)> stop user 'abc' ingestion tasks 'created;
+-----------------------------------+-------+--------------------------------------------------------------------------+----------+-------+
| command | email | error | status | tasks |
+-----------------------------------+-------+--------------------------------------------------------------------------+----------+-------+
| stop_ingestion_tasks_by_condition | abc | 'Stop ingestion tasks by condition' is implemented in enterprise edition | created; | |
+-----------------------------------+-------+--------------------------------------------------------------------------+----------+-------+
RAGFlow(admin)> stop user 'abc' ingestion tasks 'create';
+-----------------------------------+-------+--------------------------------------------------------------------------+--------+-------+
| command | email | error | status | tasks |
+-----------------------------------+-------+--------------------------------------------------------------------------+--------+-------+
| stop_ingestion_tasks_by_condition | abc | 'Stop ingestion tasks by condition' is implemented in enterprise edition | create | |
+-----------------------------------+-------+--------------------------------------------------------------------------+--------+-------+
RAGFlow(admin)> remove user 'abc' ingestion tasks 'create';
+-------------------------------------+-------+----------------------------------------------------------------------------+--------+-------+
| command | email | error | status | tasks |
+-------------------------------------+-------+----------------------------------------------------------------------------+--------+-------+
| remove_ingestion_tasks_by_condition | abc | 'Remove ingestion tasks by condition' is implemented in enterprise edition | create | |
+-------------------------------------+-------+----------------------------------------------------------------------------+--------+-------+
RAGFlow(admin)> remove user 'abc' ingestion tasks;
+-------------------------------------+-------+----------------------------------------------------------------------------+-------+
| command | email | error | tasks |
+-------------------------------------+-------+----------------------------------------------------------------------------+-------+
| remove_ingestion_tasks_by_condition | abc | 'Remove ingestion tasks by condition' 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:50:21 +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
Jin Hai
6865039a22
Go: add more start server parameters ( #16093 )
...
### What problem does this PR solve?
```
$ ./bin/ragflow_server --version
RAGFlow version: v0.26.0-65-g549f6109c
$ ./bin/ragflow_server --debug # start server with debug log level
$ ./bin/admin_server --version
RAGFlow version: v0.26.0-65-g549f6109c
$ ./bin/admin_server --debug # start server with debug log level
$ ./bin/admin_server --init-superuser # init default superuser
$ ./bin/ingestor --version
RAGFlow version: v0.26.0-68-g6f6c39706
$ ./bin/ingestor --debug
```
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-06-16 20:27:37 +08:00
Jin Hai
3d8bc76e27
Go refactor: merge similar functions ( #16098 )
...
### What problem does this PR solve?
Merge password related functions
### Type of change
- [x] Refactoring
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-06-16 19:26:42 +08:00
Jin Hai
fcebcebe1e
Move REDIS to engine dir ( #16006 )
...
### What problem does this PR solve?
as title.
### Type of change
- [x] Refactoring
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-06-15 14:44:16 +08:00
Jin Hai
e96bc37d06
Go: use NATS as the message queue ( #15327 )
...
### What problem does this PR solve?
```
RAGFlow(admin)> mq publish 'msg2';
SUCCESS
RAGFlow(admin)> mq publish 'msg3';
SUCCESS
RAGFlow(admin)> mq list;
+---------+---------------+
| message | subject |
+---------+---------------+
| msg1 | tasks.RAGFLOW |
| msg2 | tasks.RAGFLOW |
| msg3 | tasks.RAGFLOW |
+---------+---------------+
RAGFlow(admin)> mq pull 2;
+---------+---------------+
| message | subject |
+---------+---------------+
| msg1 | tasks.RAGFLOW |
| msg2 | tasks.RAGFLOW |
+---------+---------------+
RAGFlow(admin)> mq pull noack;
+---------+---------------+
| message | subject |
+---------+---------------+
| abc | tasks.RAGFLOW |
+---------+---------------+
RAGFlow(admin)> mq show
+-------------------+----------------+--------+---------------+---------------+-------------------+---------------+
| ack_pending_count | consumer_count | memory | message_count | pending_count | redelivered_count | waiting_count |
+-------------------+----------------+--------+---------------+---------------+-------------------+---------------+
| 2 | 1 | 0 | 2 | 0 | 1 | 0 |
+-------------------+----------------+--------+---------------+---------------+-------------------+---------------+
RAGFlow(admin)> list ingestors;
+--------------+-------------------------------------------+--------+
| host | name | status |
+--------------+-------------------------------------------+--------+
| 192.168.1.38 | ingestor-8f0e4bd5650a4ac58b0151969fbf6935 | alive |
+--------------+-------------------------------------------+--------+
RAGFlow(admin)> list ingestion tasks;
+----------------------------------+----------------------------------+-----------+------+-------------+----------------------------------+
| document_id | id | status | step | user | user_id |
+----------------------------------+----------------------------------+-----------+------+-------------+----------------------------------+
| ffe64fae423411f1a2d938a74640adcc | 90d3d0f6528941c1ac8eb0360effccc4 | COMPLETED | 5 | aaa@aaa.com | 2ba4881420fa11f19e9c38a74640adcc |
+----------------------------------+----------------------------------+-----------+------+-------------+----------------------------------+
RAGFlow(admin)> remove ingestion tasks '90d3d0f6528941c1ac8eb0360effccc4';
+---------+----------------------------------+
| delete | task_id |
+---------+----------------------------------+
| success | 90d3d0f6528941c1ac8eb0360effccc4 |
+---------+----------------------------------+
RAGFlow(admin)> stop ingestion tasks 'e89e20d9a25848a1b79bd9345ddbfe1d';
+----------+----------------------------------+
| status | task_id |
+----------+----------------------------------+
| STOPPING | e89e20d9a25848a1b79bd9345ddbfe1d |
+----------+----------------------------------+
# Publish a message
RAGFlow(admin)> mq publish 'cdd';
SUCCESS
# List current tasks in the message queue
RAGFlow(admin)> mq list
+----------------------------------+---------------+
| message | subject |
+----------------------------------+---------------+
| 7ce392a3c1624cd2be4b5276e8825059 | tasks.RAGFLOW |
+----------------------------------+---------------+
# Consume a task from the message queue
RAGFlow(admin)> mq pull
+------+-----+----------------+
| ack | id | type |
+------+-----+----------------+
| true | cdd | ingestion_test |
+------+-----+----------------+
# User mode
# List ingestion tasks, followed by dataset id
RAGFlow(user)> list ingestion tasks from '0abe79f9423311f1ad8d38a74640adcc';
+---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+
| create_date | create_time | dataset_id | document_id | id | schema | status | update_date | update_time | user_id |
+---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+
| 2026-05-30T20:21:06+08:00 | 1780143666289 | 0abe79f9423311f1ad8d38a74640adcc | ffe64fae423411f1a2d938a74640adcc | 8d758cd14a8b4ba8ab505003fb52017d | | COMPLETED | 2026-05-30T20:21:26+08:00 | 1780143686431 | 2ba4881420fa11f19e9c38a74640adcc |
+---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+
RAGFlow(user)> list ingestion tasks;
+---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+
| create_date | create_time | dataset_id | document_id | id | schema | status | update_date | update_time | user_id |
+---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+
| 2026-06-02T19:02:31+08:00 | 1780398151417 | 0abe79f9423311f1ad8d38a74640adcc | ffe64fae423411f1a2d938a74640adcc | e89e20d9a25848a1b79bd9345ddbfe1d | | COMPLETED | 2026-06-02T19:02:52+08:00 | 1780398172208 | 2ba4881420fa11f19e9c38a74640adcc |
+---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+
# Create an ingestion task
# First argument is document id, second argument is dataset id
RAGFlow(user)> start ingestion 'ffe64fae423411f1a2d938a74640adcc' from '0abe79f9423311f1ad8d38a74640adcc';
+----------------------------------+-------------------------------------------+
| document_id | result |
+----------------------------------+-------------------------------------------+
| ffe64fae423411f1a2d938a74640adcc | task_id: 8d758cd14a8b4ba8ab505003fb52017d |
+----------------------------------+-------------------------------------------+
# Pause an ingestion task, first argument is ingestion id
RAGFlow(user)> stop ingestion '8d758cd14a8b4ba8ab505003fb52017d';
+---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+
| create_date | create_time | dataset_id | document_id | id | schema | status | update_date | update_time | user_id |
+---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+
| 2026-05-30T20:21:06+08:00 | 1780143666289 | 0abe79f9423311f1ad8d38a74640adcc | ffe64fae423411f1a2d938a74640adcc | 8d758cd14a8b4ba8ab505003fb52017d | | COMPLETED | 2026-05-30T20:21:26+08:00 | 1780143686431 | 2ba4881420fa11f19e9c38a74640adcc |
+---------------------------+---------------+----------------------------------+----------------------------------+----------------------------------+--------+-----------+---------------------------+---------------+----------------------------------+
# Delete an ingestion task
RAGFlow(api/default)> remove ingestion tasks 'f366450a27d54677aec1c7090add30f0';
+---------+----------------------------------+
| remove | task_id |
+---------+----------------------------------+
| success | f366450a27d54677aec1c7090add30f0 |
+---------+----------------------------------+
```
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-06-12 14:56:44 +08:00
Jin Hai
d02eb6b596
Go: refactor CLI ( #15728 )
...
### What problem does this PR solve?
```
RAGFlow(user)> add api server 'ccc' host '127.0.0.1:9980';
SUCCESS
RAGFlow(user)> list api server;
+------------+---------------+-----------------+---------+-------------+---------------+
| api_server | api_server_ip | api_server_port | auth | user_name | user_password |
+------------+---------------+-----------------+---------+-------------+---------------+
| ccc | 127.0.0.1 | 9980 | no auth | | |
| default | 127.0.0.1 | 9384 | login | aaa@aaa.com | *** |
+------------+---------------+-----------------+---------+-------------+---------------+
RAGFlow(user)> delete api server 'ccc';
SUCCESS
RAGFlow(user)> list api server;
+------------+---------------+-----------------+---------+
| api_server | api_server_ip | api_server_port | auth |
+------------+---------------+-----------------+---------+
| default | 127.0.0.1 | 9384 | no auth |
+------------+---------------+-----------------+---------+
RAGFlow(user)> show admin server;
+--------------+-------+
| field | value |
+--------------+-------+
| admin_server | N/A |
+--------------+-------+
RAGFlow(user)> add admin server host '127.0.0.1:9880';
SUCCESS
RAGFlow(user)> show admin server;
+-------------------+-----------+
| field | value |
+-------------------+-----------+
| admin_server_ip | 127.0.0.1 |
| admin_server_port | 9880 |
| auth | no auth |
+-------------------+-----------+
RAGFlow(user)> delete admin server;
SUCCESS
RAGFlow(user)> show admin server;
+--------------+-------+
| field | value |
+--------------+-------+
| admin_server | N/A |
+--------------+-------+
RAGFlow(user)> show current
+-----------------+-------------+
| field | value |
+-----------------+-------------+
| api_server_port | 9384 |
| user_name | aaa@aaa.com |
| user_password | *** |
| mode | api |
| verbose | false |
| api_server | default |
| api_server_ip | 127.0.0.1 |
| auth | login |
| output | table |
| interactive | true |
+-----------------+-------------+
```
### Type of change
- [x] Refactoring
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-06-09 15:22:50 +08:00
Jin Hai
f8c626bbc8
Go: add ingestion server ( #15094 )
...
### What problem does this PR solve?
1. Go ingestion server will connected with admin server with gRPC stream
2. Go ingestion server will be responsible for ingestion tasks
```
RAGFlow(admin)> list ingestors;
+-----------------+-----------+----------------------------------+---------------------------+----------+------------+--------------+--------+------------+---------------+
| address | cpu_usage | id | last_heartbeat | name | process_id | rss_usage | status | task_count | vms_usage |
+-----------------+-----------+----------------------------------+---------------------------+----------+------------+--------------+--------+------------+---------------+
| 127.0.0.1:58564 | 0 | bdd1870eea2646e0aacb8a2cd3307aa2 | 2026-05-24T18:16:17+08:00 | ingestor | 680152 | 212.72265625 | active | 0 | 2589.12109375 |
+-----------------+-----------+----------------------------------+---------------------------+----------+------------+--------------+--------+------------+---------------+
RAGFlow(admin)> start ingestion 'abc';
+----------------------------------+
| task_id |
+----------------------------------+
| e714777639ca4760ab427b5f211e81ad |
+----------------------------------+
RAGFlow(admin)> stop ingestion 'f7bd39d0a724457eb5fdce6d81699776';
+----------------------------------+
| task_id |
+----------------------------------+
| f7bd39d0a724457eb5fdce6d81699776 |
+----------------------------------+
RAGFlow(admin)> list tasks;
+-----+----------------------------------+-------+------+----------------------------------+---------------------------+------------+------------+
| ETA | assign_to | error | from | id | last_update | start_time | status |
+-----+----------------------------------+-------+------+----------------------------------+---------------------------+------------+------------+
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | eae6431da72a40e796cff3a03008091b | 2026-05-24T19:46:03+08:00 | | COMPLETED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 6cccdd174bd049ecb05a774bbb47593f | 2026-05-24T19:46:03+08:00 | | COMPLETED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | ef360d777e57485799adb96b30f2b4b8 | 2026-05-24T19:46:03+08:00 | | CANCELED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | bcc5c5448cb64de48b6b6171c36fb790 | 2026-05-24T19:46:03+08:00 | | CANCELED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | bfc25384c43a443294fe2da979a38ac2 | 2026-05-24T19:46:03+08:00 | | DISPATCHED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 84960537b85d413b8990a9efd5952d67 | 2026-05-24T19:46:04+08:00 | | DISPATCHED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 3d223c1b51e24b36861a3bfb2f1d58d4 | 2026-05-24T19:46:03+08:00 | | CANCELED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | e433b0e356b846c89c301621a3c54494 | 2026-05-24T19:46:03+08:00 | | COMPLETED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 7c93a3880f074ebd8eca14e6b51bb7ef | 2026-05-24T19:46:03+08:00 | | COMPLETED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | df2e4ef51aaf4390bff9a23f2692486e | 2026-05-24T19:46:04+08:00 | | DISPATCHED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 7377c53010194ef7a83aa206698d66ff | 2026-05-24T19:46:05+08:00 | | DISPATCHED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | df64d1a1f9d348e3a2f174c4d7d69e73 | 2026-05-24T19:46:05+08:00 | | DISPATCHED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | b59834512e2847e1bdf13ace04b8a456 | 2026-05-24T19:46:06+08:00 | | DISPATCHED |
| 0 | 17937da188b84f23a5c10bb87588944b | | CLI | 0064bb0ab69344028d1ecfda053826f4 | 2026-05-24T19:46:03+08:00 | | QUEUED |
+-----+----------------------------------+-------+------+----------------------------------+---------------------------+------------+------------+
```
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-05-25 14:00:08 +08:00
Jake Armstrong
93d3deb5e4
Fix admin CLI system variable commands ( #14956 )
...
## What
Fixes #12409 .
Implements admin CLI support for:
- `list vars;`
- `show var <name-or-prefix>;`
- `set var <name> <value>;`
## Changes
- Wire Go CLI variable commands to the admin API.
- Support integer and quoted string values in `SET VAR`.
- Return variable rows as `data_type`, `name`, `setting_type`, and
`value`.
- Add exact-name lookup with prefix fallback for `SHOW VAR`.
- Validate values by stored data type: `string`, `integer`, `bool`, and
`json`.
- Keep the legacy Python admin CLI/server behavior aligned.
- Update admin CLI docs and add focused tests.
## Verification
- `go test -count=1 ./internal/cli`
- `python3.12 -m py_compile admin/server/services.py
admin/server/routes.py api/db/services/system_settings_service.py
admin/client/parser.py admin/client/ragflow_client.py`
- Python admin CLI parser smoke test for `SET VAR`, quoted values, `SHOW
VAR`, and `LIST VARS`.
- Attempted `./run_go_tests.sh`; local environment is missing native
tokenizer/linker artifacts:
- `internal/cpp/cmake-build-release/librag_tokenizer_c_api.a`
- `-lstdc++`
Co-authored-by: Jin Hai <haijin.chn@gmail.com >
2026-05-18 19:08:45 +08:00
buua436
f0122179dd
GO: align time units with Python and centralize timestamp injection in BaseModel ( #14875 )
...
### What problem does this PR solve?
align time units with Python and centralize timestamp injection in
BaseModel
### Type of change
- [x] Refactoring
2026-05-14 13:46:46 +08:00
Jin Hai
b6abce50b1
Go: Admin list ingestion tasks ( #14695 )
...
### What problem does this PR solve?
```
RAGFlow(admin)> list tasks;
+-------------+------------------+----------------------------------+-------------+-----------+----------------------------------+----------+----------------------+-------------+-----------+---------+
| chunk_count | digest | document_id | duration | from_page | id | priority | progress | retry_count | task_type | to_page |
+-------------+------------------+----------------------------------+-------------+-----------+----------------------------------+----------+----------------------+-------------+-----------+---------+
| 16 | 8a0016a0dc3cbdbb | f6aa38bb4ad111f1ba6338a74640adcc | 1511.156966 | 0 | f91e4f104ad111f1aaaf38a74640adcc | 0 | 1 | 1 | | 12 |
+-------------+------------------+----------------------------------+-------------+-----------+----------------------------------+----------+----------------------+-------------+-----------+---------+
```
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-05-09 10:03:23 +08:00
Jin Hai
94324afee9
Go: fix auth issue in hybrid mode ( #14611 )
...
### What problem does this PR solve?
Since secret key get and set logic is updated, the go server also need
to update.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-05-07 17:14:22 +08:00
Jin Hai
aa57b5bd8b
Go: move logger to common module ( #14545 )
...
### What problem does this PR solve?
As title
### Type of change
- [x] Refactoring
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-05-06 10:41:58 +08:00
Jin Hai
819257f257
Go: add volcengine ( #14409 )
...
### What problem does this PR solve?
1. Refactor server_main
2. Add volcengine
### Type of change
- [x] Refactoring
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-04-28 12:12:58 +08:00
Jin Hai
efd6ecc3e5
New provider and models API and CLI ( #13865 )
...
### What problem does this PR solve?
As title.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
- [x] Refactoring
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-31 18:42:12 +08:00
Zhichang Yu
0d85a8e7aa
feat: add dynamic log level adjustment APIs ( #13850 )
...
Add REST APIs to dynamically query and modify log levels at runtime for
both Python (Flask) and Go servers.
Changes:
- common/log_utils.py: add set_log_level() and get_log_levels()
functions
- admin/server/routes.py: add GET/PUT /api/v1/admin/log_levels endpoints
- api/apps/system_app.py: add GET/PUT /api/{version}/system/log_levels
endpoints
- internal/logger/logger.go: add GetLevel() and SetLevel() with atomic
level support
- internal/handler/system.go: add GetLogLevel, SetLogLevel, Health
handlers
- internal/router/router.go: route /health to systemHandler
- internal/admin/handler.go: add GetLogLevel, SetLogLevel handlers
- internal/admin/router.go: add /api/v1/admin/log_level routes
### What problem does this PR solve?
_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-30 18:40:58 +08:00
Jin Hai
e20cf39735
Refactor Go server model provider reading and access ( #13831 )
...
### What problem does this PR solve?
1. Refactor model provider json file format
2. Use memory data structure to replace database
3. Add CLI command to access
```
RAGFlow(user)> list pool models from 'xai';
+-------------------------------------------------------------------------------------+------------+-------------+-----------------------+
| features | max_tokens | model_types | name |
+-------------------------------------------------------------------------------------+------------+-------------+-----------------------+
| map[] | 256000 | [llm] | grok-4 |
| map[] | 131072 | [llm] | grok-3 |
| map[] | 131072 | [llm] | grok-3-fast |
| map[] | 131072 | [llm] | grok-3-mini |
| map[] | 131072 | [llm] | grok-3-mini-mini-fast |
| map[multimodal:map[enabled:true input_modalities:[image] output_modalities:[text]]] | 32768 | [vlm] | grok-2-vision |
+-------------------------------------------------------------------------------------+------------+-------------+-----------------------+
RAGFlow(user)> show pool model 'grok-2-vision' from 'xai';
+-------------------------------------------------------------------------------------+------------+-------------+---------------+
| features | max_tokens | model_types | name |
+-------------------------------------------------------------------------------------+------------+-------------+---------------+
| map[multimodal:map[enabled:true input_modalities:[image] output_modalities:[text]]] | 32768 | [vlm] | grok-2-vision |
+-------------------------------------------------------------------------------------+------------+-------------+---------------+
RAGFlow(user)> list pool providers;
+--------+------------------------------------------------------------+---------------------------+
| name | tags | url |
+--------+------------------------------------------------------------+---------------------------+
| OpenAI | LLM,TEXT EMBEDDING,TTS,TEXT RE-RANK,SPEECH2TEXT,MODERATION | https://api.openai.com/v1 |
| xAI | LLM | https://api.x.ai/v1 |
+--------+------------------------------------------------------------+---------------------------+
RAGFlow(user)> show pool provider 'openai';
+---------------------------+--------+------------------------------------------------------------+--------------+
| base_url | name | tags | total_models |
+---------------------------+--------+------------------------------------------------------------+--------------+
| https://api.openai.com/v1 | OpenAI | LLM,TEXT EMBEDDING,TTS,TEXT RE-RANK,SPEECH2TEXT,MODERATION | 27 |
+---------------------------+--------+------------------------------------------------------------+--------------+
```
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
- [x] Refactoring
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-30 12:00:49 +08:00
Jin Hai
f32a832f92
Add rename model directory to entity to avoid name misunderstanding ( #13829 )
...
### What problem does this PR solve?
Model-> entity
### Type of change
- [x] Refactoring
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-27 19:25:18 +08:00
Jin Hai
1fff48b656
Add minio go test ( #13800 )
...
### What problem does this PR solve?
1. Add go test
2. Update CI process
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-27 18:12:56 +08:00
Jin Hai
e705ac6643
Add logout ( #13796 )
...
### What problem does this PR solve?
Add command: logout
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-26 11:54:23 +08:00
Jin Hai
61cc5ffef2
Add api tokens commands of go admin cli ( #13765 )
...
### What problem does this PR solve?
- GENERATE TOKENS OF USER 'xxx@xxx.com '
- DROP KEY 'ragflow-yyyyy' OF 'xxx@xxx.com '
- LIST KEYS OF 'xxx@xxx.com '
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-25 21:39:14 +08:00
Jin Hai
b308cd3a02
Update go cli ( #13717 )
...
### What problem does this PR solve?
Go cli
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-24 20:08:36 +08:00
Jin Hai
04a60a41e0
Allow default admin user login ragflow user of go server ( #13715 )
...
### What problem does this PR solve?
1. Allow admin@ragflow.io login go ragflow server
2. Fix go server start error.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-20 12:02:44 +08:00
chanx
e1dbfb8a9c
fix(dao): Remove unnecessary status filter conditions in user queries ( #13698 )
...
### What problem does this PR solve?
Fix: Enhanced the user deletion function to return detailed deletion
information.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
2026-03-19 21:05:15 +08:00
Jin Hai
8d50ee632d
Add environments reading ( #13701 )
...
### What problem does this PR solve?
environment variable > config file
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-19 18:50:28 +08:00
Jin Hai
cc7e94ffb6
Use different API route according the ENV ( #13597 )
...
### What problem does this PR solve?
1. Fix go server date precision
2. Use API_SCHEME_PROXY to control the web API route
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-13 19:05:30 +08:00
chanx
a3e6c2e84a
Fix: Enhanced user management functionality and cascading data deletion. ( #13594 )
...
### What problem does this PR solve?
Fix: Enhanced user management functionality and cascading data deletion.
Added tenant and related data initialization functionality during user
creation, including tenants, user-tenant relationships, LLM
configuration, and root folder.
Added cascading deletion logic for user deletion, ensuring that all
associated data is cleaned up simultaneously when a user is deleted.
Implemented a Werkzeug-compatible password hash algorithm (scrypt) and
verification functionality.
Added multiple DAO methods to support batch data operations and
cascading deletion.
Improved user login processing and added token signing functionality.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
2026-03-13 16:53:54 +08:00
Jin Hai
5c955a31cc
Update go server ( #13589 )
...
### What problem does this PR solve?
1. Add more CLI command
2. Add some license hooks
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
- [x] Refactoring
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-13 14:41:02 +08:00
chanx
1df804a14a
Feature (System Settings): Implemented system settings management functionality ( #13556 )
...
### What problem does this PR solve?
Feature (System Settings): Implemented system settings management
functionality
- Added a new SystemSettings model, including creation and update time
fields.
- Implemented SystemSettingsDAO, providing CRUD operations and
transaction support.
- Implemented management interfaces for variables, configurations, and
environment variables in the admin service.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
Co-authored-by: Yingfeng <yingfeng.zhang@gmail.com >
2026-03-12 19:06:20 +08:00
Jin Hai
90afce192c
Add license and fingerprint API hook ( #13548 )
...
### What problem does this PR solve?
For EE
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
---------
Signed-off-by: Jin Hai <haijin.chn@gmail.com >
2026-03-12 11:52:39 +08:00