-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Google Calender Tool Added #1510
base: main
Are you sure you want to change the base?
Conversation
phi/tools/googlecalender.py
Outdated
) | ||
raise ValueError("Credentials Path is invalid") | ||
|
||
if not token_path: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User authentication data is saved to a shared space, and everyone else will have access to someone else's calendar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for raising this concern! I’d like to clarify that in current setup I'm assuming each user operates within their own deployment, and the token.json file is stored locally within the deployment environment. I’m not entirely sure about the specifics of how deployments and storage are handled in the current PhiData app setup. I would love to get input from the maintainers here to ensure we’re following best practices for securely handling credentials.
If there’s a recommended approach for isolating tokens or managing user-specific authentication, I’m happy to implement that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the use of user_id examples. If the token will be stored as “{user_id}_token”, this will be enough for the first version.
The best way might be to use user storage, but that's a bit more complex.
tools=[GoogleCalenderTools(credentials_path="<PATH_TO_YOUR_CREDENTIALS_FILE>")], | ||
show_tool_calls=True, | ||
instructions=[GOOGLE_CALENDER_INSTRUCTION], | ||
provider=MistralChat(api_key=os.getenv("MISTRAL_API_KEY")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should automatically extract the MISTRAL_API_KEY in the MistralChat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one is quite nice. just one thing: it's calendar, not calender. |
Ah, my bad! 😅 Thanks for catching that @gabfssilva —I'll fix it to 'calendar' right away. |
Hey @VedantS20 Great work on this! |
Hi @VedantS20 Thank you for the updates. Will get this tested today 👍 |
Thank you @willemcdejongh for pointing this out. defaulting the token.json file to the directory of the credentials_path can lead to issues in environments with read-only permissions. for now, I have kept the default location as the current working directory . This will work for most cases. I’ll also look into improving the default behavior by using platform-specific writable directories . |
@VedantS20 Please rebase onto main. We have already merged a part of this earlier this week. So its only these final updates of yours that need to get merged. |
Hey @willemcdejongh , can you please guide me through the process ? . I noticed that my earlier changes are not present in the main branch. Could you clarify which parts were merged earlier? |
@VedantS20 I am wrong. It was not merged. You can just rebase your branch please and make sure there are no conflicts. |
Hey @willemcdejongh , While rebasing I'm getting Conflicts in the file |
Hey @VedantS20 I don't see any merge conflicts. I checked your branch, pulled all the latest changes for it and main. And was able to succesfully rebase with |
my bad @willemcdejongh , my fork was not synced , I'll do the rebasing |
@willemcdejongh I accidentally synced my feature branch with main instead of syncing my fork's main branch ;( . Should I reset my branch and rebase onto the latest main? |
Added Google Calender Tool which does the basic functionalities such as
This Fixes #1332 @manthanguptaa
I want to add few more functionalities which will need some more time .