Last active
May 23, 2025 06:22
-
-
Save jmcph4/4392617165f704b99913b9feb37a227f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "a05a994d-6c9f-4c30-a0d8-2fe6aff5fe0d", | |
"object": "chat.completion", | |
"created": 1747980285, | |
"model": "grok-3", | |
"choices": [ | |
{ | |
"index": 0, | |
"message": { | |
"role": "assistant", | |
"content": "Here is a digest of world news for the last 24 hours, based on available information up to May 23, 2025, 06:04 UTC. Since real-time data for the exact last 24 hours may be limited in my provided context, I’ve included the most recent and relevant updates from the web and social media sources where applicable. Note that some events may be based on posts found on X, which are not always verified, and I will indicate where information is speculative or unconfirmed.\n\n### Global News Digest (Last 24 Hours - May 22 to May 23, 2025)\n\n1. **Climate Crisis in Australia (Unconfirmed Report)** \n Severe flooding has been reported across New South Wales, Australia, with record-breaking rainfall and strong coastal winds impacting areas from Grafton to the Central Coast. According to a post on X, four deaths have been confirmed, with another person possibly affected, though this information lacks official verification at this time. (Source: Post on X)\n\n2. **Geopolitical Tensions in South Asia** \n A recent attack in Kashmir linked to the TRF (The Resistance Front) has reportedly escalated tensions between India and Pakistan, as noted in a post on X. Additionally, India’s oil imports from Russia have hit a 10-month high, potentially influencing regional economic dynamics. These reports are unconfirmed and should be treated with caution. (Source: Post on X)\n\n3. **U.S. Military Developments** \n The United States has unveiled a new “Golden Dome” missile defense system, according to a recent social media update. While specifics are unclear and the information is not officially confirmed, this could signal advancements in U.S. defense capabilities if verified. (Source: Post on X)\n\n4. **Broader Context from Recent Days (Beyond 24 Hours but Relevant)** \n - **U.S. Politics and International Relations**: President Donald Trump’s recent Oval Office interactions, including a televised meeting with South Africa’s President Cyril Ramaphosa, have been described as contentious, signaling a new dynamic in diplomatic engagements. (Source: CNN, published 1 day ago)\n - **Ukraine-Russia Conflict**: Discussions around peace talks continue to shift, with conflicting statements from world leaders following a Trump-Putin phone call earlier this week. Ukrainian President Zelenskyy has accused Russia of stalling truce negotiations. While not within the last 24 hours, these developments remain critical to the global landscape. (Source: BBC News, published 3 days ago)\n - **Middle East Tensions**: Israel’s ongoing operations in Gaza and potential plans for further escalation, including reported preparations for strikes on Iranian nuclear facilities (as per unconfirmed X posts and earlier CNN reports), continue to draw international concern. (Source: CNN and Posts on X)\n\n### Limitations and Notes\n- **Timeframe Constraints**: Specific news events directly within the last 24 hours (May 22, 06:04 UTC to May 23, 06:04 UTC) are limited in the provided data. Some of the most immediate updates come from unverified posts on X, and I’ve noted where confirmation is needed.\n- **Broader Context**: I’ve included slightly older but highly relevant stories (e.g., Trump’s diplomatic interactions and Ukraine-Russia talks) to provide a fuller picture of the global situation, as they continue to shape current events.\n- **Verification**: Information from X posts, such as the flooding in Australia or the Kashmir attack, should be treated as preliminary until confirmed by official sources.\n\nIf you’d like me to focus on a specific region or topic, or if you have access to additional real-time sources, I can refine this digest further. For the most up-to-date and verified information, I recommend checking trusted news outlets like VOA (Voice of America) or BBC News, which provide ongoing global coverage. (Source: VOA, published 20 hours ago)", | |
"refusal": {} | |
}, | |
"finish_reason": "stop" | |
} | |
], | |
"usage": { | |
"prompt_tokens": 2851, | |
"completion_tokens": 795, | |
"total_tokens": 3646, | |
"prompt_tokens_details": { | |
"text_tokens": 2851, | |
"audio_tokens": 0, | |
"image_tokens": 0, | |
"cached_tokens": 0 | |
}, | |
"completion_tokens_details": { | |
"reasoning_tokens": 0, | |
"audio_tokens": 0, | |
"accepted_prediction_tokens": 0, | |
"rejected_prediction_tokens": 0 | |
} | |
}, | |
"system_fingerprint": "fp_59df268501", | |
"citations": [ | |
"https://www.voanews.com/", | |
"https://www.cnn.com/2025/05/21/politics/trump-ramaphosa-south-africa-meeting-analysis", | |
"https://www.bbc.co.uk/news/articles/cvgddel17kvo", | |
"https://www.cnn.com/2025/05/20/us/5-things-to-know-for-may-20-russia-ukraine-israel-congresswoman-charged-ai-regulations-abandoned-chicks", | |
"https://www.bbc.co.uk/news/articles/c4ge7jq0px2o", | |
"https://www.bbc.com/news/articles/c4ge7jq0px2o", | |
"https://www.cnn.com/2025/05/19/middleeast/israel-pushes-deeper-into-gaza-what-we-know-intl", | |
"https://www.bbc.com/news/articles/ce9v28r7vlxo", | |
"https://x.com/s2_underground/status/1919534917345575212", | |
"https://x.com/tweet4Anna_NAFO/status/1918063886219223291", | |
"https://x.com/tweet4Anna_NAFO/status/1918428768084885726", | |
"https://x.com/tweet4Anna_NAFO/status/1918782770899218579", | |
"https://x.com/TheNavroopSingh/status/1921750120288203240", | |
"https://x.com/tweet4Anna_NAFO/status/1919875638665617576", | |
"https://x.com/0xMert_/status/1921350582024929660" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import requests | |
url = "https://api.x.ai/v1/chat/completions" | |
headers = { | |
"Content-Type": "application/json", | |
"Authorization": f"Bearer {os.getenv('XAI_API_KEY')}" | |
} | |
payload = { | |
"messages": [ | |
{ | |
"role": "user", | |
"content": "Provide me a digest of world news in the last 24 hours." | |
} | |
], | |
"search_parameters": { | |
"mode": "auto" | |
}, | |
"model": "grok-3-latest" | |
} | |
response = requests.post(url, headers=headers, json=payload) | |
print(response.json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment