Skip to content

Commit

Permalink
feat: adding final cases
Browse files Browse the repository at this point in the history
  • Loading branch information
webtaken committed Oct 19, 2023
1 parent c2f8bcd commit 2b84a22
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions go-server/services/youtube.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ func AnalyzeComments(
commentsToAnalyze = maxNumComments - commentsRetrieved
}
commentsRetrieved += commentsToAnalyze
// fmt.Printf("%v\n", commentsRetrieved)
go analyzer(response.Items[:commentsToAnalyze])

nextPageToken = response.NextPageToken
Expand Down Expand Up @@ -302,14 +301,14 @@ func Analyze(body models.YoutubeAnalyzerReqBody, plan string) (*models.YoutubeAn
results.NegativeComments = results.NegativeComments[:results.NegativeCommentsLimit]
fmt.Printf("[Analyze] Number of most negative comments after 30%% handling: %d\n",
len(results.NegativeComments))
// if results.NegativeCommentsLimit > 0 {
// recommendation, err := GetRecommendation(results)
// if err != nil {
// results.RecommendationChatGPT = ""
// return results, err
// }
// results.RecommendationChatGPT = recommendation
// }
if results.NegativeCommentsLimit > 0 {
recommendation, err := GetRecommendation(results)
if err != nil {
results.RecommendationChatGPT = ""
return results, err
}
results.RecommendationChatGPT = recommendation
}
return results, nil
}

Expand Down

0 comments on commit 2b84a22

Please sign in to comment.