Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SolverProgressLoggerToILogger #8

Open
dex3r opened this issue Mar 25, 2023 · 6 comments
Open

SolverProgressLoggerToILogger #8

dex3r opened this issue Mar 25, 2023 · 6 comments

Comments

@dex3r
Copy link
Owner

dex3r commented Mar 25, 2023

Create new class that implement ISolverProgressLogger and logs responses to ILogger from nuget package Microsoft.Extensions.Logging. Make sure to add this package if not already added.

@github-actions
Copy link

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

Job progress

@github-actions
Copy link

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:
SolverProgressLoggerToILogger
Create new class that implement ISolverProgressLogger and logs responses to ILogger from nuget package Microsoft.Extensions.Logging. Make sure to add this package if not already added.


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::

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


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
Copy link

AI Response

AiProgrammer/Logging/ISolverProgressLogger.cs
AiProgrammer/GithubIssueListener.csproj

@github-actions
Copy link

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:
SolverProgressLoggerToILogger
Create new class that implement ISolverProgressLogger and logs responses to ILogger from nuget package Microsoft.Extensions.Logging. Make sure to add this package if not already added.


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:
AiProgrammer/GithubIssueListener.csproj

Current file path:
AiProgrammer/Logging/ISolverProgressLogger.cs

Current file content:

using AiProgrammer.Solving;
using OpenAI_API.Chat;

namespace AiProgrammer.Logging;

public interface ISolverProgressLogger
{
    Task LogChatRequest(Conversation conversation);
    Task LogChatResponse(string response);
}

Select one command with this parameters to execute:

  • next_file [Note to yourself of what you saw that can be useful in next steps to solve the issue
    and when changing or creating next files. Make sure to include all needed information as you won't see this file again and won't remember
    what was inside.] - Do not modify this file and go to the next

  • replace_file [(in new line) new content in code block] [short description of what was actually modified and
    why, that can be useful in next steps] - Modify or remove the file by re-writing it's content. Write a short description of what was
    modified, this description will be read only by you when moving to the next file

�n

@github-actions
Copy link

AI Response

next_file The ISolverProgressLogger interface is already defined and doesn't need any modifications.

@github-actions
Copy link

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

System.IO.FileNotFoundException: Cannot read file content: it does not exist
File name: 'AiProgrammer/GithubIssueListener.csproj'
   at AiProgrammer.IO.ProjectContentReader.ReadFile(FilePath filePath) in /home/runner/work/GPT-Codemaster/GPT-Codemaster/AiProgrammer/IO/ProjectContentReader.cs:line 120
   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 70
   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```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant