Skip to content

Commit f794a14

Browse files
committed
format
1 parent 353b533 commit f794a14

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

lib/cadet_web/controllers/generate_ai_comments.ex

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -169,27 +169,29 @@ defmodule CadetWeb.AICodeAnalysisController do
169169
end
170170

171171
defp format_system_prompt(course_prompt, assessment_prompt, answer) do
172-
(course_prompt || "") <> "\n\n" <> (assessment_prompt || "") <>
172+
(course_prompt || "") <>
173173
"\n\n" <>
174-
"""
175-
**Additional Instructions for this Question:**
176-
#{answer.question.question["llm_prompt"] || "N/A"}
174+
(assessment_prompt || "") <>
175+
"\n\n" <>
176+
"""
177+
**Additional Instructions for this Question:**
178+
#{answer.question.question["llm_prompt"] || "N/A"}
177179
178-
**Question:**
179-
```
180-
#{answer.question.question["content"] || "N/A"}
181-
```
180+
**Question:**
181+
```
182+
#{answer.question.question["content"] || "N/A"}
183+
```
182184
183-
**Model Solution:**
184-
```
185-
#{answer.question.question["solution"] || "N/A"}
186-
```
185+
**Model Solution:**
186+
```
187+
#{answer.question.question["solution"] || "N/A"}
188+
```
187189
188-
**Autograding Status:** #{answer.autograding_status || "N/A"}
189-
**Autograding Results:** #{format_autograding_results(answer.autograding_results)}
190+
**Autograding Status:** #{answer.autograding_status || "N/A"}
191+
**Autograding Results:** #{format_autograding_results(answer.autograding_results)}
190192
191-
The student answer will be given below as part of the User Prompt.
192-
"""
193+
The student answer will be given below as part of the User Prompt.
194+
"""
193195
end
194196

195197
defp format_autograding_results(nil), do: "N/A"

0 commit comments

Comments
 (0)