diff --git a/superagi/agent/output_handler.py b/superagi/agent/output_handler.py index 5a5f5b8eb..1fdeb7531 100644 --- a/superagi/agent/output_handler.py +++ b/superagi/agent/output_handler.py @@ -151,7 +151,7 @@ def handle(self, session, assistant_reply): for task in reversed(tasks): self.task_queue.add_task(task) if len(tasks) > 0: - #logger.info("Adding task to queue: " + str(tasks)) + logger.info("Adding task to queue: " + str(tasks)) agent_execution = AgentExecution.find_by_id(session, self.agent_execution_id) for task in tasks: agent_execution_feed = AgentExecutionFeed(agent_execution_id=self.agent_execution_id, @@ -182,7 +182,7 @@ def handle(self, session, assistant_reply): for task in reversed(tasks): self.task_queue.add_task(task) if len(tasks) > 0: - #logger.info("Tasks reprioritized in order: " + str(tasks)) + logger.info("Tasks reprioritized in order: " + str(tasks)) status = "COMPLETE" if len(self.task_queue.get_tasks()) == 0 else "PENDING" session.commit() return TaskExecutorResponse(status=status, retry=False) diff --git a/superagi/helper/github_helper.py b/superagi/helper/github_helper.py index 6536801f6..5c1c7ef9e 100644 --- a/superagi/helper/github_helper.py +++ b/superagi/helper/github_helper.py @@ -116,10 +116,10 @@ def sync_branch(self, repository_owner, repository_name, base_branch, head_branc } response = requests.patch(head_branch_url, json=data, headers=headers) if response.status_code == 200: - #logger.info( + logger.info( f'Successfully synced {self.github_username}:{head_branch} branch with {repository_owner}:{base_branch}') else: - #logger.info('Failed to sync the branch. Check your inputs and permissions.') + logger.info('Failed to sync the branch. Check your inputs and permissions.') def make_fork(self, repository_owner, repository_name, base_branch, headers): """ @@ -140,7 +140,7 @@ def make_fork(self, repository_owner, repository_name, base_branch, headers): #logger.info('Fork created successfully.') self.sync_branch(repository_owner, repository_name, base_branch, base_branch, headers) else: - #logger.info('Failed to create the fork:', fork_response.json()['message']) + logger.info('Failed to create the fork:', fork_response.json()['message']) return fork_response.status_code @@ -166,11 +166,11 @@ def create_branch(self, repository_name, base_branch, head_branch, headers): } branch_response = requests.post(branch_url, json=branch_params, headers=headers) if branch_response.status_code == 201: - #logger.info('Branch created successfully.') + logger.info('Branch created successfully.') elif branch_response.status_code == 422: - #logger.info('Branch new-file already exists, making commits to new-file branch') + logger.info('Branch new-file already exists, making commits to new-file branch') else: - #logger.info('Failed to create branch:', branch_response.json()['message']) + logger.info('Failed to create branch:', branch_response.json()['message']) return branch_response.status_code @@ -198,9 +198,9 @@ def delete_file(self, repository_name, file_name, folder_path, commit_message, h } file_response = requests.delete(file_url, json=file_params, headers=headers) if file_response.status_code == 200: - #logger.info('File or folder delete successfully.') + logger.info('File or folder delete successfully.') else: - #logger.info('Failed to Delete file or folder:', file_response.json()) + logger.info('Failed to Delete file or folder:', file_response.json()) return file_response.status_code @@ -232,11 +232,11 @@ def add_file(self, repository_owner, repository_name, file_name, folder_path, he } file_response = requests.put(file_url, json=file_params, headers=headers) if file_response.status_code == 201: - #logger.info('File content uploaded successfully.') + logger.info('File content uploaded successfully.') elif file_response.status_code == 422: - #logger.info('File already exists') + logger.info('File already exists') else: - #logger.info('Failed to upload file content:', file_response.json()['message']) + logger.info('Failed to upload file content:', file_response.json()['message']) return file_response.status_code @@ -265,11 +265,11 @@ def create_pull_request(self, repository_owner, repository_name, head_branch, ba pr_response = requests.post(pull_request_url, json=pull_request_params, headers=headers) if pr_response.status_code == 201: - #logger.info('Pull request created successfully.') + logger.info('Pull request created successfully.') elif pr_response.status_code == 422: - #logger.info('Added changes to already existing pull request') + logger.info('Added changes to already existing pull request') else: - #logger.info('Failed to create pull request:', pr_response.json()['message']) + logger.info('Failed to create pull request:', pr_response.json()['message']) return pr_response.status_code diff --git a/superagi/helper/validate_csv.py b/superagi/helper/validate_csv.py index 00ac772ed..72001e68b 100644 --- a/superagi/helper/validate_csv.py +++ b/superagi/helper/validate_csv.py @@ -23,4 +23,4 @@ def correct_csv_encoding(file_path): df.to_csv(file_path, encoding='utf-8', index=False) #logger.info("File is converted to utf-8 encoding.") else: - #logger.info("File is already in utf-8 encoding.") \ No newline at end of file + logger.info("File is already in utf-8 encoding.") \ No newline at end of file diff --git a/superagi/tools/code/improve_code.py b/superagi/tools/code/improve_code.py index f57f77a05..9f7360775 100644 --- a/superagi/tools/code/improve_code.py +++ b/superagi/tools/code/improve_code.py @@ -82,12 +82,12 @@ def _execute(self) -> str: # Extract the response first response = result.get('response') if not response: - #logger.info("RESPONSE NOT AVAILABLE") + logger.info("RESPONSE NOT AVAILABLE") # Now extract the choices from response choices = response.get('choices') if not choices: - #logger.info("CHOICES NOT AVAILABLE") + logger.info("CHOICES NOT AVAILABLE") # Now you can safely extract the message content improved_content = choices[0]["message"]["content"]