-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more accurate & consistent weekly gen
- Loading branch information
Showing
10 changed files
with
138 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
COACH_ROLE = "You are a talented running coach with years of experience. You have been hired by a client to help them improve their running performance. Your client has provided you with the following preferences: " | ||
COACH_ROLE = "You are a talented running coach with years of experience. You have been hired by a client to help them improve their running performance. Note: convert pace values where applicable e.g. 7.5 -> 7m 30s." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,63 @@ | ||
from enum import StrEnum | ||
from typing import Dict, List | ||
|
||
from pydantic import BaseModel, Field | ||
|
||
from src.types.session_type import SessionType | ||
|
||
class Day(StrEnum): | ||
MON = "mon" | ||
TUES = "tues" | ||
WED = "wed" | ||
THURS = "thurs" | ||
FRI = "fri" | ||
SAT = "sat" | ||
SUN = "sun" | ||
|
||
|
||
class SessionType(StrEnum): | ||
EASY = "easy run" | ||
LONG = "long run" | ||
SPEED = "speed workout" | ||
REST = "rest day" | ||
MODERATE = "moderate run" | ||
|
||
|
||
class TrainingSession(BaseModel): | ||
day: Day | ||
session_type: SessionType | ||
distance: float = Field(description="Distance in miles") | ||
notes: str = Field(description="notes for the session e.g. pace, terrain, etc.") | ||
notes: str = Field( | ||
description="Concise notes about the session, e.g. '2x2mi @ 10k pace' or 'easy pace'" | ||
) | ||
|
||
def __str__(self): | ||
return f"session_type={self.session_type}, distance={self.distance}, notes={self.notes}" | ||
return f"TrainingSession(session_type={self.session_type}, distance={self.distance}, weekly_mileage_cumulative={self.weekly_mileage_cumulative}, notes={self.notes})" | ||
|
||
def __repr__(self): | ||
return self.__str__() | ||
|
||
class TrainingWeekWithPlanning(BaseModel): | ||
planning: str = Field( | ||
description="Draft a plan (used internally) to aid in training week generation. You must adhere to the weekly mileage target and long run range. Do required math (step by step out loud) to plan the week successfully. If you end up exceeding the weekly mileage target, adjust one of the easy runs to be shorter." | ||
) | ||
training_week: List[TrainingSession] = Field( | ||
description="Unordered collection of training sessions for the week" | ||
) | ||
|
||
|
||
class TrainingWeekWithCoaching(BaseModel): | ||
typical_week_training_review: str | ||
"""Coach's review of the client's typical week of training""" | ||
|
||
weekly_mileage_target: str | ||
"""Coach's prescribed weekly mileage target for the client""" | ||
|
||
training_week_planning: str | ||
"""Internal planning for the client's training week""" | ||
|
||
class TrainingWeek(BaseModel): | ||
mon: TrainingSession | ||
tues: TrainingSession | ||
wed: TrainingSession | ||
thurs: TrainingSession | ||
fri: TrainingSession | ||
sat: TrainingSession | ||
sun: TrainingSession | ||
training_week: List[TrainingSession] | ||
"""Client's recommended training week""" | ||
|
||
def __str__(self): | ||
return "\n".join( | ||
[ | ||
f"{day}: {session['session_type']}, {session['distance']} miles, {session['notes']}" | ||
for day, session in self.dict().items() | ||
] | ||
) | ||
return f"{self.typical_week_training_review=}\n{self.weekly_mileage_target=}\n{self.training_week_planning=}\n{self.training_week=}" | ||
|
||
def __repr__(self): | ||
return self.__str__() |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.