Skip to content

Commit

Permalink
send llm hours instead of minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
rphovley committed Nov 1, 2024
1 parent cb6c3b5 commit 0d477cf
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion src/services/bigBrotherService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,35 @@ export async function generatePerformanceReview(
): Promise<string> {
assert(anthropicClient.apiKey, 'ANTHROPIC_API_KEY is not set')

const prompt = await buildPromptFromWeeklyScores(weeklyReport)
// convert actuals to hours
const weeklyReportHours: Codeclimbers.WeeklyReportData = {
deepWorkTimeScore: {
...weeklyReport.deepWorkTimeScore,
actual: Math.round(weeklyReport.deepWorkTimeScore.actual / 60),
},
totalTimeScore: {
...weeklyReport.totalTimeScore,
actual: Math.round(weeklyReport.totalTimeScore.actual / 60),
},
growthScore: {
...weeklyReport.growthScore,
actual: Math.round(weeklyReport.growthScore.actual / 60),
},
projectTimeScore: {
...weeklyReport.projectTimeScore,
actual: Math.round(weeklyReport.projectTimeScore.actual / 60),
},
socialMediaTimeScore: {
...weeklyReport.socialMediaTimeScore,
actual: Math.round(weeklyReport.socialMediaTimeScore.actual / 60),
},
totalScore: {
...weeklyReport.totalScore,
actual: weeklyReport.totalScore.actual,
},
}

const prompt = await buildPromptFromWeeklyScores(weeklyReportHours)

const message = await anthropicClient.messages.create({
max_tokens: 1024,
Expand Down

0 comments on commit 0d477cf

Please sign in to comment.