From ac9db5c44bc73b00cb1276083b856288c8195065 Mon Sep 17 00:00:00 2001 From: greg pereira Date: Sat, 18 May 2024 17:39:15 -0700 Subject: [PATCH] write directly to output dir, no need for chat dir bc data in memory Signed-off-by: greg pereira --- worker/cmd/generate.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/worker/cmd/generate.go b/worker/cmd/generate.go index ea0595b..d007554 100644 --- a/worker/cmd/generate.go +++ b/worker/cmd/generate.go @@ -227,7 +227,6 @@ func (w *Worker) runPrecheckScoring(precheckPRAnswers []string, precheckEndpoint if WorkDir != "" { workDir = WorkDir } - chatlogDir := path.Join(workDir, "data", "chatlogs") combinedYAMLScoringPath := path.Join(outputDir, "combined_chatlog_scoring.yaml") type QuestionScore struct { @@ -244,7 +243,7 @@ func (w *Worker) runPrecheckScoring(precheckPRAnswers []string, precheckEndpoint yamlData := QuestionScoreReport{} for i := 0; i < len(precheckPRAnswers); i++ { - err, promptTemplate := generatePrecheckScoringPrompt(precheckPRAnswers[i], precheckPRQuestions[i]) + err, promptTemplate := generatePrecheckScoringPrompt(precheckPRAnswers[i], precheckEndpointAnswers[i]) if err != nil { w.logger.Errorf("Failed to generate a prompt for precheck scorring: %v", err) return err @@ -293,7 +292,7 @@ func (w *Worker) runPrecheckScoring(precheckPRAnswers []string, precheckEndpoint return err } - err = os.WriteFile(path.Join(chatlogDir, combinedYAMLScoringPath), scoringYaml, 0644) + err = os.WriteFile(combinedYAMLScoringPath, scoringYaml, 0644) if err != nil { w.logger.Errorf("Could not write chatlog to file: %v", err) return err