|
22 | 22 | ModelRequest,
|
23 | 23 | ModelResponse,
|
24 | 24 | RetryPromptPart,
|
| 25 | + ServerToolCallPart, |
| 26 | + ServerToolReturnPart, |
25 | 27 | SystemPromptPart,
|
26 | 28 | TextPart,
|
27 | 29 | ToolCallPart,
|
@@ -692,3 +694,105 @@ async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_k
|
692 | 694 |
|
693 | 695 | result = await agent.run('What day is today?')
|
694 | 696 | assert result.output == snapshot('The current day is Tuesday.')
|
| 697 | + assert result.all_messages() == snapshot( |
| 698 | + [ |
| 699 | + ModelRequest(parts=[UserPromptPart(content='What day is today?', timestamp=IsDatetime())]), |
| 700 | + ModelResponse( |
| 701 | + parts=[ |
| 702 | + ServerToolCallPart( |
| 703 | + tool_name='search', |
| 704 | + args='{"query": "What is the current date?"}', |
| 705 | + tool_call_id='0', |
| 706 | + model_name='groq', |
| 707 | + ), |
| 708 | + ServerToolReturnPart( |
| 709 | + tool_name='search', |
| 710 | + content="""\ |
| 711 | +Title: Today's Date - Find Out Quickly What's The Date Today ️ |
| 712 | +URL: https://calendarhours.com/todays-date/ |
| 713 | +Content: The current date in RFC 2822 Format with shortened day of week, numerical date, three-letter month abbreviation, year, time, and time zone is: Tue, 13 May 2025 06:07:56 -0400; The current date in Unix Epoch Format with number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT) is: |
| 714 | +Score: 0.8299 |
| 715 | +
|
| 716 | +Title: Today's Date | Current date now - MaxTables |
| 717 | +URL: https://maxtables.com/tools/todays-date.html |
| 718 | +Content: The current date, including day of the week, month, day, and year. The exact time, down to seconds. Details on the time zone, its location, and its GMT difference. A tool to select the present date. A visual calendar chart. Why would I need to check Today's Date on this platform instead of my device? |
| 719 | +Score: 0.7223 |
| 720 | +
|
| 721 | +Title: Current Time and Date - Exact Time! |
| 722 | +URL: https://time-and-calendar.com/ |
| 723 | +Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchonizing in real time with our server clock. |
| 724 | +Score: 0.6799 |
| 725 | +
|
| 726 | +Title: Today's Date - CalendarDate.com |
| 727 | +URL: https://www.calendardate.com/todays.htm |
| 728 | +Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemishpere flip seasons - i.e. Winter is Summer. |
| 729 | +Score: 0.6416 |
| 730 | +
|
| 731 | +Title: What is the date today | Today's Date |
| 732 | +URL: https://www.datetoday.info/ |
| 733 | +Content: Master time tracking with Today's Date. Stay updated with real-time information on current date, time, day of the week, days left in the week, current day and remaining days of the year. Explore time in globally accepted formats. Keep up with the current week and month, along with the remaining weeks and months for the year. Embrace efficient time tracking with Today's Date. |
| 734 | +Score: 0.6282 |
| 735 | +
|
| 736 | +Title: Explore Today's Date, Time Zones, Holidays & More |
| 737 | +URL: https://whatdateis.today/ |
| 738 | +Content: Check what date and time it is today (May 8, 2025). View current time across different time zones, upcoming holidays, and use our date calculator. Your one-stop destination for all date and time information. |
| 739 | +Score: 0.6181 |
| 740 | +
|
| 741 | +Title: Today's Date and Time - Date and Time Tools |
| 742 | +URL: https://todaysdatetime.com/ |
| 743 | +Content: Discover today's exact date and time, learn about time zones, date formats, and explore our comprehensive collection of date and time tools including calculators, converters, and calendars. ... Get the exact current date and time, along with powerful calculation tools for all your scheduling needs. 12h. Today. Day 76 of year (366) Yesterday |
| 744 | +Score: 0.5456 |
| 745 | +
|
| 746 | +Title: Current Time Now - What time is it? - RapidTables.com |
| 747 | +URL: https://www.rapidtables.com/tools/current-time.html |
| 748 | +Content: This page includes the following information: Current time: hours, minutes, seconds. Today's date: day of week, month, day, year. Time zone with location and GMT offset. |
| 749 | +Score: 0.4255 |
| 750 | +
|
| 751 | +Title: Current Time |
| 752 | +URL: https://www.timeanddate.com/ |
| 753 | +Content: Welcome to the world's top site for time, time zones, and astronomy. Organize your life with free online info and tools you can rely on. No sign-up needed. Sign in. News. News Home; Astronomy News; ... Current Time. Monday May 12, 2025 Roanoke Rapids, North Carolina, USA. Set home location. 11:27: 03 pm. World Clock. |
| 754 | +Score: 0.3876 |
| 755 | +
|
| 756 | +Title: Current local time in the United States - World clock |
| 757 | +URL: https://dateandtime.info/country.php?code=US |
| 758 | +Content: Time and Date of DST Change Time Change; DST started: Sunday, March 9, 2025 at 2:00 AM: The clocks were put forward an hour to 3:00 AM. DST ends: Sunday, November 2, 2025 at 2:00 AM: The clocks will be put back an hour to 1:00 AM. DST starts: Sunday, March 8, 2026 at 2:00 AM: The clocks will be put forward an hour to 3:00 AM. |
| 759 | +Score: 0.3042 |
| 760 | +
|
| 761 | +Title: Time.is - exact time, any time zone |
| 762 | +URL: https://time.is/ |
| 763 | +Content: 7 million locations, 58 languages, synchronized with atomic clock time. Time.is. Get Time.is Ad-free! Exact time now: 05:08:45. Tuesday, 13 May, 2025, week 20. Sun: ↑ 05:09 ↓ 20:45 (15h 36m) - More info - Make London time default - Remove from favorite locations |
| 764 | +Score: 0.2796 |
| 765 | +
|
| 766 | +Title: Time in United States now |
| 767 | +URL: https://time.is/United_States |
| 768 | +Content: Exact time now, time zone, time difference, sunrise/sunset time and key facts for United States. Time.is. Get Time.is Ad-free! Time in United States now . 11:17:42 PM. Monday, May 12, 2025. United States (incl. dependent territories) has 11 time zones. The time zone for the capital Washington, D.C. is used here. |
| 769 | +Score: 0.2726 |
| 770 | +
|
| 771 | +Title: Current Local Time in the United States - timeanddate.com |
| 772 | +URL: https://www.timeanddate.com/worldclock/usa |
| 773 | +Content: United States time now. USA time zones and time zone map with current time in each state. |
| 774 | +Score: 0.2519 |
| 775 | +
|
| 776 | +Title: Current local time in United States - World Time Clock & Map |
| 777 | +URL: https://24timezones.com/United-States/time |
| 778 | +Content: Check the current time in United States and time zone information, the UTC offset and daylight saving time dates in 2025. |
| 779 | +Score: 0.2221 |
| 780 | +
|
| 781 | +Title: The World Clock — Worldwide - timeanddate.com |
| 782 | +URL: https://www.timeanddate.com/worldclock/ |
| 783 | +Content: World time and date for cities in all time zones. International time right now. Takes into account all DST clock changes. |
| 784 | +Score: 0.2134 |
| 785 | +
|
| 786 | +""", |
| 787 | + tool_call_id='0', |
| 788 | + timestamp=IsDatetime(), |
| 789 | + ), |
| 790 | + TextPart(content='The current day is Tuesday.'), |
| 791 | + ], |
| 792 | + usage=Usage(requests=1, request_tokens=4287, response_tokens=117, total_tokens=4404), |
| 793 | + model_name='compound-beta', |
| 794 | + timestamp=IsDatetime(), |
| 795 | + vendor_id='stub', |
| 796 | + ), |
| 797 | + ] |
| 798 | + ) |
0 commit comments