Checking that a given date is in the past #4270
Replies: 1 comment
-
Hi @rachelbm97, For all the time and date dependent context, I created a simple Custom Tool (description: Useful to get today's day, date and time.), no input vars needed (well, you can pass the timezone) and with this simple JS function: const timeZone = 'Europe/Lisbon'; I then insctruted it in the System Message to use that tool when the user query is time or date dependent, to get today's date and current time. Hope this helps, that I understood your need! 🤗 |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I have a sequential agent flow which takes a date range from a file supplied by the user and saves it in a state value. I need to check that this date range is in the past, or get the user to confirm the range if it is not.
What is the best way to do this please? The agent can't check dates directly (even with the date/time node, it always says dates are in the future), and I've tried making a custom JS function but it doesn't seem to get called properly.
I'm pretty new to Flowise and definitely not an expert in coding, so sorry if this is a silly question. Thank you in advance for help!
Beta Was this translation helpful? Give feedback.
All reactions