diff --git a/apps/knowledge/api/document.py b/apps/knowledge/api/document.py index 6ced11c6c31..8ba9d3b4fd3 100644 --- a/apps/knowledge/api/document.py +++ b/apps/knowledge/api/document.py @@ -20,28 +20,6 @@ def get_parameters(): location='path', required=True, ), - - OpenApiParameter( - name="limit", - description="分段长度", - type=OpenApiTypes.INT, - location='query', - required=False, - ), - OpenApiParameter( - name="patterns", - description="分段正则列表", - type=OpenApiTypes.STR, - location='query', - required=False, - ), - OpenApiParameter( - name="with_filter", - description="是否清除特殊字符", - type=OpenApiTypes.BOOL, - location='query', - required=False, - ), ] @staticmethod @@ -53,6 +31,18 @@ def get_request(): 'file': { 'type': 'string', 'format': 'binary' # Tells Swagger it's a file + }, + 'limit': { + 'type': 'integer', + 'description': '分段长度' + }, + 'patterns': { + 'type': 'string', + 'description': '分段正则列表' + }, + 'with_filter': { + 'type': 'boolean', + 'description': '是否清除特殊字符' } } }