ragflow-cli-myfbee-test 0.27.2.dev0__py3-none-any.whl → 0.27.2.dev3__py3-none-any.whl
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.
- parser.py +0 -14
- {ragflow_cli_myfbee_test-0.27.2.dev0.dist-info → ragflow_cli_myfbee_test-0.27.2.dev3.dist-info}/METADATA +1 -1
- ragflow_cli_myfbee_test-0.27.2.dev3.dist-info/RECORD +10 -0
- {ragflow_cli_myfbee_test-0.27.2.dev0.dist-info → ragflow_cli_myfbee_test-0.27.2.dev3.dist-info}/WHEEL +1 -1
- ragflow_client.py +0 -44
- ragflow_cli_myfbee_test-0.27.2.dev0.dist-info/RECORD +0 -10
- {ragflow_cli_myfbee_test-0.27.2.dev0.dist-info → ragflow_cli_myfbee_test-0.27.2.dev3.dist-info}/entry_points.txt +0 -0
- {ragflow_cli_myfbee_test-0.27.2.dev0.dist-info → ragflow_cli_myfbee_test-0.27.2.dev3.dist-info}/top_level.txt +0 -0
parser.py
CHANGED
|
@@ -97,8 +97,6 @@ sql_command: login_user
|
|
|
97
97
|
| search_on_datasets
|
|
98
98
|
| get_chunk
|
|
99
99
|
| list_chunks
|
|
100
|
-
| insert_dataset_from_file
|
|
101
|
-
| insert_metadata_from_file
|
|
102
100
|
| update_chunk
|
|
103
101
|
| set_metadata
|
|
104
102
|
| remove_tags
|
|
@@ -223,11 +221,9 @@ TABLE: "TABLE"i
|
|
|
223
221
|
CHUNK: "CHUNK"i
|
|
224
222
|
CHUNKS: "CHUNKS"i
|
|
225
223
|
GET: "GET"i
|
|
226
|
-
INSERT: "INSERT"i
|
|
227
224
|
PAGE: "PAGE"i
|
|
228
225
|
KEYWORDS: "KEYWORDS"i
|
|
229
226
|
AVAILABLE: "AVAILABLE"i
|
|
230
|
-
FILE: "FILE"i
|
|
231
227
|
UPDATE: "UPDATE"i
|
|
232
228
|
REMOVE: "REMOVE"i
|
|
233
229
|
TAGS: "TAGS"i
|
|
@@ -377,8 +373,6 @@ create_dataset_table: CREATE DATASET TABLE quoted_string VECTOR SIZE NUMBER ";"
|
|
|
377
373
|
drop_dataset_table: DROP DATASET TABLE quoted_string ";"
|
|
378
374
|
create_metadata_table: CREATE METADATA TABLE ";"
|
|
379
375
|
drop_metadata_table: DROP METADATA TABLE ";"
|
|
380
|
-
insert_dataset_from_file: INSERT DATASET FROM FILE quoted_string ";"
|
|
381
|
-
insert_metadata_from_file: INSERT METADATA FROM FILE quoted_string ";"
|
|
382
376
|
generate_nav_for_dataset: GENERATE NAVIGATION OF DATASET quoted_string ";"
|
|
383
377
|
navigation_search: NAVIGATION SEARCH quoted_string IN DATASET quoted_string MODE quoted_string (TOPK NUMBER)? ";"
|
|
384
378
|
update_chunk: UPDATE CHUNK quoted_string OF DATASET quoted_string SET quoted_string ";"
|
|
@@ -788,14 +782,6 @@ class RAGFlowCLITransformer(Transformer):
|
|
|
788
782
|
chunk_id = items[2].children[0].strip("'\"")
|
|
789
783
|
return {"type": "get_chunk", "chunk_id": chunk_id}
|
|
790
784
|
|
|
791
|
-
def insert_dataset_from_file(self, items):
|
|
792
|
-
file_path = items[4].children[0].strip("'\"")
|
|
793
|
-
return {"type": "insert_dataset_from_file", "file_path": file_path}
|
|
794
|
-
|
|
795
|
-
def insert_metadata_from_file(self, items):
|
|
796
|
-
file_path = items[4].children[0].strip("'\"")
|
|
797
|
-
return {"type": "insert_metadata_from_file", "file_path": file_path}
|
|
798
|
-
|
|
799
785
|
def generate_nav_for_dataset(self, items):
|
|
800
786
|
dataset_id = items[4].children[0].strip("'\"")
|
|
801
787
|
return {"type": "generate_nav_for_dataset", "dataset_id": dataset_id}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ragflow-cli-myfbee-test
|
|
3
|
-
Version: 0.27.2.
|
|
3
|
+
Version: 0.27.2.dev3
|
|
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
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
http_client.py,sha256=dmgha7IOu5Mh9zixsGT8nUeb9DqphtsXCfjwildj0c4,6486
|
|
2
|
+
parser.py,sha256=HoNaiOh5YiOUU-02_NxssS4_R0hfqfeNADkDfpkqjBs,33832
|
|
3
|
+
ragflow_cli.py,sha256=fjo8zKHiyrgu3KV1jZjRinx0z0vyZIhaYYBeUHEHuiA,12470
|
|
4
|
+
ragflow_client.py,sha256=4uVXq_XVb10LvH8A4VoESTuMA6fHkO1IZm9aHCQIP6s,106829
|
|
5
|
+
user.py,sha256=pxXzjYkQweUVpvRvC_qdV5OACd9SvG5Z4oiT2GAl7O8,3535
|
|
6
|
+
ragflow_cli_myfbee_test-0.27.2.dev3.dist-info/METADATA,sha256=zhho85mFZ4N5OYJJPEa1UkiYVohSShg5UxWVZiZoWTk,6573
|
|
7
|
+
ragflow_cli_myfbee_test-0.27.2.dev3.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
8
|
+
ragflow_cli_myfbee_test-0.27.2.dev3.dist-info/entry_points.txt,sha256=rR-6pSN9myKV0cJq0U0C_g2qsMHxviYJwdERj1mC1tY,49
|
|
9
|
+
ragflow_cli_myfbee_test-0.27.2.dev3.dist-info/top_level.txt,sha256=WFyNpng93LW1S-ZnHJ6cFbk0YNUQYJqOjqHk2F2IWAw,51
|
|
10
|
+
ragflow_cli_myfbee_test-0.27.2.dev3.dist-info/RECORD,,
|
ragflow_client.py
CHANGED
|
@@ -1645,46 +1645,6 @@ class RAGFlowClient:
|
|
|
1645
1645
|
else:
|
|
1646
1646
|
print(f"Fail to get chunk, code: {response.status_code}, body: {response.text}")
|
|
1647
1647
|
|
|
1648
|
-
# Internal
|
|
1649
|
-
def insert_dataset_from_file(self, command_dict):
|
|
1650
|
-
if self.server_type != "user":
|
|
1651
|
-
print("This command is only allowed in USER mode")
|
|
1652
|
-
return
|
|
1653
|
-
|
|
1654
|
-
file_path = command_dict["file_path"]
|
|
1655
|
-
payload = {"file_path": file_path}
|
|
1656
|
-
response = self.http_client.request("POST", "/kb/insert_from_file", json_body=payload, use_api_base=False, auth_kind="web")
|
|
1657
|
-
if response.status_code == 200:
|
|
1658
|
-
res_json = response.json()
|
|
1659
|
-
if res_json["code"] == 0:
|
|
1660
|
-
print(f"Success to insert dataset from file: {file_path}")
|
|
1661
|
-
if res_json.get("data"):
|
|
1662
|
-
self._print_key_value(res_json["data"])
|
|
1663
|
-
else:
|
|
1664
|
-
print(f"Fail to insert dataset from file, code: {res_json['code']}, message: {res_json['message']}")
|
|
1665
|
-
else:
|
|
1666
|
-
print(f"Fail to insert dataset from file, code: {response.status_code}, body: {response.text}")
|
|
1667
|
-
|
|
1668
|
-
# Internal
|
|
1669
|
-
def insert_metadata_from_file(self, command_dict):
|
|
1670
|
-
if self.server_type != "user":
|
|
1671
|
-
print("This command is only allowed in USER mode")
|
|
1672
|
-
return
|
|
1673
|
-
|
|
1674
|
-
file_path = command_dict["file_path"]
|
|
1675
|
-
payload = {"file_path": file_path}
|
|
1676
|
-
response = self.http_client.request("POST", "/tenant/insert_metadata_from_file", json_body=payload, use_api_base=False, auth_kind="web")
|
|
1677
|
-
if response.status_code == 200:
|
|
1678
|
-
res_json = response.json()
|
|
1679
|
-
if res_json["code"] == 0:
|
|
1680
|
-
print(f"Success to insert metadata from file: {file_path}")
|
|
1681
|
-
if res_json.get("data"):
|
|
1682
|
-
self._print_key_value(res_json["data"])
|
|
1683
|
-
else:
|
|
1684
|
-
print(f"Fail to insert metadata from file, code: {res_json['code']}, message: {res_json['message']}")
|
|
1685
|
-
else:
|
|
1686
|
-
print(f"Fail to insert metadata from file, code: {response.status_code}, body: {response.text}")
|
|
1687
|
-
|
|
1688
1648
|
def update_chunk(self, command_dict):
|
|
1689
1649
|
if self.server_type != "user":
|
|
1690
1650
|
print("This command is only allowed in USER mode")
|
|
@@ -2290,10 +2250,6 @@ def run_command(client: RAGFlowClient, command_dict: dict):
|
|
|
2290
2250
|
return client.search_on_datasets(command_dict)
|
|
2291
2251
|
case "get_chunk":
|
|
2292
2252
|
return client.get_chunk(command_dict)
|
|
2293
|
-
case "insert_dataset_from_file":
|
|
2294
|
-
return client.insert_dataset_from_file(command_dict)
|
|
2295
|
-
case "insert_metadata_from_file":
|
|
2296
|
-
return client.insert_metadata_from_file(command_dict)
|
|
2297
2253
|
case "update_chunk":
|
|
2298
2254
|
return client.update_chunk(command_dict)
|
|
2299
2255
|
case "set_metadata":
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
http_client.py,sha256=dmgha7IOu5Mh9zixsGT8nUeb9DqphtsXCfjwildj0c4,6486
|
|
2
|
-
parser.py,sha256=mOT1WXdF8WhWKbHfJI1FurR7LIUBur8jExi9qLUWSBc,34439
|
|
3
|
-
ragflow_cli.py,sha256=fjo8zKHiyrgu3KV1jZjRinx0z0vyZIhaYYBeUHEHuiA,12470
|
|
4
|
-
ragflow_client.py,sha256=BxJcjLStQaH9UZ5EKQeywYPl45d-r8OYCTaR39ccMhQ,108986
|
|
5
|
-
user.py,sha256=pxXzjYkQweUVpvRvC_qdV5OACd9SvG5Z4oiT2GAl7O8,3535
|
|
6
|
-
ragflow_cli_myfbee_test-0.27.2.dev0.dist-info/METADATA,sha256=C5Nn-jjVboXfucf5aE0Qed1UHZROnQaRGY7S_vnEAN4,6573
|
|
7
|
-
ragflow_cli_myfbee_test-0.27.2.dev0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
8
|
-
ragflow_cli_myfbee_test-0.27.2.dev0.dist-info/entry_points.txt,sha256=rR-6pSN9myKV0cJq0U0C_g2qsMHxviYJwdERj1mC1tY,49
|
|
9
|
-
ragflow_cli_myfbee_test-0.27.2.dev0.dist-info/top_level.txt,sha256=WFyNpng93LW1S-ZnHJ6cFbk0YNUQYJqOjqHk2F2IWAw,51
|
|
10
|
-
ragflow_cli_myfbee_test-0.27.2.dev0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|