r44cx / GPT-Codemaster

Automatic programming by creating Pull Requests from Issues using LLMs
GNU General Public License v3.0
1 stars 0 forks source link

Extend README.md with default repository parameters #4

Closed r44cx closed 1 year ago

github-actions[bot] commented 1 year ago

Hello, GPT-Codemaster here. I'm starting to work on the issue, give me a moment...

Job progress

github-actions[bot] commented 1 year ago

Sending request to the AI using Chat interface

System message:

You are an AI system that does programming tasks by reading the issue specification and modifying the existing code by changing it or adding new code to resolve the user request. You minimize changes to the code and make sure not to modify anything that the user has not requested. Do not remove classes, methods, or fields - only add or modify existing ones. You will be doing the work in steps. The results of your work will be automatically put on Github. Always print the whole source, never the 'The rest of the class remains unchanged' comment

User Request:

The user request: Extend README.md with default repository parameters


Do this in steps:

  1. From a list of files select ones that will be needed to see or modify to program the user request. You will be shown content of those files. You have a limited memory so you will only see the selected ones.
  2. Modify selected existing files one by one
  3. Create needed new files one by one

Here is a hierarchical view of files in the project::

AiProgrammerTests/ChatMessageRoleTests.cs AiProgrammerTests/ClassExtractorTests.cs AiProgrammerTests/DependenciesTest.cs AiProgrammerTests/AiProgrammerTests.csproj AiProgrammerTests/StringExtensionsSubstringSafeTests.cs GithubIssueListener/ListenerEntryPoint.cs GithubIssueListener/IssueListenerInput.cs GithubIssueListener/InputProviderFromEnvironmentVariables.cs GithubIssueListener/SolverExceptionNotifier.cs GithubIssueListener/ISolverExceptionNotifier.cs GithubIssueListener/IssueSolvingStarter.cs GithubIssueListener/IInputProvider.cs GithubIssueListener/GithubIssueListener.csproj AiProgrammer/Core/CodeStatics.cs AiProgrammer/IO/FileContent.cs AiProgrammer/IO/ProjectContentReader.cs AiProgrammer/IO/IProjectContentReader.cs AiProgrammer/IO/FilePath.cs AiProgrammer/AiInterface/IChat.cs AiProgrammer/AiInterface/ICompletions.cs AiProgrammer/AiInterface/ChatCompletions.cs AiProgrammer/Github/PullRequests/PullRequestCreator.cs AiProgrammer/Github/Model/RepoOwner.cs AiProgrammer/Github/Model/IssueInfo.cs AiProgrammer/Github/Model/RepoName.cs AiProgrammer/Github/Model/RepoInfo.cs AiProgrammer/Github/Issues/IssueUrlParser.cs AiProgrammer/Github/Issues/IIssueUrlParser.cs AiProgrammer/Github/IGithubContextClientProvider.cs AiProgrammer/Github/GithubServices.cs AiProgrammer/Github/GithubClientProviderForToken.cs AiProgrammer/Github/GithubContextClientProvider.cs AiProgrammer/Github/IGithubClientProviderForToken.cs AiProgrammer/Extensions/StringExtensions.cs AiProgrammer/Logging/ISolverProgressLogger.cs AiProgrammer/Logging/SolverProgressLoggerInIssue.cs AiProgrammer/Solving/GithubIssue/GithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/InIssueNoChangesNotifier.cs AiProgrammer/Solving/GithubIssue/IGithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/IGithubIssueSolver.cs AiProgrammer/Solving/GithubIssue/IssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/IIssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverWithMethodSelection.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverFileByFile.cs AiProgrammer/Solving/Utils/UnexpectedAiOutputException.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueFileByFile.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueWithMethodSelection.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectMethodsToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepModifyExistingFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepChangeFilesUsingCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateChangesCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectFilesToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreatePullRequest.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateNewFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepNotifyAboutPullRequest.cs AiProgrammer/Solving/Steps/Helpers/CurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/ICurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/FollowNextStepExecutor.cs AiProgrammer/Solving/Steps/IStepsCollection.cs AiProgrammer/Solving/Steps/ISolverStepWithSubsteps.cs AiProgrammer/Solving/Steps/ISolverStep.cs AiProgrammer/Solving/Commands/IModifyCodebaseCommand.cs AiProgrammer/Solving/Model/FileAndMethodName.cs AiProgrammer/Solving/Model/GithubIssueContext.cs AiProgrammer/CodeProcessing/IClassExtractor.cs AiProgrammer/CodeProcessing/ClassExtractorCSharp.cs AiProgrammer/AiProgrammerServices.cs AiProgrammer/AiProgrammer.csproj AiProgrammer/AiProgrammer.csproj.DotSettings Readme.md global.json .gitignore AiProgrammer.sln AiProgrammer.sln.DotSettings LICENSE reviewpad.yml


