https://www.boundaryml.com logo
🟡 Questions on current date in prompt and list le...
# questions
u
(1) Is there any way to have current date in a prompt? like this:
persistence score
indicates the amount of risk for an industry sector from year 2008 to {datetime.now().year}.
Maximum
is
{(datetime.now().year-2008)*2}
and
Minimum
is
0
. (2) How can I define min and max length of a list ? riskAnalysis: List[RiskSuggestion] = Field(..., description="List of identified risks with details.", min_length=4, max_length=5)
b
unfortunately (1) will have to be passed in from the calling lang
(2) can be done using assertions https://docs.boundaryml.com/ref/attributes/assert
u
Thank you bro.