File tree Expand file tree Collapse file tree 2 files changed +12
-19
lines changed Expand file tree Collapse file tree 2 files changed +12
-19
lines changed Original file line number Diff line number Diff line change @@ -96,25 +96,17 @@ defmodule CadetWeb.AICodeAnalysisController do
9696 { :ok , answer } <- Assessments . get_answer ( answer_id_parsed ) do
9797 # Get head of answers (should only be one answer for given submission
9898 # and question since we filter to only 1 question)
99- case answer do
100- nil ->
101- conn
102- |> put_status ( :not_found )
103- |> text ( "No answer found for the given answer_id" )
104-
105- _ ->
106- analyze_code (
107- conn ,
108- % {
109- answer: answer ,
110- api_key: key ,
111- llm_model: course . llm_model ,
112- llm_api_url: course . llm_api_url ,
113- course_prompt: course . llm_course_level_prompt ,
114- assessment_prompt: Assessments . get_llm_assessment_prompt ( answer . question_id )
115- }
116- )
117- end
99+ analyze_code (
100+ conn ,
101+ % {
102+ answer: answer ,
103+ api_key: key ,
104+ llm_model: course . llm_model ,
105+ llm_api_url: course . llm_api_url ,
106+ course_prompt: course . llm_course_level_prompt ,
107+ assessment_prompt: Assessments . get_llm_assessment_prompt ( answer . question_id )
108+ }
109+ )
118110 else
119111 :error ->
120112 conn
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ defmodule CadetWeb.AICommentsHelpers do
22 @ moduledoc """
33 Helper functions for Managing LLM related logic
44 """
5+ require Logger
56
67 def decrypt_llm_api_key ( nil ) , do: nil
78
You can’t perform that action at this time.
0 commit comments