Quellcode durchsuchen

意图识别&训练语料(update)

liangxunge vor 3 Monaten
Ursprung
Commit
26d92e683c
1 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
  1. 6 6
      api/services/intention_service.py

+ 6 - 6
api/services/intention_service.py

@@ -127,8 +127,8 @@ class IntentionService:
         return intention
 
     @staticmethod
-    def update_intention(id: str, args: dict) -> Intention:
-        intention: Optional[Intention] = IntentionService.get_intention(id)
+    def update_intention(intention_id: str, args: dict) -> Intention:
+        intention: Optional[Intention] = IntentionService.get_intention(intention_id)
         if not intention:
             raise NotFound("Intention not found")
 
@@ -156,8 +156,8 @@ class IntentionService:
         return intention
 
     @staticmethod
-    def delete_intention(id: str):
-        intention: Optional[Intention] = IntentionService.get_intention(id)
+    def delete_intention(intention_id: str):
+        intention: Optional[Intention] = IntentionService.get_intention(intention_id)
         if not intention:
             raise NotFound("Intention not found")
 
@@ -176,8 +176,8 @@ class IntentionService:
         return intention
 
     @staticmethod
-    def get_intention(id: str) -> Optional[Intention]:
-        intention: Optional[Intention] = Intention.query.filter(Intention.id == id).first()
+    def get_intention(intention_id: str) -> Optional[Intention]:
+        intention: Optional[Intention] = Intention.query.filter(Intention.id == intention_id).first()
         return intention
 
     @staticmethod