jyong преди 2 месеца
родител
ревизия
101d6504fb

+ 2
- 5
api/controllers/console/datasets/rag_pipeline/datasource_auth.py Целия файл

@@ -1,10 +1,7 @@
from fastapi.encoders import jsonable_encoder
from flask import make_response, redirect, request
from flask_login import current_user # type: ignore
from flask_restful import ( # type: ignore
Resource, # type: ignore
reqparse,
)
from flask_login import current_user
from flask_restx import Resource, reqparse
from werkzeug.exceptions import Forbidden, NotFound

from configs import dify_config

+ 1
- 1
api/controllers/console/datasets/rag_pipeline/datasource_content_preview.py Целия файл

@@ -1,4 +1,4 @@
from flask_restful import ( # type: ignore
from flask_restx import ( # type: ignore
Resource, # type: ignore
reqparse,
)

+ 1
- 1
api/controllers/console/datasets/rag_pipeline/rag_pipeline.py Целия файл

@@ -1,7 +1,7 @@
import logging

from flask import request
from flask_restful import Resource, reqparse
from flask_restx import Resource, reqparse
from sqlalchemy.orm import Session

from controllers.console import api

+ 1
- 1
api/controllers/console/datasets/rag_pipeline/rag_pipeline_datasets.py Целия файл

@@ -1,5 +1,5 @@
from flask_login import current_user # type: ignore # type: ignore
from flask_restful import Resource, marshal, reqparse # type: ignore
from flask_restx import Resource, marshal, reqparse # type: ignore
from werkzeug.exceptions import Forbidden

import services

+ 1
- 1
api/controllers/console/datasets/rag_pipeline/rag_pipeline_draft_variable.py Целия файл

@@ -2,7 +2,7 @@ import logging
from typing import Any, NoReturn

from flask import Response
from flask_restful import Resource, fields, inputs, marshal, marshal_with, reqparse
from flask_restx import Resource, fields, inputs, marshal, marshal_with, reqparse
from sqlalchemy.orm import Session
from werkzeug.exceptions import Forbidden


+ 1
- 1
api/controllers/console/datasets/rag_pipeline/rag_pipeline_import.py Целия файл

@@ -1,7 +1,7 @@
from typing import cast

from flask_login import current_user # type: ignore
from flask_restful import Resource, marshal_with, reqparse # type: ignore
from flask_restx import Resource, marshal_with, reqparse # type: ignore
from sqlalchemy.orm import Session
from werkzeug.exceptions import Forbidden


+ 2
- 2
api/controllers/console/datasets/rag_pipeline/rag_pipeline_workflow.py Целия файл

@@ -3,8 +3,8 @@ import logging
from typing import cast

from flask import abort, request
from flask_restful import Resource, inputs, marshal_with, reqparse # type: ignore # type: ignore
from flask_restful.inputs import int_range # type: ignore
from flask_restx import Resource, inputs, marshal_with, reqparse # type: ignore # type: ignore
from flask_restx.inputs import int_range # type: ignore
from sqlalchemy.orm import Session
from werkzeug.exceptions import Forbidden, InternalServerError, NotFound


+ 2
- 2
api/core/app/entities/app_invoke_entities.py Целия файл

@@ -1,5 +1,5 @@
from collections.abc import Mapping, Sequence
from enum import Enum
from enum import Enum, StrEnum
from typing import Any, Optional

from pydantic import BaseModel, ConfigDict, Field, ValidationInfo, field_validator
@@ -11,7 +11,7 @@ from core.file import File, FileUploadConfig
from core.model_runtime.entities.model_entities import AIModelEntity


class InvokeFrom(Enum):
class InvokeFrom(StrEnum):
"""
Invoke From.
"""

+ 1
- 1
api/fields/rag_pipeline_fields.py Целия файл

@@ -1,4 +1,4 @@
from flask_restful import fields # type: ignore
from flask_restx import fields # type: ignore

from fields.workflow_fields import workflow_partial_fields
from libs.helper import AppIconUrlField, TimestampField

Loading…
Отказ
Запис