diff --git a/backend/app/controllers/step_subtask.py b/backend/app/controllers/step_subtask.py index f664ae76..b8aa464a 100644 --- a/backend/app/controllers/step_subtask.py +++ b/backend/app/controllers/step_subtask.py @@ -40,7 +40,7 @@ def analysis(): appBasePrompt, _ = getServiceBasePrompt(req["app_id"], serviceName) projectInfo, _ = getServiceIntro(req["app_id"], serviceName) projectLib, _ = getServiceLib(req["app_id"], serviceName) - serviceStruct,_ = getServiceStruct(req["app_id"], serviceName) + serviceStruct, _ = getServiceStruct(req["app_id"], serviceName) filesToEdit, success = splitTask(requirementID, newfeature, serviceName, appBasePrompt, projectInfo, projectLib, serviceStruct, req["app_id"]) diff --git a/backend/app/pkgs/knowledge/app_info.py b/backend/app/pkgs/knowledge/app_info.py index dafe9dcb..55dbc861 100644 --- a/backend/app/pkgs/knowledge/app_info.py +++ b/backend/app/pkgs/knowledge/app_info.py @@ -37,14 +37,14 @@ def getServiceBasePrompt(appID, serviceName): apps = Application.get_all_application("", appID) if len(apps) > 0: services = apps[0]["service"] - serviceNameStr = "" + service_names = [] currentServiceStr = "" for service in services: - serviceNameStr += service["name"]+"," + service_names.append(service["name"]) if service["name"] == serviceName: currentServiceStr = "and you are responsible for the development of "+service["name"]+" services. The service uses the "+service["language"]+" language and is developed under the "+service["framework"]+" framework" - serviceNameStr = serviceNameStr.strip() + serviceNameStr = ','.join(service_names) appBasePrompt = "The application consists of "+serviceNameStr+" services, "+currentServiceStr return appBasePrompt, True diff --git a/backend/app/pkgs/prompt/prompt.py b/backend/app/pkgs/prompt/prompt.py index 2a22524a..dae2874e 100644 --- a/backend/app/pkgs/prompt/prompt.py +++ b/backend/app/pkgs/prompt/prompt.py @@ -32,7 +32,7 @@ def splitTask(requirementID, newfeature, serviceName, appBasePrompt, projectInfo else: if "java" in serviceName: obj = SubtaskJavaPro() - if "vue" in serviceName: + elif "vue" in serviceName: obj = SubtaskVuePro() else: obj = SubtaskPro()