You are currently in step one (1). Please provide a list of files you think will help you the most when solving the problem. List them from most likely to help solve to problem to least likely. Print each path in new line without numerating them. Make sure to always print a full path. n

github-actions[bot] commented 1 year ago

AI Response

Readme.md global.json AiProgrammer/Core/CodeStatics.cs AiProgrammer/AiProgrammer.csproj AiProgrammer/AiProgrammerServices.cs GithubIssueListener/GithubIssueListener.csproj GithubIssueListener/ListenerEntryPoint.cs GithubIssueListener/IssueListenerInput.cs GithubIssueListener/InputProviderFromEnvironmentVariables.cs GithubIssueListener/SolverExceptionNotifier.cs GithubIssueListener/ISolverExceptionNotifier.cs GithubIssueListener/IssueSolvingStarter.cs GithubIssueListener/IInputProvider.cs AiProgrammer/Github/PullRequests/PullRequestCreator.cs AiProgrammer/Github/Model/RepoOwner.cs AiProgrammer/Github/Model/IssueInfo.cs AiProgrammer/Github/Model/RepoName.cs AiProgrammer/Github/Model/RepoInfo.cs AiProgrammer/Github/Issues/IssueUrlParser.cs AiProgrammer/Github/Issues/IIssueUrlParser.cs AiProgrammer/Github/IGithubContextClientProvider.cs AiProgrammer/Github/GithubServices.cs AiProgrammer/Github/GithubClientProviderForToken.cs AiProgrammer/Github/GithubContextClientProvider.cs AiProgrammer/Github/IGithubClientProviderForToken.cs AiProgrammer/Solving/GithubIssue/GithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/InIssueNoChangesNotifier.cs AiProgrammer/Solving/GithubIssue/IGithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/IGithubIssueSolver.cs AiProgrammer/Solving/GithubIssue/IssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/IIssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverWithMethodSelection.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverFileByFile.cs AiProgrammer/Solving/Utils/UnexpectedAiOutputException.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueFileByFile.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueWithMethodSelection.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectMethodsToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepModifyExistingFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepChangeFilesUsingCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateChangesCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectFilesToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreatePullRequest.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateNewFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepNotifyAboutPullRequest.cs AiProgrammer/Solving/Steps/Helpers/CurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/ICurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/FollowNextStepExecutor.cs AiProgrammer/Solving/Steps/IStepsCollection.cs AiProgrammer/Solving/Steps/ISolverStepWithSubsteps.cs AiProgrammer/Solving/Steps/ISolverStep.cs AiProgrammer/Solving/Commands/IModifyCodebaseCommand.cs AiProgrammer/Solving/Model/FileAndMethodName.cs AiProgrammer/Solving/Model/GithubIssueContext.cs AiProgrammer/CodeProcessing/IClassExtractor.cs AiProgrammer/CodeProcessing/ClassExtractorCSharp.cs AiProgrammer/IO/FileContent.cs AiProgrammer/IO/ProjectContentReader.cs AiProgrammer/IO/IProjectContentReader.cs AiProgrammer/IO/FilePath.cs AiProgrammer/AiInterface/IChat.cs AiProgrammer/AiInterface/ICompletions.cs AiProgrammer/AiInterface/ChatCompletions.cs AiProgrammer/Extensions/StringExtensions.cs AiProgrammer/Logging/ISolverProgressLogger.cs AiProgrammer/Logging/SolverProgressLoggerInIssue.cs LICENSE reviewpad.yml

github-actions[bot] commented 1 year ago

Sending request to the AI using Chat interface

System message:

You are an AI system that does programming tasks by reading the issue specification and modifying the existing code by changing it or adding new code to resolve the user request. You minimize changes to the code and make sure not to modify anything that the user has not requested. Do not remove classes, methods, or fields - only add or modify existing ones. You will be doing the work in steps. The results of your work will be automatically put on Github. Always print the whole source, never the 'The rest of the class remains unchanged' comment

User Request:

The user request: Extend README.md with default repository parameters


Do this in steps:

  1. From a list of files select ones that will be needed to see or modify to program the user request. You will be shown content of those files. You have a limited memory so you will only see the selected ones.
  2. Modify selected existing files one by one
  3. Create needed new files one by one

You are currently in step 'Modify selected existing files one by one'

Already reviewed files with your own description of what happened:

