|
19 | 19 | from controllers.console.wraps import (
|
20 | 20 | account_initialization_required,
|
21 | 21 | cloud_edition_billing_knowledge_limit_check,
|
| 22 | + cloud_edition_billing_rate_limit_check, |
22 | 23 | cloud_edition_billing_resource_check,
|
23 | 24 | setup_required,
|
24 | 25 | )
|
@@ -106,6 +107,7 @@ def get(self, dataset_id, document_id):
|
106 | 107 | @setup_required
|
107 | 108 | @login_required
|
108 | 109 | @account_initialization_required
|
| 110 | + @cloud_edition_billing_rate_limit_check("knowledge") |
109 | 111 | def delete(self, dataset_id, document_id):
|
110 | 112 | # check dataset
|
111 | 113 | dataset_id = str(dataset_id)
|
@@ -137,6 +139,7 @@ class DatasetDocumentSegmentApi(Resource):
|
137 | 139 | @login_required
|
138 | 140 | @account_initialization_required
|
139 | 141 | @cloud_edition_billing_resource_check("vector_space")
|
| 142 | + @cloud_edition_billing_rate_limit_check("knowledge") |
140 | 143 | def patch(self, dataset_id, document_id, action):
|
141 | 144 | dataset_id = str(dataset_id)
|
142 | 145 | dataset = DatasetService.get_dataset(dataset_id)
|
@@ -192,6 +195,7 @@ class DatasetDocumentSegmentAddApi(Resource):
|
192 | 195 | @account_initialization_required
|
193 | 196 | @cloud_edition_billing_resource_check("vector_space")
|
194 | 197 | @cloud_edition_billing_knowledge_limit_check("add_segment")
|
| 198 | + @cloud_edition_billing_rate_limit_check("knowledge") |
195 | 199 | def post(self, dataset_id, document_id):
|
196 | 200 | # check dataset
|
197 | 201 | dataset_id = str(dataset_id)
|
@@ -242,6 +246,7 @@ class DatasetDocumentSegmentUpdateApi(Resource):
|
242 | 246 | @login_required
|
243 | 247 | @account_initialization_required
|
244 | 248 | @cloud_edition_billing_resource_check("vector_space")
|
| 249 | + @cloud_edition_billing_rate_limit_check("knowledge") |
245 | 250 | def patch(self, dataset_id, document_id, segment_id):
|
246 | 251 | # check dataset
|
247 | 252 | dataset_id = str(dataset_id)
|
@@ -302,6 +307,7 @@ def patch(self, dataset_id, document_id, segment_id):
|
302 | 307 | @setup_required
|
303 | 308 | @login_required
|
304 | 309 | @account_initialization_required
|
| 310 | + @cloud_edition_billing_rate_limit_check("knowledge") |
305 | 311 | def delete(self, dataset_id, document_id, segment_id):
|
306 | 312 | # check dataset
|
307 | 313 | dataset_id = str(dataset_id)
|
@@ -339,6 +345,7 @@ class DatasetDocumentSegmentBatchImportApi(Resource):
|
339 | 345 | @account_initialization_required
|
340 | 346 | @cloud_edition_billing_resource_check("vector_space")
|
341 | 347 | @cloud_edition_billing_knowledge_limit_check("add_segment")
|
| 348 | + @cloud_edition_billing_rate_limit_check("knowledge") |
342 | 349 | def post(self, dataset_id, document_id):
|
343 | 350 | # check dataset
|
344 | 351 | dataset_id = str(dataset_id)
|
@@ -405,6 +412,7 @@ class ChildChunkAddApi(Resource):
|
405 | 412 | @account_initialization_required
|
406 | 413 | @cloud_edition_billing_resource_check("vector_space")
|
407 | 414 | @cloud_edition_billing_knowledge_limit_check("add_segment")
|
| 415 | + @cloud_edition_billing_rate_limit_check("knowledge") |
408 | 416 | def post(self, dataset_id, document_id, segment_id):
|
409 | 417 | # check dataset
|
410 | 418 | dataset_id = str(dataset_id)
|
@@ -503,6 +511,7 @@ def get(self, dataset_id, document_id, segment_id):
|
503 | 511 | @login_required
|
504 | 512 | @account_initialization_required
|
505 | 513 | @cloud_edition_billing_resource_check("vector_space")
|
| 514 | + @cloud_edition_billing_rate_limit_check("knowledge") |
506 | 515 | def patch(self, dataset_id, document_id, segment_id):
|
507 | 516 | # check dataset
|
508 | 517 | dataset_id = str(dataset_id)
|
@@ -546,6 +555,7 @@ class ChildChunkUpdateApi(Resource):
|
546 | 555 | @setup_required
|
547 | 556 | @login_required
|
548 | 557 | @account_initialization_required
|
| 558 | + @cloud_edition_billing_rate_limit_check("knowledge") |
549 | 559 | def delete(self, dataset_id, document_id, segment_id, child_chunk_id):
|
550 | 560 | # check dataset
|
551 | 561 | dataset_id = str(dataset_id)
|
@@ -590,6 +600,7 @@ def delete(self, dataset_id, document_id, segment_id, child_chunk_id):
|
590 | 600 | @login_required
|
591 | 601 | @account_initialization_required
|
592 | 602 | @cloud_edition_billing_resource_check("vector_space")
|
| 603 | + @cloud_edition_billing_rate_limit_check("knowledge") |
593 | 604 | def patch(self, dataset_id, document_id, segment_id, child_chunk_id):
|
594 | 605 | # check dataset
|
595 | 606 | dataset_id = str(dataset_id)
|
|
0 commit comments