pull-pal/llm/prompts/comment-diff-request.tmpl
Maximillian von Briesen d92efcb7e9
Prompt improvements (#9)
improve prompt templates to get response in yaml format and make parsing easier
also add debug file functionality so that exact input, prompts, and output can be easily seen for every request
2023-09-04 16:44:59 -04:00

36 lines
970 B
Cheetah

File:
- name: {{ .File.Path }}:
contents:
```
{{ .File.Contents }}
```
Diff:
```
{{ .Diff }}
```
Comment:
{{ .Contents }}
The above is information about a comment left on a file. The diff contains information about the precise location of the comment.
First, determine if the comment is a question or a request for changes.
If the comment is a question, come up with an answer, and respond exactly as outlined directly below "Response Template A".
If the comment is a request, modify the file provided at the beginning of the message, and respond exactly as outlined directly below "Response Template B".
For either response template, respond in a parseable YAML format. Respond only with YAML, and nothing else.
Response Template A:
responseType: 0
response: |
[your answer]
Response Template B:
responseType: 1
file:
path: {{ .File.Path }}
contents: |
[new {{ .File.Path }} contents]
response: |
[additional context about your changes]