-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add Gmail Thread Tools #159
Conversation
|
||
emails = process_messages(service, messages) | ||
return json.dumps({"emails": emails}) | ||
return {"emails": emails} |
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.
Thanks for dumping dumps
!
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.
💩
page_token: Annotated[ | ||
Optional[str], "Page token to retrieve a specific page of results in the list" |
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.
Q: Do we want to expose page_token
to the LLM? It looks like it's used internally by our function to paginate up to max_results
. Thinking out loud, I guess if the LLM specified a page token, it would start at that page and then continue up to max_results
?
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.
I had this same debate myself. Ultimately I decided to leave it in, but I'm interested in what you think about the pros/cons that I weighed during that decision:
Pros
The following type of interaction is impossible without the page_token
param:
User: "list 10 threads"
Assistant: "here are the 10 threads..."
User: "list the next 5 threads"
Cons
- more tokens to define the tool schema for a parameter that will likely not be needed most of the time
- Gives the LLM the opportunity to hallucinate the
page_token
param when using the LLM api. I did not see this happen during my testing, but that's not to say it couldn't happen!
"from": headers.get("from", ""), | ||
"date": headers.get("date", ""), | ||
"subject": headers.get("subject", "No subject"), | ||
"subject": headers.get("subject", ""), |
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.
Good change, ideally we don't insert many of these "interpretations" ourselves 👍
Makes sense. I think the pros outweigh the cons. I forget (on mobile atm),
did you encode that scenario of listing the next 5 in an eval?
…On Wed, Nov 20, 2024, 10:17 Eric Gustin ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In toolkits/google/arcade_google/tools/gmail.py
<#159 (comment)>:
> + page_token: Annotated[
+ Optional[str], "Page token to retrieve a specific page of results in the list"
I had this same debate myself. Ultimately I decided to leave it in, but
I'm interested in what you think about the pros/cons that I weighed during
that decision:
Pros
The following type of interaction is impossible without the page_token
param:
User: "list 10 threads"
Assistant: "here are the 10 threads..."
User: "list the next 5 threads"
Cons
1. more tokens to define the tool schema for a parameter that will
likely not be needed most of the time
2. Gives the LLM the opportunity to hallucinate the page_token param.
I did not see this happen during my testing, but that's not to say it
couldn't happen!
—
Reply to this email directly, view it on GitHub
<#159 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZNI2V4FOR3HJX6TK2KROT2BTG33AVCNFSM6AAAAABSDIFGX2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDINBZGM4DAOJTGY>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
PR Description