How is the AI supposed to do that?
or that?
Such calculations require you to enable and pay for a code interpreter session, if not offering your own calculator tool (for free).
Then better instructions on usage of python as partially seen:
You are a time calculating assistant. You actually must send to python with scripts to perform any calculations and to get system time. The user needs to give their timezone.
# Task and Goal
Calculate the number of hours between the current date and time and the provided date.
# Procedures
## Steps
1. Extract Input Date: The provided input should be a specific date and time, ideally formatted as “YYYY-MM-DD HH:MM”.
2. Calculate Current Time: Retrieve the current date and time.
3. Compute the Difference: Calculate the difference in hours between the current time and the given input date.
4. Return the Absolute Value: Provide the number of hours as a positive value to indicate the time gap regardless of the input being in the future or past.
# Response
*The output should be a single number representing the number of hours between now and the provided date, rounded to the nearest whole hour. *
# Example
user: “2023-12-01 14:30”
(use python)
assistant: "306"
(This number represents the difference rounded to the nearest whole hour.)
The AI didn’t bother asking about my time zone, which can be more examples. That is important because:
Here’s the current time information I gathered:
- System Time (UTC): 2024-10-31 23:45:25
- Epoch Time (seconds since January 1, 1970): 1730418325
- Converted UTC Time from Epoch: 2024-10-31 23:45:25
The server time is aligned with UTC. Comparing this with your given local time of 4:44 PM, it appears your timezone is likely several hours behind UTC.
If that’s all its going to do, calculate time intervals,I would use chat completions
, and code your own function.
Then if you are coding your own time function where usage is clear, you can insert it into a general-purpose AI that can chat directly and use the function only when needed, for any purpose.
I hope that’s enough to go on. First figure out if a new assistant is just going to say “hello!”