Files left to review: global.json AiProgrammer/Core/CodeStatics.cs AiProgrammer/AiProgrammer.csproj AiProgrammer/AiProgrammerServices.cs GithubIssueListener/GithubIssueListener.csproj GithubIssueListener/ListenerEntryPoint.cs GithubIssueListener/IssueListenerInput.cs GithubIssueListener/InputProviderFromEnvironmentVariables.cs GithubIssueListener/SolverExceptionNotifier.cs GithubIssueListener/ISolverExceptionNotifier.cs GithubIssueListener/IssueSolvingStarter.cs GithubIssueListener/IInputProvider.cs AiProgrammer/Github/PullRequests/PullRequestCreator.cs AiProgrammer/Github/Model/RepoOwner.cs AiProgrammer/Github/Model/IssueInfo.cs AiProgrammer/Github/Model/RepoName.cs AiProgrammer/Github/Model/RepoInfo.cs AiProgrammer/Github/Issues/IssueUrlParser.cs AiProgrammer/Github/Issues/IIssueUrlParser.cs AiProgrammer/Github/IGithubContextClientProvider.cs AiProgrammer/Github/GithubServices.cs AiProgrammer/Github/GithubClientProviderForToken.cs AiProgrammer/Github/GithubContextClientProvider.cs AiProgrammer/Github/IGithubClientProviderForToken.cs AiProgrammer/Solving/GithubIssue/GithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/InIssueNoChangesNotifier.cs AiProgrammer/Solving/GithubIssue/IGithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/IGithubIssueSolver.cs AiProgrammer/Solving/GithubIssue/IssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/IIssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverWithMethodSelection.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverFileByFile.cs AiProgrammer/Solving/Utils/UnexpectedAiOutputException.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueFileByFile.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueWithMethodSelection.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectMethodsToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepModifyExistingFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepChangeFilesUsingCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateChangesCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectFilesToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreatePullRequest.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateNewFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepNotifyAboutPullRequest.cs AiProgrammer/Solving/Steps/Helpers/CurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/ICurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/FollowNextStepExecutor.cs AiProgrammer/Solving/Steps/IStepsCollection.cs AiProgrammer/Solving/Steps/ISolverStepWithSubsteps.cs AiProgrammer/Solving/Steps/ISolverStep.cs AiProgrammer/Solving/Commands/IModifyCodebaseCommand.cs AiProgrammer/Solving/Model/FileAndMethodName.cs AiProgrammer/Solving/Model/GithubIssueContext.cs AiProgrammer/CodeProcessing/IClassExtractor.cs AiProgrammer/CodeProcessing/ClassExtractorCSharp.cs AiProgrammer/IO/FileContent.cs AiProgrammer/IO/ProjectContentReader.cs AiProgrammer/IO/IProjectContentReader.cs AiProgrammer/IO/FilePath.cs AiProgrammer/AiInterface/IChat.cs AiProgrammer/AiInterface/ICompletions.cs AiProgrammer/AiInterface/ChatCompletions.cs AiProgrammer/Extensions/StringExtensions.cs AiProgrammer/Logging/ISolverProgressLogger.cs AiProgrammer/Logging/SolverProgressLoggerInIssue.cs LICENSE reviewpad.yml

Current file path: Readme.md

Current file content:

# GPT-Codemaster

Automatic programming by creating Pull Requests from Issues using LLMs.

An experimental project to automate programming. It uses a task-based approach to move a software project development forward by reading task descriptions from Github Issues and implementing them in a Pull Request.

