ragflow-cli 0.25.3__tar.gz → 0.25.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/PKG-INFO +2 -2
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/README.md +1 -1
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/parser.py +2 -1
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/pyproject.toml +1 -1
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/ragflow_cli.egg-info/PKG-INFO +2 -2
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/ragflow_client.py +9 -6
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/http_client.py +0 -0
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/ragflow_cli.egg-info/SOURCES.txt +0 -0
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/ragflow_cli.egg-info/dependency_links.txt +0 -0
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/ragflow_cli.egg-info/entry_points.txt +0 -0
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/ragflow_cli.egg-info/requires.txt +0 -0
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/ragflow_cli.egg-info/top_level.txt +0 -0
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/ragflow_cli.py +0 -0
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/setup.cfg +0 -0
- {ragflow_cli-0.25.3 → ragflow_cli-0.25.5}/user.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ragflow-cli
|
|
3
|
-
Version: 0.25.
|
|
3
|
+
Version: 0.25.5
|
|
4
4
|
Summary: Admin Service's client of [RAGFlow](https://github.com/infiniflow/ragflow). The Admin Service provides user management and system monitoring.
|
|
5
5
|
Author-email: Lynn <lynn_inf@hotmail.com>
|
|
6
6
|
License: Apache License, Version 2.0
|
|
@@ -62,7 +62,7 @@ It consists of a server-side Service and a command-line client (CLI), both imple
|
|
|
62
62
|
1. Ensure the Admin Service is running.
|
|
63
63
|
2. Install ragflow-cli.
|
|
64
64
|
```bash
|
|
65
|
-
pip install ragflow-cli==0.25.
|
|
65
|
+
pip install ragflow-cli==0.25.5
|
|
66
66
|
```
|
|
67
67
|
3. Launch the CLI client:
|
|
68
68
|
```bash
|
|
@@ -48,7 +48,7 @@ It consists of a server-side Service and a command-line client (CLI), both imple
|
|
|
48
48
|
1. Ensure the Admin Service is running.
|
|
49
49
|
2. Install ragflow-cli.
|
|
50
50
|
```bash
|
|
51
|
-
pip install ragflow-cli==0.25.
|
|
51
|
+
pip install ragflow-cli==0.25.5
|
|
52
52
|
```
|
|
53
53
|
3. Launch the CLI client:
|
|
54
54
|
```bash
|
|
@@ -264,7 +264,7 @@ generate_key: GENERATE KEY FOR USER quoted_string ";"
|
|
|
264
264
|
list_keys: LIST KEYS OF quoted_string ";"
|
|
265
265
|
drop_key: DROP KEY quoted_string OF quoted_string ";"
|
|
266
266
|
|
|
267
|
-
set_variable: SET VAR identifier
|
|
267
|
+
set_variable: SET VAR identifier variable_value ";"
|
|
268
268
|
show_variable: SHOW VAR identifier ";"
|
|
269
269
|
list_variables: LIST VARS ";"
|
|
270
270
|
list_configs: LIST CONFIGS ";"
|
|
@@ -378,6 +378,7 @@ update_chunk: UPDATE CHUNK quoted_string OF DATASET quoted_string SET quoted_str
|
|
|
378
378
|
identifier_list: identifier (COMMA identifier)*
|
|
379
379
|
|
|
380
380
|
identifier: WORD
|
|
381
|
+
variable_value: WORD | NUMBER | QUOTED_STRING
|
|
381
382
|
quoted_string: QUOTED_STRING
|
|
382
383
|
status: ON | WORD
|
|
383
384
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ragflow-cli"
|
|
3
|
-
version = "0.25.
|
|
3
|
+
version = "0.25.5"
|
|
4
4
|
description = "Admin Service's client of [RAGFlow](https://github.com/infiniflow/ragflow). The Admin Service provides user management and system monitoring. "
|
|
5
5
|
authors = [{ name = "Lynn", email = "lynn_inf@hotmail.com" }]
|
|
6
6
|
license = { text = "Apache License, Version 2.0" }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ragflow-cli
|
|
3
|
-
Version: 0.25.
|
|
3
|
+
Version: 0.25.5
|
|
4
4
|
Summary: Admin Service's client of [RAGFlow](https://github.com/infiniflow/ragflow). The Admin Service provides user management and system monitoring.
|
|
5
5
|
Author-email: Lynn <lynn_inf@hotmail.com>
|
|
6
6
|
License: Apache License, Version 2.0
|
|
@@ -62,7 +62,7 @@ It consists of a server-side Service and a command-line client (CLI), both imple
|
|
|
62
62
|
1. Ensure the Admin Service is running.
|
|
63
63
|
2. Install ragflow-cli.
|
|
64
64
|
```bash
|
|
65
|
-
pip install ragflow-cli==0.25.
|
|
65
|
+
pip install ragflow-cli==0.25.5
|
|
66
66
|
```
|
|
67
67
|
3. Launch the CLI client:
|
|
68
68
|
```bash
|
|
@@ -43,6 +43,12 @@ def encrypt(input_string):
|
|
|
43
43
|
return base64.b64encode(cipher_text).decode("utf-8")
|
|
44
44
|
|
|
45
45
|
|
|
46
|
+
def _strip_tree_value(value):
|
|
47
|
+
if isinstance(value, Tree):
|
|
48
|
+
value = value.children[0]
|
|
49
|
+
return str(value).strip("'\"")
|
|
50
|
+
|
|
51
|
+
|
|
46
52
|
class RAGFlowClient:
|
|
47
53
|
def __init__(self, http_client: HttpClient, server_type: str):
|
|
48
54
|
self.http_client = http_client
|
|
@@ -526,10 +532,8 @@ class RAGFlowClient:
|
|
|
526
532
|
if self.server_type != "admin":
|
|
527
533
|
print("This command is only allowed in ADMIN mode")
|
|
528
534
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
var_value_tree: Tree = command["var_value"]
|
|
532
|
-
var_value = var_value_tree.children[0].strip("'\"")
|
|
535
|
+
var_name = _strip_tree_value(command["var_name"])
|
|
536
|
+
var_value = _strip_tree_value(command["var_value"])
|
|
533
537
|
response = self.http_client.request("PUT", "/admin/variables",
|
|
534
538
|
json_body={"var_name": var_name, "var_value": var_value}, use_api_base=True,
|
|
535
539
|
auth_kind="admin")
|
|
@@ -544,8 +548,7 @@ class RAGFlowClient:
|
|
|
544
548
|
if self.server_type != "admin":
|
|
545
549
|
print("This command is only allowed in ADMIN mode")
|
|
546
550
|
|
|
547
|
-
|
|
548
|
-
var_name = var_name_tree.children[0].strip("'\"")
|
|
551
|
+
var_name = _strip_tree_value(command["var_name"])
|
|
549
552
|
response = self.http_client.request(method="GET", path="/admin/variables", json_body={"var_name": var_name},
|
|
550
553
|
use_api_base=True, auth_kind="admin")
|
|
551
554
|
res_json = response.json()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|