Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added plugin to get time #360

Merged
merged 8 commits into from
Jul 2, 2023
Merged

feat: added plugin to get time #360

merged 8 commits into from
Jul 2, 2023

Conversation

noriellecruz
Copy link
Contributor

@noriellecruz noriellecruz commented Jul 2, 2023

added plugin to get time from a timezone/location using https://worldtimeapi.org

image

requires WORLDTIME_DEFAULT_TIMEZONE in .env file

@noriellecruz noriellecruz changed the title Feature/support functions feat: added plugin to get time Jul 2, 2023
@n3d1117
Copy link
Owner

n3d1117 commented Jul 2, 2023

This is awesome, thanks @noriellecruz!
One small suggestion, could this work with plain http requests instead of introducing the WorldTimeApi dependency?

@noriellecruz
Copy link
Contributor Author

@n3d1117 sure, i agree that using plain http requests would be better since it removes the need to install a new module. let me work that out.

@noriellecruz
Copy link
Contributor Author

hi @n3d1117 can you check it again?

@n3d1117
Copy link
Owner

n3d1117 commented Jul 2, 2023

Thanks @noriellecruz for the changes, looks good to me! Will merge soon

@n3d1117 n3d1117 merged commit d29d392 into n3d1117:feature/support-functions Jul 2, 2023
@noriellecruz noriellecruz deleted the feature/support-functions branch July 2, 2023 18:44
@n3d1117
Copy link
Owner

n3d1117 commented Jul 2, 2023

@noriellecruz hey, fwiw just wanted to let you know that i slightly improved your original plugin: turns out the model is smart enough to make timezone conversions on the fly (no need for area/location separately).

So it now also works for specific cities that aren't in the tz database! For example, if I ask "What time is it in Corfu?" the model will correctly resolve the timezone to "Europe/Athens". Let me know if you have any thoughts!

ff8101b

@noriellecruz
Copy link
Contributor Author

@n3d1117 yeah, i saw it, it's neat. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants