Replies: 1 comment
-
This is great callout @adieyal. You're right we'll have to customize https://github.com/phidatahq/phidata/blob/main/phi/utils/json_schema.py#L6-L22 Then we'll also have to update the execute function to handle incoming datetimes because they'll come as strings from the LLM, and we'll have to parse them into datetime objects https://github.com/phidatahq/phidata/blob/main/phi/tools/function.py#L74-L102 I can work on this over the weekend |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks for an excellent library.
I was wondering what the best approach for defining tools whose functions have datetime arguments. From my reading of the code, it seems that you need to create a custom
Function
sinceget_json_schema
doesn't handle dates. e.g.perhaps an alternative would be to customise
get_json_schema
and then overridefrom_callable
to use the new function?phidata/phi/tools/function.py
Lines 27 to 44 in a598b58
Beta Was this translation helpful? Give feedback.
All reactions