File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,9 +107,26 @@ def gemini_qna(
107107 logging .info (f"Student files: { student_files } " )
108108 logging .info (f"Readme file: { readme_file } " )
109109
110- answers = None
110+ consolidated_question = get_the_question (
111+ report_paths ,
112+ student_files ,
113+ readme_file ,
114+ human_language
115+ )
116+
117+ answers = ask_gemini (consolidated_question , api_key )
118+
119+ return answers
120+
111121
122+ def get_the_question (
123+ report_paths :Tuple [pathlib .Path ],
124+ student_files :Tuple [pathlib .Path ],
125+ readme_file :pathlib .Path ,
126+ human_language :str ,
127+ ) -> str :
112128 questions = []
129+
113130 # Process each report file
114131 for report_path in report_paths :
115132 logging .info (f"Processing report file: { report_path } " )
@@ -126,11 +143,10 @@ def gemini_qna(
126143 questions .insert (0 , f'In { human_language } , please comment on the student code given the assignment instruction.' )
127144
128145 questions .append (get_code_instruction (student_files , readme_file , human_language ))
129- consolidated_question = "\n \n " .join (questions )
130146
131- answers = ask_gemini ( consolidated_question , api_key )
147+ consolidated_question = " \n \n " . join ( questions )
132148
133- return answers
149+ return consolidated_question
134150
135151
136152@functools .lru_cache
You can’t perform that action at this time.
0 commit comments