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

enhance: add create and write google docs tools #360

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

njhale
Copy link
Member

@njhale njhale commented Jan 21, 2025

@@ -7,6 +7,7 @@ Share Credential: ../../oauth2 as google
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/spreadsheets
https://www.googleapis.com/auth/documents.readonly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove this scope? We don't need write AND readonly

@njhale njhale force-pushed the enhance/google-docs-write-doc branch 3 times, most recently from 003ff82 to 1994186 Compare January 22, 2025 21:10
@njhale njhale marked this pull request as ready for review January 22, 2025 21:11
@tybalex
Copy link
Contributor

tybalex commented Jan 23, 2025

Correct me if I'm wrong, but it looks like once the doc title is created, it can't get updated anymore by the UpdateDoc tool. Is this expected?

Metadata: bundle: true
Description: Tools for managing Google Docs
Share Tools: Read Doc
Share Tools: Read Google Doc, Update Google Doc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Share Tools: Read Google Doc, Update Google Doc
Share Tools: Read Google Doc, Update Google Doc, Create Google Doc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left this out on purpose because it's not really useful on its own.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it to the bundle

google/docs/tool.gpt Show resolved Hide resolved
Comment on lines 127 to 130
service.documents().batchUpdate(
documentId=file_id,
body={"requests": clear_requests}
).execute()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make both of these batch requests at once?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that's probably better. need to test if that causes issues with the doc indexing first.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated this to batch the clear request with the others.

@njhale njhale force-pushed the enhance/google-docs-write-doc branch from 1994186 to a9a8415 Compare January 23, 2025 16:24
@njhale njhale requested a review from thedadams January 23, 2025 16:24
@njhale
Copy link
Member Author

njhale commented Jan 23, 2025

Correct me if I'm wrong, but it looks like once the doc title is created, it can't get updated anymore by the UpdateDoc tool. Is this expected?

yeah, I decided to keep it simple. I can add the feature if we really need it.

@njhale njhale force-pushed the enhance/google-docs-write-doc branch from a9a8415 to 3f27f67 Compare January 23, 2025 17:18
@njhale njhale merged commit af5a039 into obot-platform:main Jan 23, 2025
1 check passed
@njhale njhale deleted the enhance/google-docs-write-doc branch January 23, 2025 17:38
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.

5 participants