First Working Prototype
This application is a simple proof of concept demonstrating an agent capable of taking a prompt and generating a patch implementing code satisfying the prompt along with an accompanying unit test.
This commit is contained in:
5
pkg/llm/prompts/generate_commitmsg.tmpl
Normal file
5
pkg/llm/prompts/generate_commitmsg.tmpl
Normal file
@@ -0,0 +1,5 @@
|
||||
given the following prompt create a descriptive commit message indicating the changes made
|
||||
only give a single commit message, do not describe your thought process
|
||||
|
||||
files changed: {{range .Files}}{{.}} {{end}}
|
||||
prompt: {{ .Prompt }}
|
||||
11
pkg/llm/prompts/generate_patch.tmpl
Normal file
11
pkg/llm/prompts/generate_patch.tmpl
Normal file
@@ -0,0 +1,11 @@
|
||||
given the following code snippet in markdown format perform the following task:
|
||||
{{ .Prompt }}
|
||||
|
||||
return the modified function as a code block formatted in markdown, make sure to retain as much of the preceding and
|
||||
trailing context as possible
|
||||
|
||||
!IMPORTANT do not add any explanation
|
||||
|
||||
```go
|
||||
{{ .Context }}
|
||||
```
|
||||
15
pkg/llm/prompts/generate_unittest.tmpl
Normal file
15
pkg/llm/prompts/generate_unittest.tmpl
Normal file
@@ -0,0 +1,15 @@
|
||||
given the following code block in markdown that performs the following task:
|
||||
{{ .Prompt }}
|
||||
|
||||
{{- if .TestFileExists -}}
|
||||
create a unit test for the following code as a code block formatted in markdown, only include the unit test itself do
|
||||
not include any imports
|
||||
!IMPORTANT do not add any explanation
|
||||
{{- else -}}
|
||||
create a unit test for the following code as a code block formatted in markdown, include any required imports
|
||||
!IMPORTANT do not add any explanation
|
||||
{{- end -}}
|
||||
|
||||
```go
|
||||
{{ .Context }}
|
||||
```"
|
||||
Reference in New Issue
Block a user