
Security News
Open VSX Begins Implementing Pre-Publish Security Checks After Repeated Supply Chain Incidents
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.
trpc.group/trpc-go/trpc-agent-go/examples/google
Advanced tools
This example demonstrates how to use the Google Search tool with an AI agent for interactive conversations. The tool uses Google's Custom Search API to search for real-time web content, news, and information across all topics.
Make sure you have Go installed and the project dependencies are available.
The example requires the following environment variables:
| Variable | Description | Required | Default Value |
|---|---|---|---|
GOOGLE_API_KEY | API key for Google Custom Search API | Yes | `` |
GOOGLE_SEARCH_ENGINE_ID | Search Engine ID for Google Custom Search | Yes | `` |
OPENAI_API_KEY | API key for the model service | Yes | `` |
OPENAI_BASE_URL | Base URL for the model API endpoint | No | https://api.openai.com/v1 |
Note: Both GOOGLE_API_KEY and GOOGLE_SEARCH_ENGINE_ID are required for the Google Search tool to work. You need to:
| Argument | Description | Default Value |
|---|---|---|
-model | Name of the model to use | deepseek-chat |
search)The tool provides access to real-time web search results from Google:
Input:
{
"query": "string",
"searchSize": 5,
"searchOffset": 0,
"searchLang": "en"
}
Output:
{
"query": "string",
"items": [
{
"link": "string",
"title": "string",
"snippet": "string",
"desc": "string"
}
]
}
What Works (Real-time Web Search):
export GOOGLE_API_KEY="your-google-api-key"
export GOOGLE_SEARCH_ENGINE_ID="your-search-engine-id"
export OPENAI_API_KEY="your-openai-api-key"
go run main.go
export GOOGLE_API_KEY="your-google-api-key"
export GOOGLE_SEARCH_ENGINE_ID="your-search-engine-id"
export OPENAI_API_KEY="your-openai-api-key"
go run main.go -model gpt-4o-mini
export GOOGLE_API_KEY="your-google-api-key"
export GOOGLE_SEARCH_ENGINE_ID="your-search-engine-id"
export OPENAI_API_KEY="your-api-key"
export OPENAI_BASE_URL="https://generativelanguage.googleapis.com/v1beta/"
go run main.go -model gemini-2.5-flash
🚀 Google Search Chat Demo
Model: gemini-2.5-flash
Type 'exit' to end the conversation
Available tools: google_search
==================================================
✅ Google search chat ready! Session: google-session-1763222795
💡 Try asking questions like:
- What's the latest news about artificial intelligence?
- Search for current weather in New York
- Find recent developments in quantum computing
- Look up information about the latest iPhone release
- Search for current stock prices of tech companies
- Find information about upcoming tech conferences
ℹ️ Note: Google Search provides real-time web content and current information
👤 You: Find recent developments in quantum computing
🤖 Assistant: 🔍 Google Search initiated:
• google_search (ID: function-call-10658533461459928312)
Query: {"query":"recent developments in quantum computing","size":5,"lang":"en"}
🔄 Searching Google...
✅ Search results (ID: function-call-10658533461459928312): {"query":"recent developments in quantum computing","items":[{"link":"https://pme.uchicago.edu/news/world-quantum-day-2024-latest-developments-quantum-science-and-technology","title":"World Quantum Day 2024: The latest developments in quantum ...","snippet":"Apr 12, 2024 ... Secure communication through metropolitan-scale entangled quantum networks, quantum machine clusters for high-end computation, and quantum ..."},{"link":"https://www.wevolver.com/article/breakthroughs-in-quantum-computing","title":"Breakthroughs in Quantum Computing","snippet":"Aug 19, 2024 ... IBM's recent unveiling of the Condor processor represented a monumental leap in quantum computing with its 1,121 superconducting qubits, ...","desc":"Article #2 of Engineering the Quantum Future Series: Recent breakthroughs in quantum computing made substantial strides, driving closer to practical applications that could revolutionize industries by solving complex computational problems more efficiently."},{"link":"https://www.openaccessgovernment.org/the-latest-developments-in-quantum-computing-a-transformative-frontier/187748/","title":"The latest developments in quantum computing: A transformative ...","snippet":"Jan 21, 2025 ... One major breakthrough involves the development of hypercube network technologies, which enhance the scalability and performance of quantum ...","desc":"Quantum computing has been at the forefront of technological advancements, holding the potential to revolutionise fields ranging from cryptography to materials science"},{"link":"https://thequantuminsider.com/2025/01/08/2025-will-see-huge-advances-in-quantum-computing-so-what-is-a-quantum-chip-and-how-does-it-work/","title":"2025 Will See Huge Advances in Quantum Computing","snippet":"Jan 8, 2025 ... Quantum Computing Advancements in 2025 and Beyond ... In the next few years, quantum chips will continue to scale up. Importantly, the next ...","desc":"Many experts are expecting big advance in quantum computing in 2025, but what is a quantum chip and how does it work?"},{"link":"https://microtime.com/quantum-computing-in-2024-breakthroughs-challenges-and-what-lies-ahead/","title":"Quantum Computing: Breakthroughs, Challenges \u0026 What's Ahead","snippet":"Sep 5, 2024 ... 1. Increased Qubit Stability and Error Correction · 2. Quantum Supremacy Milestones · 3. Advancements in Quantum Algorithms · 4. Commercial Quantum ...","desc":"Quantum computing has rapidly evolved into one of the most exciting and promising fields in technology. Let's explore the latest developments."}]}
🤖 Assistant: Recent developments in quantum computing include:
* **Increased Qubit Stability and Error Correction:** Significant progress is being made in making qubits more stable and developing methods to correct errors, which is crucial for building reliable quantum computers.
* **Quantum Supremacy Milestones:** Researchers continue to achieve "quantum supremacy," demonstrating that quantum computers can solve certain problems much faster than even the most powerful classical computers.
* **Advancements in Quantum Algorithms:** New and improved quantum algorithms are being developed, which will unlock more applications for quantum computing in various fields.
* **Commercial Quantum Computing:** Companies are making strides in developing and offering commercial quantum computing solutions, making the technology more accessible.
* **Hypercube Network Technologies:** The development of hypercube network technologies is enhancing the scalability and performance of quantum computers.
* **Metropolitan-scale Entangled Quantum Networks:** Progress is being made in secure communication through entangled quantum networks that span metropolitan areas.
* **Quantum Machine Clusters:** The development of quantum machine clusters is aimed at high-end computation.
* **IBM's Condor Processor:** IBM unveiled its Condor processor, featuring 1,121 superconducting qubits, representing a major leap in quantum computing.
Many experts anticipate significant advancements in quantum computing, particularly in the scaling up of quantum chips, in 2025 and beyond.
Sources:
* [World Quantum Day 2024: The latest developments in quantum ...](https://pme.uchicago.edu/news/world-quantum-day-2024-latest-developments-quantum-science-and-technology)
* [Breakthroughs in Quantum Computing](https://www.wevolver.com/article/breakthroughs-in-quantum-computing)
* [The latest developments in quantum computing: A transformative ...](https://www.openaccessgovernment.org/the-latest-developments-in-quantum-computing-a-transformative-frontier/187748/)
* [2025 Will See Huge Advances in Quantum Computing](https://thequantuminsider.com/2025/01/08/2025-will-see-huge-advances-in-quantum-computing-so-what-is-a-quantum-chip-and-how-does-it-work/)
* [Quantum Computing: Breakthroughs, Challenges & What's Ahead](https://microtime.com/quantum-computing-in-2024-breakthroughs-challenges-and-what-lies-ahead/)
👤 You: exit
👋 Goodbye!
Google Search provides access to the entire indexed web, including:
Content Types:
Basic Search Features:
Advanced Features:
This example showcases how AI agents can be enhanced with real-time web search capabilities to provide accurate, current information from the entire web, making it valuable for applications requiring up-to-date knowledge and information verification.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.