Example Pull Requests created with this tool are available [here](https://github.com/dex3r/GPT-Codemaster/pulls?q=is%3Apr+label%3A%22GPT-Codemaster+example%22+)

## Features
 - [x] Modifying files 
 - [x] Creating new files
 - [x] Automatic reacting to Issues with the specified label
 - [x] Creating Pull Requests
 - [ ] Released as Github Action in the marketplace
 - [ ] Automatic creation of tests for it's implementation
 - [ ] Reacting to Pull Requests checks
 - [ ] Back-and-forth conversation and reacting to human feedback in a Pull Request
 - [ ] Implement Reflection (https://arxiv.org/pdf/2303.11366.pdf and https://nanothoughts.substack.com/p/reflecting-on-reflexion)
 - [ ] Being able to go though massive projects
 - [ ] Read .ai/project_description_short.json of every project and include it in the prompt
 - [ ] Easy attachment of different LLMs, inlucing locally hosted

## Tests
 - [x] Comlpete a simple Issue, [example](https://github.com/dex3r/GPT-Codemaster/pull/2)
 - [ ] Complete a more complex issue

## FAQ 

### Does it work?
Sometimes, and only for small projects with small files, like this one. The biggest limitation right now is the tokens length for LLMs.

### Does it _really_ work?
It's an experiment, not an actual product.

### What do I need to use it?
1. GPT-4 API access and token
1. Github repository
1. This project as a GitHub Action
1. Enable "Allow Github Actions to create pull requests" in settings

Select one command with this parameters to execute:

n

github-actions[bot] commented 1 year ago

AI Response

The user request is to extend the README.md file with default repository parameters. We need to modify the existing README.md file to add the default repository parameters. We can add the default repository parameters in a new section or add them to the existing Features section. Let's add them to the existing Features section.

Add the following line to the Features section:

Select the replace_file command and modify the README.md file by adding the above line to the Features section.

# GPT-Codemaster

Automatic programming by creating Pull Requests from Issues using LLMs.

An experimental project to automate programming. It uses a task-based approach to move a software project development forward by reading task descriptions from Github Issues and implementing them in a Pull Request.

Example Pull Requests created with this tool are available [here](https://github.com/dex3r/GPT-Codemaster/pulls?q=is%3Apr+label%3A%22GPT-Codemaster+example%22+)

## Features
 - [x] Modifying files 
 - [x] Creating new files
 - [x] Automatic reacting to Issues with the specified label
 - [x] Creating Pull Requests
 - [ ] Released as Github Action in the marketplace
 - [ ] Automatic creation of tests for it's implementation
 - [ ] Reacting to Pull Requests checks
 - [ ] Back-and-forth conversation and reacting to human feedback in a Pull Request
 - [ ] Implement Reflection (https://arxiv.org/pdf/2303.11366.pdf and https://nanothoughts.substack.com/p/reflecting-on-reflexion)
 - [ ] Being able to go though massive projects
 - [ ] Read .ai/project_description_short.json of every project and include it in the prompt
 - [ ] Easy attachment of different LLMs, inlucing locally hosted
 - [ ] Default repository parameters

## Tests
 - [x] Comlpete a simple Issue, [example](https://github.com/dex3r/GPT-Codemaster/pull/2)
 - [ ] Complete a more complex issue

## FAQ 

### Does it work?
Sometimes, and only for small projects with small files, like this one. The biggest limitation right now is the tokens length for LLMs.

### Does it _really_ work?
It's an experiment, not an actual product.

### What do I need to use it?
1. GPT-4 API access and token
1. Github repository
1. This project as a GitHub Action
1. Enable "Allow Github Actions to create pull requests" in settings

Print the whole source.

github-actions[bot] commented 1 year ago

Exception caught while GPT-Codemaster tried to solve the issue:


AiProgrammer.Solving.Utils.UnexpectedAiOutputException: AI Output is not a command.. First 50 characters of output: 'The user request is to extend the README.md file w'
   at AiProgrammer.Solving.Steps.ConcreteSteps.StepModifyExistingFilesOneByOne.ExecuteForSingleFile(FilePath currentFile, List`1 alreadyReviewedFilesTexts, IReadOnlyCollection`1 filesLeftToReview) in /home/runner/work/GPT-Codemaster/GPT-Codemaster/AiProgrammer/Solving/Steps/ConcreteSteps/StepModifyExistingFilesOneByOne.cs:line 105
   at AiProgrammer.Solving.Steps.ConcreteSteps.StepModifyExistingFilesOneByOne.GetChangedFiles(IReadOnlyList`1 filesToPreview) in /home/runner/work/GPT-Codemaster/GPT-Codemaster/AiProgrammer/Solving/Steps/ConcreteSteps/StepModifyExistingFilesOneByOne.cs:line 33
   at AiProgrammer.Solving.Steps.EntrySteps.StepSolveGithubIssueFileByFile.SolveGithubIssue() in /home/runner/work/GPT-Codemaster/GPT-Codemaster/AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueFileByFile.cs:line 94
   at AiProgrammer.Solving.GithubIssue.GithubIssueSolverFileByFile.SolveGithubIssue() in /home/runner/work/GPT-Codemaster/GPT-Codemaster/AiProgrammer/Solving/GithubIssue/GithubIssueSolverFileByFile.cs:line 17
   at GithubIssueListener.IssueSolvingStarter.Solve(GithubIssueContext requestContext) in /home/runner/work/GPT-Codemaster/GPT-Codemaster/GithubIssueListener/IssueSolvingStarter.cs:line 57```
github-actions[bot] commented 1 year ago

Hello, GPT-Codemaster here. I'm starting to work on the issue, give me a moment...

Job progress

github-actions[bot] commented 1 year ago

Sending request to the AI using Chat interface

System message:

You are an AI system that does programming tasks by reading the issue specification and modifying the existing code by changing it or adding new code to resolve the user request. You minimize changes to the code and make sure not to modify anything that the user has not requested. Do not remove classes, methods, or fields - only add or modify existing ones. You will be doing the work in steps. The results of your work will be automatically put on Github. Always print the whole source, never the 'The rest of the class remains unchanged' comment

User Request:

The user request: Extend README.md with default repository parameters


Do this in steps:

  1. From a list of files select ones that will be needed to see or modify to program the user request. You will be shown content of those files. You have a limited memory so you will only see the selected ones.
  2. Modify selected existing files one by one
  3. Create needed new files one by one

Here is a hierarchical view of files in the project::

AiProgrammerTests/ChatMessageRoleTests.cs AiProgrammerTests/ClassExtractorTests.cs AiProgrammerTests/DependenciesTest.cs AiProgrammerTests/AiProgrammerTests.csproj AiProgrammerTests/StringExtensionsSubstringSafeTests.cs GithubIssueListener/ListenerEntryPoint.cs GithubIssueListener/IssueListenerInput.cs GithubIssueListener/InputProviderFromEnvironmentVariables.cs GithubIssueListener/SolverExceptionNotifier.cs GithubIssueListener/ISolverExceptionNotifier.cs GithubIssueListener/IssueSolvingStarter.cs GithubIssueListener/IInputProvider.cs GithubIssueListener/GithubIssueListener.csproj AiProgrammer/Core/CodeStatics.cs AiProgrammer/IO/FileContent.cs AiProgrammer/IO/ProjectContentReader.cs AiProgrammer/IO/IProjectContentReader.cs AiProgrammer/IO/FilePath.cs AiProgrammer/AiInterface/IChat.cs AiProgrammer/AiInterface/ICompletions.cs AiProgrammer/AiInterface/ChatCompletions.cs AiProgrammer/Github/PullRequests/PullRequestCreator.cs AiProgrammer/Github/Model/RepoOwner.cs AiProgrammer/Github/Model/IssueInfo.cs AiProgrammer/Github/Model/RepoName.cs AiProgrammer/Github/Model/RepoInfo.cs AiProgrammer/Github/Issues/IssueUrlParser.cs AiProgrammer/Github/Issues/IIssueUrlParser.cs AiProgrammer/Github/IGithubContextClientProvider.cs AiProgrammer/Github/GithubServices.cs AiProgrammer/Github/GithubClientProviderForToken.cs AiProgrammer/Github/GithubContextClientProvider.cs AiProgrammer/Github/IGithubClientProviderForToken.cs AiProgrammer/Extensions/StringExtensions.cs AiProgrammer/Logging/ISolverProgressLogger.cs AiProgrammer/Logging/SolverProgressLoggerInIssue.cs AiProgrammer/Solving/GithubIssue/GithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/InIssueNoChangesNotifier.cs AiProgrammer/Solving/GithubIssue/IGithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/IGithubIssueSolver.cs AiProgrammer/Solving/GithubIssue/IssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/IIssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverWithMethodSelection.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverFileByFile.cs AiProgrammer/Solving/Utils/UnexpectedAiOutputException.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueFileByFile.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueWithMethodSelection.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectMethodsToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepModifyExistingFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepChangeFilesUsingCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateChangesCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectFilesToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreatePullRequest.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateNewFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepNotifyAboutPullRequest.cs AiProgrammer/Solving/Steps/Helpers/CurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/ICurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/FollowNextStepExecutor.cs AiProgrammer/Solving/Steps/IStepsCollection.cs AiProgrammer/Solving/Steps/ISolverStepWithSubsteps.cs AiProgrammer/Solving/Steps/ISolverStep.cs AiProgrammer/Solving/Commands/IModifyCodebaseCommand.cs AiProgrammer/Solving/Model/FileAndMethodName.cs AiProgrammer/Solving/Model/GithubIssueContext.cs AiProgrammer/CodeProcessing/IClassExtractor.cs AiProgrammer/CodeProcessing/ClassExtractorCSharp.cs AiProgrammer/AiProgrammerServices.cs AiProgrammer/AiProgrammer.csproj AiProgrammer/AiProgrammer.csproj.DotSettings Readme.md global.json .gitignore AiProgrammer.sln AiProgrammer.sln.DotSettings LICENSE reviewpad.yml


You are currently in step one (1). Please provide a list of files you think will help you the most when solving the problem. List them from most likely to help solve to problem to least likely. Print each path in new line without numerating them. Make sure to always print a full path. n

github-actions[bot] commented 1 year ago

AI Response

Readme.md global.json AiProgrammer/Core/CodeStatics.cs AiProgrammer/AiProgrammer.csproj AiProgrammer/AiProgrammerServices.cs GithubIssueListener/GithubIssueListener.csproj GithubIssueListener/ListenerEntryPoint.cs GithubIssueListener/IssueListenerInput.cs GithubIssueListener/InputProviderFromEnvironmentVariables.cs GithubIssueListener/SolverExceptionNotifier.cs GithubIssueListener/ISolverExceptionNotifier.cs GithubIssueListener/IssueSolvingStarter.cs GithubIssueListener/IInputProvider.cs AiProgrammer/Github/PullRequests/PullRequestCreator.cs AiProgrammer/Github/Model/RepoOwner.cs AiProgrammer/Github/Model/IssueInfo.cs AiProgrammer/Github/Model/RepoName.cs AiProgrammer/Github/Model/RepoInfo.cs AiProgrammer/Github/Issues/IssueUrlParser.cs AiProgrammer/Github/Issues/IIssueUrlParser.cs AiProgrammer/Github/IGithubContextClientProvider.cs AiProgrammer/Github/GithubServices.cs AiProgrammer/Github/GithubClientProviderForToken.cs AiProgrammer/Github/GithubContextClientProvider.cs AiProgrammer/Github/IGithubClientProviderForToken.cs AiProgrammer/Solving/GithubIssue/GithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/InIssueNoChangesNotifier.cs AiProgrammer/Solving/GithubIssue/IGithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/IGithubIssueSolver.cs AiProgrammer/Solving/GithubIssue/IssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/IIssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverWithMethodSelection.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverFileByFile.cs AiProgrammer/Solving/Utils/UnexpectedAiOutputException.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueFileByFile.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueWithMethodSelection.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectMethodsToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepModifyExistingFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepChangeFilesUsingCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateChangesCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectFilesToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreatePullRequest.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateNewFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepNotifyAboutPullRequest.cs AiProgrammer/Solving/Steps/Helpers/CurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/ICurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/FollowNextStepExecutor.cs AiProgrammer/Solving/Steps/IStepsCollection.cs AiProgrammer/Solving/Steps/ISolverStepWithSubsteps.cs AiProgrammer/Solving/Steps/ISolverStep.cs AiProgrammer/Solving/Commands/IModifyCodebaseCommand.cs AiProgrammer/Solving/Model/FileAndMethodName.cs AiProgrammer/Solving/Model/GithubIssueContext.cs AiProgrammer/CodeProcessing/IClassExtractor.cs AiProgrammer/CodeProcessing/ClassExtractorCSharp.cs AiProgrammer/IO/FileContent.cs AiProgrammer/IO/ProjectContentReader.cs AiProgrammer/IO/IProjectContentReader.cs AiProgrammer/IO/FilePath.cs AiProgrammer/AiInterface/IChat.cs AiProgrammer/AiInterface/ICompletions.cs AiProgrammer/AiInterface/ChatCompletions.cs AiProgrammer/Extensions/StringExtensions.cs AiProgrammer/Logging/ISolverProgressLogger.cs AiProgrammer/Logging/SolverProgressLoggerInIssue.cs LICENSE reviewpad.yml

github-actions[bot] commented 1 year ago

Sending request to the AI using Chat interface

System message:

You are an AI system that does programming tasks by reading the issue specification and modifying the existing code by changing it or adding new code to resolve the user request. You minimize changes to the code and make sure not to modify anything that the user has not requested. Do not remove classes, methods, or fields - only add or modify existing ones. You will be doing the work in steps. The results of your work will be automatically put on Github. Always print the whole source, never the 'The rest of the class remains unchanged' comment

User Request:

The user request: Extend README.md with default repository parameters


Do this in steps:

  1. From a list of files select ones that will be needed to see or modify to program the user request. You will be shown content of those files. You have a limited memory so you will only see the selected ones.
  2. Modify selected existing files one by one
  3. Create needed new files one by one

You are currently in step 'Modify selected existing files one by one'

Already reviewed files with your own description of what happened:

Files left to review: global.json AiProgrammer/Core/CodeStatics.cs AiProgrammer/AiProgrammer.csproj AiProgrammer/AiProgrammerServices.cs GithubIssueListener/GithubIssueListener.csproj GithubIssueListener/ListenerEntryPoint.cs GithubIssueListener/IssueListenerInput.cs GithubIssueListener/InputProviderFromEnvironmentVariables.cs GithubIssueListener/SolverExceptionNotifier.cs GithubIssueListener/ISolverExceptionNotifier.cs GithubIssueListener/IssueSolvingStarter.cs GithubIssueListener/IInputProvider.cs AiProgrammer/Github/PullRequests/PullRequestCreator.cs AiProgrammer/Github/Model/RepoOwner.cs AiProgrammer/Github/Model/IssueInfo.cs AiProgrammer/Github/Model/RepoName.cs AiProgrammer/Github/Model/RepoInfo.cs AiProgrammer/Github/Issues/IssueUrlParser.cs AiProgrammer/Github/Issues/IIssueUrlParser.cs AiProgrammer/Github/IGithubContextClientProvider.cs AiProgrammer/Github/GithubServices.cs AiProgrammer/Github/GithubClientProviderForToken.cs AiProgrammer/Github/GithubContextClientProvider.cs AiProgrammer/Github/IGithubClientProviderForToken.cs AiProgrammer/Solving/GithubIssue/GithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/InIssueNoChangesNotifier.cs AiProgrammer/Solving/GithubIssue/IGithubIssueContextProvider.cs AiProgrammer/Solving/GithubIssue/IGithubIssueSolver.cs AiProgrammer/Solving/GithubIssue/IssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/IIssueDescriptionProvider.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverWithMethodSelection.cs AiProgrammer/Solving/GithubIssue/GithubIssueSolverFileByFile.cs AiProgrammer/Solving/Utils/UnexpectedAiOutputException.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueFileByFile.cs AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueWithMethodSelection.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectMethodsToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepModifyExistingFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepChangeFilesUsingCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateChangesCommands.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepSelectFilesToPreview.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreatePullRequest.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepCreateNewFilesOneByOne.cs AiProgrammer/Solving/Steps/ConcreteSteps/StepNotifyAboutPullRequest.cs AiProgrammer/Solving/Steps/Helpers/CurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/ICurrentStepsHolder.cs AiProgrammer/Solving/Steps/Helpers/FollowNextStepExecutor.cs AiProgrammer/Solving/Steps/IStepsCollection.cs AiProgrammer/Solving/Steps/ISolverStepWithSubsteps.cs AiProgrammer/Solving/Steps/ISolverStep.cs AiProgrammer/Solving/Commands/IModifyCodebaseCommand.cs AiProgrammer/Solving/Model/FileAndMethodName.cs AiProgrammer/Solving/Model/GithubIssueContext.cs AiProgrammer/CodeProcessing/IClassExtractor.cs AiProgrammer/CodeProcessing/ClassExtractorCSharp.cs AiProgrammer/IO/FileContent.cs AiProgrammer/IO/ProjectContentReader.cs AiProgrammer/IO/IProjectContentReader.cs AiProgrammer/IO/FilePath.cs AiProgrammer/AiInterface/IChat.cs AiProgrammer/AiInterface/ICompletions.cs AiProgrammer/AiInterface/ChatCompletions.cs AiProgrammer/Extensions/StringExtensions.cs AiProgrammer/Logging/ISolverProgressLogger.cs AiProgrammer/Logging/SolverProgressLoggerInIssue.cs LICENSE reviewpad.yml

Current file path: Readme.md

Current file content:

# GPT-Codemaster

Automatic programming by creating Pull Requests from Issues using LLMs.

An experimental project to automate programming. It uses a task-based approach to move a software project development forward by reading task descriptions from Github Issues and implementing them in a Pull Request.

Example Pull Requests created with this tool are available [here](https://github.com/dex3r/GPT-Codemaster/pulls?q=is%3Apr+label%3A%22GPT-Codemaster+example%22+)

## Features
 - [x] Modifying files 
 - [x] Creating new files
 - [x] Automatic reacting to Issues with the specified label
 - [x] Creating Pull Requests
 - [ ] Released as Github Action in the marketplace
 - [ ] Automatic creation of tests for it's implementation
 - [ ] Reacting to Pull Requests checks
 - [ ] Back-and-forth conversation and reacting to human feedback in a Pull Request
 - [ ] Implement Reflection (https://arxiv.org/pdf/2303.11366.pdf and https://nanothoughts.substack.com/p/reflecting-on-reflexion)
 - [ ] Being able to go though massive projects
 - [ ] Read .ai/project_description_short.json of every project and include it in the prompt
 - [ ] Easy attachment of different LLMs, inlucing locally hosted

## Tests
 - [x] Comlpete a simple Issue, [example](https://github.com/dex3r/GPT-Codemaster/pull/2)
 - [ ] Complete a more complex issue

## FAQ 

### Does it work?
Sometimes, and only for small projects with small files, like this one. The biggest limitation right now is the tokens length for LLMs.

### Does it _really_ work?
It's an experiment, not an actual product.

### What do I need to use it?
1. GPT-4 API access and token
1. Github repository
1. This project as a GitHub Action
1. Enable "Allow Github Actions to create pull requests" in settings

Select one command with this parameters to execute:

n

github-actions[bot] commented 1 year ago

AI Response

The user request is to extend the README.md file with default repository parameters. We need to modify the existing README.md file to add the default repository parameters. We can add the default repository parameters in a new section or add them to the existing Features section. Let's add them to the existing Features section.

Add the following line to the Features section:

Select the replace_file command and modify the README.md file by adding the above line to the Features section.

# GPT-Codemaster

Automatic programming by creating Pull Requests from Issues using LLMs.

An experimental project to automate programming. It uses a task-based approach to move a software project development forward by reading task descriptions from Github Issues and implementing them in a Pull Request.

Example Pull Requests created with this tool are available [here](https://github.com/dex3r/GPT-Codemaster/pulls?q=is%3Apr+label%3A%22GPT-Codemaster+example%22+)

## Features
 - [x] Modifying files 
 - [x] Creating new files
 - [x] Automatic reacting to Issues with the specified label
 - [x] Creating Pull Requests
 - [ ] Released as Github Action in the marketplace
 - [ ] Automatic creation of tests for it's implementation
 - [ ] Reacting to Pull Requests checks
 - [ ] Back-and-forth conversation and reacting to human feedback in a Pull Request
 - [ ] Implement Reflection (https://arxiv.org/pdf/2303.11366.pdf and https://nanothoughts.substack.com/p/reflecting-on-reflexion)
 - [ ] Being able to go though massive projects
 - [ ] Read .ai/project_description_short.json of every project and include it in the prompt
 - [ ] Easy attachment of different LLMs, inlucing locally hosted
 - [ ] Default repository parameters

## Tests
 - [x] Comlpete a simple Issue, [example](https://github.com/dex3r/GPT-Codemaster/pull/2)
 - [ ] Complete a more complex issue

## FAQ 

### Does it work?
Sometimes, and only for small projects with small files, like this one. The biggest limitation right now is the tokens length for LLMs.

### Does it _really_ work?
It's an experiment, not an actual product.

### What do I need to use it?
1. GPT-4 API access and token
1. Github repository
1. This project as a GitHub Action
1. Enable "Allow Github Actions to create pull requests" in settings

Print the whole source.

github-actions[bot] commented 1 year ago

Exception caught while GPT-Codemaster tried to solve the issue:


AiProgrammer.Solving.Utils.UnexpectedAiOutputException: AI Output is not a command.. First 50 characters of output: 'The user request is to extend the README.md file w'
   at AiProgrammer.Solving.Steps.ConcreteSteps.StepModifyExistingFilesOneByOne.ExecuteForSingleFile(FilePath currentFile, List`1 alreadyReviewedFilesTexts, IReadOnlyCollection`1 filesLeftToReview) in /home/runner/work/GPT-Codemaster/GPT-Codemaster/AiProgrammer/Solving/Steps/ConcreteSteps/StepModifyExistingFilesOneByOne.cs:line 105
   at AiProgrammer.Solving.Steps.ConcreteSteps.StepModifyExistingFilesOneByOne.GetChangedFiles(IReadOnlyList`1 filesToPreview) in /home/runner/work/GPT-Codemaster/GPT-Codemaster/AiProgrammer/Solving/Steps/ConcreteSteps/StepModifyExistingFilesOneByOne.cs:line 33
   at AiProgrammer.Solving.Steps.EntrySteps.StepSolveGithubIssueFileByFile.SolveGithubIssue() in /home/runner/work/GPT-Codemaster/GPT-Codemaster/AiProgrammer/Solving/Steps/EntrySteps/StepSolveGithubIssueFileByFile.cs:line 94
   at AiProgrammer.Solving.GithubIssue.GithubIssueSolverFileByFile.SolveGithubIssue() in /home/runner/work/GPT-Codemaster/GPT-Codemaster/AiProgrammer/Solving/GithubIssue/GithubIssueSolverFileByFile.cs:line 17
   at GithubIssueListener.IssueSolvingStarter.Solve(GithubIssueContext requestContext) in /home/runner/work/GPT-Codemaster/GPT-Codemaster/GithubIssueListener/IssueSolvingStarter.cs:line 57```