Skip to content

Commit

Permalink
Merge pull request #9 from dhananjay-mk/single-day
Browse files Browse the repository at this point in the history
fix for historical or future single date specified
  • Loading branch information
jimdowling authored Jun 18, 2024
2 parents 670d295 + 83fa435 commit 485452d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions notebooks/ch03/functions/air_quality_data_retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def get_historical_data_for_date(date: str, feature_view, weather_fg, model) ->
date_datetime = datetime.datetime.strptime(date, "%Y-%m-%d").date()

features_df, labels_df = feature_view.training_data(
start_time=date_datetime - datetime.timedelta(days=1),
end_time=date_datetime,
start_time=date_datetime,
end_time=date_datetime + datetime.timedelta(days=1),
# event_time=True,
statistics_config=False
)
Expand Down
9 changes: 6 additions & 3 deletions notebooks/ch03/functions/context_engineering.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ def get_function_calling_prompt(user_query):
###INSTRUCTIONS:
- You need to choose one function to use and retrieve paramenters for this function from the user input.
- If the user query contains 'will', and specifies a single day or date, use get_future_data_for_date function
- If the user query contains 'will', and specifies a range of days or dates, use or get_future_data_in_date_range function.
- If the user query is for future data, but only includes a single day or date, use the get_future_data_for_date function.
- If the user query contains 'will', and specifies a single day or date, use get_future_data_in_date_range function
- If the user query contains 'will', and specifies a range of days or dates, use get_future_data_in_date_range function.
- If the user query is for future data, but only includes a single day or date, use the get_future_data_in_date_range function,
- If the user query contains 'today' or 'yesterday', use get_historical_data_for_date function.
- If the user query contains 'tomorrow', use get_future_data_in_date_range function.
- If the user query is for historical data, and specifies a range of days or dates, use use get_historical_data_for_date function.
- If the user says a day of the week, assume the date of that day is when that day next arrives.
- Do not include feature_view and model parameters.
- Provide dates STRICTLY in the YYYY-MM-DD format.
Expand Down

0 comments on commit 485452d

Please sign in to comment.