mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-05 11:01:09 +00:00
feat(core): Support multi round conversation operator (#986)
This commit is contained in:
@@ -33,12 +33,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"is_executing": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"os.environ[\"OPENAI_API_KEY\"] = \"sk-ElhG3036tcvECTOYO9nHqAkUIWtqT55JXs1cTjODz1bnUQDz\"\n",
|
||||
"os.environ[\"OPENAI_API_BASE\"] = \"https://api.chatanywhere.tech/v1\""
|
||||
"# Set your api key and api base url\n",
|
||||
"# os.environ[\"OPENAI_API_KEY\"] = \"Your API\"\n",
|
||||
"# os.environ[\"OPENAI_API_BASE\"] = \"https://api.openai.com/v1\""
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -50,12 +53,12 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[33mUser\u001b[0m (to plan_manager)-[]:\n",
|
||||
"\u001B[33mUser\u001B[0m (to plan_manager)-[]:\n",
|
||||
"\n",
|
||||
"\"Obtain simple information about issues in the repository 'eosphoros-ai/DB-GPT' in the past three days and analyze the data. Create a Markdown table grouped by day and status.\"\n",
|
||||
"\n",
|
||||
"--------------------------------------------------------------------------------\n",
|
||||
"\u001b[33mplan_manager\u001b[0m (to Planner)-[]:\n",
|
||||
"\u001B[33mplan_manager\u001B[0m (to Planner)-[]:\n",
|
||||
"\n",
|
||||
"\"Obtain simple information about issues in the repository 'eosphoros-ai/DB-GPT' in the past three days and analyze the data. Create a Markdown table grouped by day and status.\"\n",
|
||||
"\n",
|
||||
@@ -72,15 +75,15 @@
|
||||
" \"content\": \"Write a Python script to process the retrieved issues data to group them by creation date and status. Then, format the grouped data into a Markdown table.\",\n",
|
||||
" \"rely\": \"1\"\n",
|
||||
"}]\n",
|
||||
"\u001b[33mPlanner\u001b[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\u001B[33mPlanner\u001B[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\n",
|
||||
"\"[{\\n \\\"serial_number\\\": \\\"1\\\",\\n \\\"agent\\\": \\\"CodeEngineer\\\",\\n \\\"content\\\": \\\"Write a Python script to use the GitHub API to retrieve issues from the 'eosphoros-ai/DB-GPT' repository that were created in the past three days. The script should extract the issue's creation date and status.\\\",\\n \\\"rely\\\": \\\"\\\"\\n},\\n{\\n \\\"serial_number\\\": \\\"2\\\",\\n \\\"agent\\\": \\\"CodeEngineer\\\",\\n \\\"content\\\": \\\"Write a Python script to process the retrieved issues data to group them by creation date and status. Then, format the grouped data into a Markdown table.\\\",\\n \\\"rely\\\": \\\"1\\\"\\n}]\"\n",
|
||||
"\u001b[32m>>>>>>>>Planner Review info: \n",
|
||||
" Pass.None\u001b[0m\n",
|
||||
"\u001b[34m>>>>>>>>Planner Action report: \n",
|
||||
"\u001B[32m>>>>>>>>Planner Review info: \n",
|
||||
" Pass.None\u001B[0m\n",
|
||||
"\u001B[34m>>>>>>>>Planner Action report: \n",
|
||||
"execution succeeded,\n",
|
||||
"1,Write a Python script to use the GitHub API to retrieve issues from the 'eosphoros-ai/DB-GPT' repository that were created in the past three days. The script should extract the issue's creation date and status.\n",
|
||||
"2,Write a Python script to process the retrieved issues data to group them by creation date and status. Then, format the grouped data into a Markdown table.\u001b[0m\n",
|
||||
"2,Write a Python script to process the retrieved issues data to group them by creation date and status. Then, format the grouped data into a Markdown table.\u001B[0m\n",
|
||||
"\n",
|
||||
"--------------------------------------------------------------------------------\n"
|
||||
]
|
||||
@@ -96,7 +99,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[33mplan_manager\u001b[0m (to CodeEngineer)-[]:\n",
|
||||
"\u001B[33mplan_manager\u001B[0m (to CodeEngineer)-[]:\n",
|
||||
"\n",
|
||||
"\"Write a Python script to use the GitHub API to retrieve issues from the 'eosphoros-ai/DB-GPT' repository that were created in the past three days. The script should extract the issue's creation date and status.\"\n",
|
||||
"\n",
|
||||
@@ -141,14 +144,14 @@
|
||||
"```\n",
|
||||
"\n",
|
||||
"When you run this script, it will print out the creation date and status of issues from the 'eosphoros-ai/DB-GPT' repository that were created in the past three days. Make sure to have internet access while running the script as it needs to make requests to the GitHub API.\n",
|
||||
"\u001b[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is python)...\u001b[0m\n",
|
||||
"\u001b[33mCodeEngineer\u001b[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\u001B[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is python)...\u001B[0m\n",
|
||||
"\u001B[33mCodeEngineer\u001B[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\n",
|
||||
"\"```python\\n# filename: github_issues.py\\nimport requests\\nfrom datetime import datetime, timedelta\\n\\n# Function to get issues created in the past three days from a GitHub repository\\ndef get_recent_issues(owner, repo):\\n # Calculate the date for three days ago\\n three_days_ago = datetime.utcnow() - timedelta(days=3)\\n # Format the date in ISO 8601 format\\n since = three_days_ago.isoformat()\\n\\n # GitHub API URL for issues of the given repository\\n issues_url = f\\\"https://api.github.com/repos/{owner}/{repo}/issues\\\"\\n \\n # Parameters to get issues created in the past three days\\n params = {\\n 'since': since,\\n 'state': 'all', # Get both open and closed issues\\n }\\n \\n # Send a request to the GitHub API\\n response = requests.get(issues_url, params=params)\\n # Raise an exception if the request was unsuccessful\\n response.raise_for_status()\\n \\n # Parse the JSON response\\n issues = response.json()\\n \\n # Extract and print the creation date and status of each issue\\n for issue in issues:\\n created_at = issue['created_at']\\n state = issue['state']\\n print(f\\\"Issue created at: {created_at}, Status: {state}\\\")\\n\\n# Replace 'owner' and 'repo' with the actual owner and repository name\\nget_recent_issues('eosphoros-ai', 'DB-GPT')\\n```\\n\\nWhen you run this script, it will print out the creation date and status of issues from the 'eosphoros-ai/DB-GPT' repository that were created in the past three days. Make sure to have internet access while running the script as it needs to make requests to the GitHub API.\"\n",
|
||||
"\u001b[32m>>>>>>>>CodeEngineer Review info: \n",
|
||||
" Pass.None\u001b[0m\n",
|
||||
"\u001b[34m>>>>>>>>CodeEngineer Action report: \n",
|
||||
"\u001B[32m>>>>>>>>CodeEngineer Review info: \n",
|
||||
" Pass.None\u001B[0m\n",
|
||||
"\u001B[34m>>>>>>>>CodeEngineer Action report: \n",
|
||||
"execution failed,\n",
|
||||
"exitcode: 1 (execution failed)\n",
|
||||
" \n",
|
||||
@@ -156,7 +159,7 @@
|
||||
" File \"github_issues.py\", line 2, in <module>\n",
|
||||
" import requests\n",
|
||||
"ModuleNotFoundError: No module named 'requests'\n",
|
||||
"\u001b[0m\n",
|
||||
"\u001B[0m\n",
|
||||
"\n",
|
||||
"--------------------------------------------------------------------------------\n"
|
||||
]
|
||||
@@ -172,7 +175,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[33mplan_manager\u001b[0m (to CodeEngineer)-[]:\n",
|
||||
"\u001B[33mplan_manager\u001B[0m (to CodeEngineer)-[]:\n",
|
||||
"\n",
|
||||
"\"exitcode: 1 (execution failed)\\n \\nTraceback (most recent call last):\\n File \\\"github_issues.py\\\", line 2, in <module>\\n import requests\\nModuleNotFoundError: No module named 'requests'\\n\"\n",
|
||||
"\n",
|
||||
@@ -225,17 +228,17 @@
|
||||
"```\n",
|
||||
"\n",
|
||||
"Please run the above Python script after you have installed the `requests` module.\n",
|
||||
"\u001b[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is sh)...\u001b[0m\n",
|
||||
"\u001b[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 1 (inferred language is python)...\u001b[0m\n",
|
||||
"\u001B[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is sh)...\u001B[0m\n",
|
||||
"\u001B[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 1 (inferred language is python)...\u001B[0m\n",
|
||||
"un_stream ai response: False\n",
|
||||
"\u001b[33mCodeEngineer\u001b[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\u001B[33mCodeEngineer\u001B[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\n",
|
||||
"\"It appears that the `requests` module is not installed on your system. You can install it using `pip`, the Python package manager. Here's the command to install the `requests` module:\\n\\n```sh\\npip install requests\\n```\\n\\nAfter installing the `requests` module, you can try running the script again. Here is the complete script including the installation of the `requests` module:\\n\\n```python\\n# filename: github_issues.py\\nimport requests\\nfrom datetime import datetime, timedelta\\n\\n# Function to get issues created in the past three days from a GitHub repository\\ndef get_recent_issues(owner, repo):\\n # Calculate the date for three days ago\\n three_days_ago = datetime.utcnow() - timedelta(days=3)\\n # Format the date in ISO 8601 format\\n since = three_days_ago.isoformat()\\n\\n # GitHub API URL for issues of the given repository\\n issues_url = f\\\"https://api.github.com/repos/{owner}/{repo}/issues\\\"\\n \\n # Parameters to get issues created in the past three days\\n params = {\\n 'since': since,\\n 'state': 'all', # Get both open and closed issues\\n }\\n \\n # Send a request to the GitHub API\\n response = requests.get(issues_url, params=params)\\n # Raise an exception if the request was unsuccessful\\n response.raise_for_status()\\n \\n # Parse the JSON response\\n issues = response.json()\\n \\n # Extract and print the creation date and status of each issue\\n for issue in issues:\\n created_at = issue['created_at']\\n state = issue['state']\\n print(f\\\"Issue created at: {created_at}, Status: {state}\\\")\\n\\n# Replace 'owner' and 'repo' with the actual owner and repository name\\nget_recent_issues('eosphoros-ai', 'DB-GPT')\\n```\\n\\nPlease run the above Python script after you have installed the `requests` module.\"\n",
|
||||
"\u001b[32m>>>>>>>>CodeEngineer Review info: \n",
|
||||
" Pass.None\u001b[0m\n",
|
||||
"\u001b[34m>>>>>>>>CodeEngineer Action report: \n",
|
||||
"\u001B[32m>>>>>>>>CodeEngineer Review info: \n",
|
||||
" Pass.None\u001B[0m\n",
|
||||
"\u001B[34m>>>>>>>>CodeEngineer Action report: \n",
|
||||
"execution succeeded,\n",
|
||||
"\n",
|
||||
"Collecting requests\n",
|
||||
@@ -302,7 +305,7 @@
|
||||
"Issue created at: 2023-10-26T01:45:37Z, Status: open\n",
|
||||
"Issue created at: 2023-08-30T06:02:32Z, Status: closed\n",
|
||||
"Issue created at: 2023-06-18T01:11:22Z, Status: open\n",
|
||||
"\u001b[0m\n",
|
||||
"\u001B[0m\n",
|
||||
"\n",
|
||||
"--------------------------------------------------------------------------------\n"
|
||||
]
|
||||
@@ -318,7 +321,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[33mplan_manager\u001b[0m (to CodeEngineer)-[]:\n",
|
||||
"\u001B[33mplan_manager\u001B[0m (to CodeEngineer)-[]:\n",
|
||||
"\n",
|
||||
"\"The execution result of the code you wrote is judged as not answering the task question. Please re-understand and complete the task.\"\n",
|
||||
"\n",
|
||||
@@ -376,15 +379,15 @@
|
||||
"```\n",
|
||||
"\n",
|
||||
"When you run this script, it will check for the `requests` module and install it if necessary. Then it will retrieve the issues from the 'eosphoros-ai/DB-GPT' repository created in the past three days and print their creation date and status.\n",
|
||||
"\u001b[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is python)...\u001b[0m\n",
|
||||
"\u001B[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is python)...\u001B[0m\n",
|
||||
"un_stream ai response: False\n",
|
||||
"\u001b[33mCodeEngineer\u001b[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\u001B[33mCodeEngineer\u001B[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\n",
|
||||
"\"I apologize for the inconvenience. Let me provide you with a Python script that includes a check to ensure the `requests` module is installed. If it's not installed, the script will attempt to install it using `pip`. Please run the following Python script:\\n\\n```python\\n# filename: github_issues.py\\nimport subprocess\\nimport pkg_resources\\nfrom datetime import datetime, timedelta\\n\\n# Ensure the 'requests' package is installed\\nrequired_packages = {'requests'}\\ninstalled_packages = {pkg.key for pkg in pkg_resources.working_set}\\nmissing_packages = required_packages - installed_packages\\n\\nif missing_packages:\\n subprocess.check_call(['pip', 'install', *missing_packages])\\n\\nimport requests\\n\\n# Function to get issues created in the past three days from a GitHub repository\\ndef get_recent_issues(owner, repo):\\n # Calculate the date for three days ago\\n three_days_ago = datetime.utcnow() - timedelta(days=3)\\n # Format the date in ISO 8601 format\\n since = three_days_ago.isoformat()\\n\\n # GitHub API URL for issues of the given repository\\n issues_url = f\\\"https://api.github.com/repos/{owner}/{repo}/issues\\\"\\n \\n # Parameters to get issues created in the past three days\\n params = {\\n 'since': since,\\n 'state': 'all', # Get both open and closed issues\\n }\\n \\n # Send a request to the GitHub API\\n response = requests.get(issues_url, params=params)\\n # Raise an exception if the request was unsuccessful\\n response.raise_for_status()\\n \\n # Parse the JSON response\\n issues = response.json()\\n \\n # Extract and print the creation date and status of each issue\\n for issue in issues:\\n created_at = issue['created_at']\\n state = issue['state']\\n print(f\\\"Issue created at: {created_at}, Status: {state}\\\")\\n\\n# Replace 'owner' and 'repo' with the actual owner and repository name\\nget_recent_issues('eosphoros-ai', 'DB-GPT')\\n```\\n\\nWhen you run this script, it will check for the `requests` module and install it if necessary. Then it will retrieve the issues from the 'eosphoros-ai/DB-GPT' repository created in the past three days and print their creation date and status.\"\n",
|
||||
"\u001b[32m>>>>>>>>CodeEngineer Review info: \n",
|
||||
" Pass.None\u001b[0m\n",
|
||||
"\u001b[34m>>>>>>>>CodeEngineer Action report: \n",
|
||||
"\u001B[32m>>>>>>>>CodeEngineer Review info: \n",
|
||||
" Pass.None\u001B[0m\n",
|
||||
"\u001B[34m>>>>>>>>CodeEngineer Action report: \n",
|
||||
"execution succeeded,\n",
|
||||
"\n",
|
||||
"/workspace/github_issues.py:3: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html\n",
|
||||
@@ -421,7 +424,7 @@
|
||||
"Issue created at: 2023-10-26T01:45:37Z, Status: open\n",
|
||||
"Issue created at: 2023-08-30T06:02:32Z, Status: closed\n",
|
||||
"Issue created at: 2023-06-18T01:11:22Z, Status: open\n",
|
||||
"\u001b[0m\n",
|
||||
"\u001B[0m\n",
|
||||
"\n",
|
||||
"--------------------------------------------------------------------------------\n"
|
||||
]
|
||||
@@ -437,7 +440,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[33mplan_manager\u001b[0m (to CodeEngineer)-[]:\n",
|
||||
"\u001B[33mplan_manager\u001B[0m (to CodeEngineer)-[]:\n",
|
||||
"\n",
|
||||
"\"The execution result of the code you wrote is judged as not answering the task question. Please re-understand and complete the task.\"\n",
|
||||
"\n",
|
||||
@@ -484,15 +487,15 @@
|
||||
"```\n",
|
||||
"\n",
|
||||
"This script retrieves all issues from the specified repository and then filters them based on the creation date to find the ones that were created in the past three days. It then prints the creation date and status of each issue that meets the criteria. Please execute this updated script.\n",
|
||||
"\u001b[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is python)...\u001b[0m\n",
|
||||
"\u001B[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is python)...\u001B[0m\n",
|
||||
"un_stream ai response: True\n",
|
||||
"\u001b[33mCodeEngineer\u001b[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\u001B[33mCodeEngineer\u001B[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\n",
|
||||
"\"I apologize for the oversight. Let's try a different approach to ensure we get the issues created in the past three days from the 'eosphoros-ai/DB-GPT' repository. I will provide you with an updated Python script that correctly retrieves and filters the issues based on their creation date.\\n\\n```python\\n# filename: github_issues.py\\nimport requests\\nfrom datetime import datetime, timedelta\\n\\n# Function to get issues created in the past three days from a GitHub repository\\ndef get_recent_issues(owner, repo):\\n # Calculate the date for three days ago\\n three_days_ago = datetime.utcnow() - timedelta(days=3)\\n # Format the date in ISO 8601 format\\n since = three_days_ago.isoformat()\\n\\n # GitHub API URL for issues of the given repository\\n issues_url = f\\\"https://api.github.com/repos/{owner}/{repo}/issues\\\"\\n\\n # Parameters to get all issues, GitHub API does not allow filtering by creation date directly\\n params = {\\n 'state': 'all', # Get both open and closed issues\\n }\\n\\n # Send a request to the GitHub API\\n response = requests.get(issues_url, params=params)\\n # Raise an exception if the request was unsuccessful\\n response.raise_for_status()\\n\\n # Parse the JSON response\\n issues = response.json()\\n\\n # Filter and print the creation date and status of each issue created in the past three days\\n for issue in issues:\\n created_at = datetime.strptime(issue['created_at'], \\\"%Y-%m-%dT%H:%M:%SZ\\\")\\n if created_at > three_days_ago:\\n state = issue['state']\\n print(f\\\"Issue created at: {created_at}, Status: {state}\\\")\\n\\n# Replace 'owner' and 'repo' with the actual owner and repository name\\nget_recent_issues('eosphoros-ai', 'DB-GPT')\\n```\\n\\nThis script retrieves all issues from the specified repository and then filters them based on the creation date to find the ones that were created in the past three days. It then prints the creation date and status of each issue that meets the criteria. Please execute this updated script.\"\n",
|
||||
"\u001b[32m>>>>>>>>CodeEngineer Review info: \n",
|
||||
" Pass.None\u001b[0m\n",
|
||||
"\u001b[34m>>>>>>>>CodeEngineer Action report: \n",
|
||||
"\u001B[32m>>>>>>>>CodeEngineer Review info: \n",
|
||||
" Pass.None\u001B[0m\n",
|
||||
"\u001B[34m>>>>>>>>CodeEngineer Action report: \n",
|
||||
"execution succeeded,\n",
|
||||
"\n",
|
||||
"/workspace/github_issues.py:8: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).\n",
|
||||
@@ -510,7 +513,7 @@
|
||||
"Issue created at: 2023-12-25 08:35:48, Status: open\n",
|
||||
"Issue created at: 2023-12-25 08:34:13, Status: closed\n",
|
||||
"Issue created at: 2023-12-25 06:33:37, Status: closed\n",
|
||||
"\u001b[0m\n",
|
||||
"\u001B[0m\n",
|
||||
"\n",
|
||||
"--------------------------------------------------------------------------------\n"
|
||||
]
|
||||
@@ -526,7 +529,7 @@
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[33mplan_manager\u001b[0m (to CodeEngineer)-[]:\n",
|
||||
"\u001B[33mplan_manager\u001B[0m (to CodeEngineer)-[]:\n",
|
||||
"\n",
|
||||
"\"Read the result data of the dependent steps in the above historical message to complete the current goal:Write a Python script to process the retrieved issues data to group them by creation date and status. Then, format the grouped data into a Markdown table.\"\n",
|
||||
"\n",
|
||||
@@ -573,15 +576,15 @@
|
||||
"```\n",
|
||||
"\n",
|
||||
"When you run this script, it will print out a Markdown table with the number of open and closed issues grouped by their creation dates.\n",
|
||||
"\u001b[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is python)...\u001b[0m\n",
|
||||
"\u001B[31m\n",
|
||||
">>>>>>>> EXECUTING CODE BLOCK 0 (inferred language is python)...\u001B[0m\n",
|
||||
"un_stream ai response: True\n",
|
||||
"\u001b[33mCodeEngineer\u001b[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\u001B[33mCodeEngineer\u001B[0m (to plan_manager)-[gpt-4-vision-preview]:\n",
|
||||
"\n",
|
||||
"\"```python\\n# Let's process the retrieved issues data to group them by creation date and status.\\n# Then, we will format the grouped data into a Markdown table.\\n\\n# The data from the previous step\\nissues_data = [\\n {\\\"created_at\\\": \\\"2023-12-27 03:20:12\\\", \\\"status\\\": \\\"open\\\"},\\n {\\\"created_at\\\": \\\"2023-12-26 16:13:42\\\", \\\"status\\\": \\\"open\\\"},\\n {\\\"created_at\\\": \\\"2023-12-26 10:23:43\\\", \\\"status\\\": \\\"open\\\"},\\n {\\\"created_at\\\": \\\"2023-12-26 07:25:37\\\", \\\"status\\\": \\\"closed\\\"},\\n {\\\"created_at\\\": \\\"2023-12-26 05:01:26\\\", \\\"status\\\": \\\"closed\\\"},\\n {\\\"created_at\\\": \\\"2023-12-26 03:54:15\\\", \\\"status\\\": \\\"open\\\"},\\n {\\\"created_at\\\": \\\"2023-12-26 02:19:48\\\", \\\"status\\\": \\\"open\\\"},\\n {\\\"created_at\\\": \\\"2023-12-25 12:26:40\\\", \\\"status\\\": \\\"open\\\"},\\n {\\\"created_at\\\": \\\"2023-12-25 12:00:52\\\", \\\"status\\\": \\\"open\\\"},\\n {\\\"created_at\\\": \\\"2023-12-25 08:36:56\\\", \\\"status\\\": \\\"open\\\"},\\n {\\\"created_at\\\": \\\"2023-12-25 08:35:48\\\", \\\"status\\\": \\\"open\\\"},\\n {\\\"created_at\\\": \\\"2023-12-25 08:34:13\\\", \\\"status\\\": \\\"closed\\\"},\\n {\\\"created_at\\\": \\\"2023-12-25 06:33:37\\\", \\\"status\\\": \\\"closed\\\"},\\n]\\n\\n# Grouping the issues by creation date and status\\nfrom collections import defaultdict\\ngrouped_issues = defaultdict(lambda: defaultdict(list))\\n\\nfor issue in issues_data:\\n date = issue[\\\"created_at\\\"].split(' ')[0] # Extract just the date part\\n grouped_issues[date][issue[\\\"status\\\"]].append(issue)\\n\\n# Format the grouped data into a Markdown table\\nmarkdown_table = \\\"Date | Open Issues | Closed Issues\\\\n\\\"\\nmarkdown_table += \\\"--- | --- | ---\\\\n\\\"\\n\\nfor date, statuses in sorted(grouped_issues.items()):\\n open_issues = len(statuses[\\\"open\\\"]) if \\\"open\\\" in statuses else 0\\n closed_issues = len(statuses[\\\"closed\\\"]) if \\\"closed\\\" in statuses else 0\\n markdown_table += f\\\"{date} | {open_issues} | {closed_issues}\\\\n\\\"\\n\\nprint(markdown_table)\\n```\\n\\nWhen you run this script, it will print out a Markdown table with the number of open and closed issues grouped by their creation dates.\"\n",
|
||||
"\u001b[32m>>>>>>>>CodeEngineer Review info: \n",
|
||||
" Pass.None\u001b[0m\n",
|
||||
"\u001b[34m>>>>>>>>CodeEngineer Action report: \n",
|
||||
"\u001B[32m>>>>>>>>CodeEngineer Review info: \n",
|
||||
" Pass.None\u001B[0m\n",
|
||||
"\u001B[34m>>>>>>>>CodeEngineer Action report: \n",
|
||||
"execution succeeded,\n",
|
||||
"\n",
|
||||
"Date | Open Issues | Closed Issues\n",
|
||||
@@ -590,17 +593,17 @@
|
||||
"2023-12-26 | 4 | 2\n",
|
||||
"2023-12-27 | 1 | 0\n",
|
||||
"\n",
|
||||
"\u001b[0m\n",
|
||||
"\u001B[0m\n",
|
||||
"\n",
|
||||
"--------------------------------------------------------------------------------\n",
|
||||
"\u001b[33mplan_manager\u001b[0m (to User)-[None]:\n",
|
||||
"\u001B[33mplan_manager\u001B[0m (to User)-[None]:\n",
|
||||
"\n",
|
||||
"\"Obtain simple information about issues in the repository 'eosphoros-ai/DB-GPT' in the past three days and analyze the data. Create a Markdown table grouped by day and status.\"\n",
|
||||
"\u001b[32m>>>>>>>>plan_manager Review info: \n",
|
||||
" Pass.None\u001b[0m\n",
|
||||
"\u001b[34m>>>>>>>>plan_manager Action report: \n",
|
||||
"\u001B[32m>>>>>>>>plan_manager Review info: \n",
|
||||
" Pass.None\u001B[0m\n",
|
||||
"\u001B[34m>>>>>>>>plan_manager Action report: \n",
|
||||
"execution succeeded,\n",
|
||||
"TERMINATE\u001b[0m\n",
|
||||
"TERMINATE\u001B[0m\n",
|
||||
"\n",
|
||||
"--------------------------------------------------------------------------------\n",
|
||||
"```agent-messages\n",
|
||||
|
Reference in New Issue
Block a user