Skip to content

Commit

Permalink
add phpdoc to process_feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed Mar 30, 2024
1 parent c1f61a1 commit 2a42e5d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions question.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ public function grade_response(array $response) : array {

return $grade;
}
/**
*
* Convert string json returned from LLM call to an object,
* if it is not valid json apend as string to new object
*
* @param string $feedback
* @return \stdClass
*/
public function process_feedback(string $feedback) {
$contentobject = json_decode($feedback);
if (json_last_error() === JSON_ERROR_NONE) {
Expand Down

0 comments on commit 2a42e5d

Please sign in to comment.