-
Notifications
You must be signed in to change notification settings - Fork 344
Hyperion
: Add AI code generation assistance for template, solution, and tests repositories
#11405
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
Open
luis-gasparschroeder
wants to merge
31
commits into
develop
Choose a base branch
from
feature/hyperion/code-generation-clean
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,489
−52
Open
Changes from 20 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
51d2688
Initial commit
luis-gasparschroeder 5c8f4ab
Added tests
luis-gasparschroeder 24f6f60
Implemented endpoint
luis-gasparschroeder d69d9c0
Merged HyperionRepositoryStructureService into HyperionProgrammingExe…
luis-gasparschroeder b6ed7ca
Removed service annotation
luis-gasparschroeder 13fe6e5
Added Service suffix
luis-gasparschroeder 2eced3f
Updated API
luis-gasparschroeder 4e7a2ab
Using signal
luis-gasparschroeder 40e8f35
Moved getExistingSolutionCode to cenralized class
luis-gasparschroeder da81272
Moved getExistingSolutionCode to cenralized class
luis-gasparschroeder 236bbe0
Implemented module auto generation
luis-gasparschroeder 8473a1d
Fixed signal bug
luis-gasparschroeder 1e1dc1f
Added service defintions (required for discovery)
luis-gasparschroeder 525510c
Adjusted prompt injection to adhere to HyperionPromptTemplateService
luis-gasparschroeder 0c171c7
Added i18n localization
luis-gasparschroeder 9667bb4
Added documentation
luis-gasparschroeder 53ecb19
Removed generateSolutionPlan duplicate
luis-gasparschroeder c78609c
Dependency injecting beans
luis-gasparschroeder 3884102
Fixed creation assistance button alignment
luis-gasparschroeder 1ea753f
Merge branch 'develop' into feature/hyperion/code-generation-clean
luis-gasparschroeder beb8b29
Added code generation documentation
luis-gasparschroeder 978e204
Modified code generation documentation
luis-gasparschroeder c91763a
Hide code generation button when hyperion is disabled
luis-gasparschroeder 2cb1ca4
Merge branch 'develop' into feature/hyperion/code-generation-clean
FelixTJDietrich ea8f9f6
Fix constructor calls in Hyperion test files
luis-gasparschroeder 620a048
Merge branch 'feature/hyperion/code-generation-clean' of github.com:l…
luis-gasparschroeder 595252a
Fixed DTO naming conventions
luis-gasparschroeder 3416a0f
Added docstring
luis-gasparschroeder f1a1316
Fixed tests
luis-gasparschroeder 433d89c
Added additional tests to increase code coverage
luis-gasparschroeder c0637bc
Adjusted jest config
luis-gasparschroeder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 20 additions & 1 deletion
21
src/main/java/de/tum/cit/aet/artemis/hyperion/dto/ArtifactType.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
package de.tum.cit.aet.artemis.hyperion.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
/** | ||
* Enum for artifact types in consistency checks. | ||
*/ | ||
public enum ArtifactType { | ||
PROBLEM_STATEMENT, TEMPLATE_REPOSITORY, SOLUTION_REPOSITORY, TESTS_REPOSITORY | ||
|
||
PROBLEM_STATEMENT("PROBLEM_STATEMENT"), TEMPLATE_REPOSITORY("TEMPLATE_REPOSITORY"), SOLUTION_REPOSITORY("SOLUTION_REPOSITORY"), TESTS_REPOSITORY("TESTS_REPOSITORY"); | ||
|
||
private final String value; | ||
|
||
ArtifactType(String value) { | ||
this.value = value; | ||
} | ||
|
||
@JsonValue | ||
public String getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return value; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/de/tum/cit/aet/artemis/hyperion/dto/CodeGenerationRequestDTO.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package de.tum.cit.aet.artemis.hyperion.dto; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import de.tum.cit.aet.artemis.programming.domain.RepositoryType; | ||
|
||
/** | ||
* DTO for requesting code generation for a programming exercise. | ||
* Contains the repository type to determine which generation strategy to use. | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public record CodeGenerationRequestDTO(@NotNull RepositoryType repositoryType) { | ||
} | ||
luis-gasparschroeder marked this conversation as resolved.
Show resolved
Hide resolved
|
30 changes: 30 additions & 0 deletions
30
src/main/java/de/tum/cit/aet/artemis/hyperion/dto/CodeGenerationResponseDTO.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package de.tum.cit.aet.artemis.hyperion.dto; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
/** | ||
* DTO for internal code generation response. | ||
* Contains the generated content from AI service calls. | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public record CodeGenerationResponseDTO( | ||
/** | ||
* The solution plan as a string | ||
*/ | ||
String solutionPlan, | ||
|
||
/** | ||
* List of generated files with path and content | ||
*/ | ||
List<GeneratedFile> files) { | ||
|
||
public String getSolutionPlan() { | ||
return solutionPlan; | ||
} | ||
|
||
public List<GeneratedFile> getFiles() { | ||
return files; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/de/tum/cit/aet/artemis/hyperion/dto/CodeGenerationResultDTO.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package de.tum.cit.aet.artemis.hyperion.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
/** | ||
* DTO for REST API code generation result. | ||
* Contains the result of the code generation and compilation process. | ||
*/ | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public record CodeGenerationResultDTO( | ||
/** | ||
* Whether the code generation and compilation was successful | ||
*/ | ||
boolean success, | ||
|
||
/** | ||
* Descriptive message about the generation result | ||
*/ | ||
String message, | ||
|
||
/** | ||
* Number of attempts made during the generation process | ||
*/ | ||
int attempts) { | ||
luis-gasparschroeder marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/de/tum/cit/aet/artemis/hyperion/dto/GeneratedFile.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package de.tum.cit.aet.artemis.hyperion.dto; | ||
|
||
public record GeneratedFile(String path, String content) { | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.