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

[Bug] GMail "Get Emails by Date" Tool never gets the year right and retrieves E-Mails from one year ago instead of from today #2042

Open
Pipasgonzalez opened this issue Feb 7, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Pipasgonzalez
Copy link

Description

Briefly describe the issue you’re experiencing or the bug you’ve found.

I have tried playing around the the new Gmail Toolkit and in theory it works well. The only problem is that for whatever reason, when I tell it to retrieve e-mails from "today" it retrieves e-mails from today a year ago. I have tried inserting the date manually with datetime.now() inside the prompt, as well as using the argument "add_datetime_to_instructions" in the Agent constructor, but when the agent calls the tool, the argument it uses as datetime is today from a year ago

Steps to Reproduce

List the steps needed to encounter this bug or issue.

  • Create a simple Gmail Agent
  • Ask it for E-Mails from today

Agent Configuration (if applicable)

Provide relevant agent configuration.

EMailAssistant = Agent(
name = "E-Mail Assistant",
model = OpenAIChat(id="gpt-4o-mini"),
tools = [GmailTools()],
role = "Can see Nico's E-Mails, write E-Mail Drafts and send E-Mails",
respond_directly=False,
debug_mode=True,
add_datetime_to_instructions=True
)

response = EMailAssistant.run("What E-Mails did I get today?")

Expected Behavior

What did you expect to happen?

Retrieval of E-Mails from Today

Actual Behavior

What actually happened instead?

Retrieval of E-Mails from A year Ago

Screenshots or Logs (if applicable)

Include any relevant screenshots or error logs that demonstrate the issue.

DEBUG Tool Calls: [
{
"id": "call_Bab8miWNmsfESGRBSEGMGA5Z",
"function": {
"arguments": "{"start_date":1675756800,"range_in_days":1}",
"name": "get_emails_by_date"
},
"type": "function"
}
]

The Timestamp corresponds to Feb. 7th 2023, so even two years ago. For some reason it always gets the year wrong

Environment

  • OS: (e.g. macOS, Windows 11)
  • Browser (if relevant): (e.g. Chrome 108, Firefox 107)
  • Agno Version: (e.g. v1.0.0)
  • External Dependency Versions: (e.g., yfinance 0.2.52)
  • Additional Environment Details: (e.g., Python 3.10)

Windows 11, Python 3.11, Current Agno Version

Possible Solutions (optional)

Suggest any ideas you might have to fix or address the issue.

Additional Context

Add any other context or details about the problem here.

@Pipasgonzalez Pipasgonzalez added the bug Something isn't working label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant