Domain Seven Code Community by Tony DePrato

Domain Seven Code Community by Tony DePrato

Share this post

Domain Seven Code Community by Tony DePrato
Domain Seven Code Community by Tony DePrato
Add Web Search to Your AI Bot

Add Web Search to Your AI Bot

Cut Out the Middle Process and Search Directly

Domain Seven Code Community's avatar
Domain Seven Code Community
May 01, 2025
∙ Paid

Share this post

Domain Seven Code Community by Tony DePrato
Domain Seven Code Community by Tony DePrato
Add Web Search to Your AI Bot
Share

I am going to provide the full set of scripts here for Paid Subscribers.

Here is what this code will do:

I'm sharing a simple, flexible snippet written in Google Apps Script (JavaScript by nature) — but you can easily load this into your favorite AI model and convert it to Python 🐍. Honestly, Python is a better long-term play if you're hosting your own functions. AI integrations tend to behave more smoothly in that environment compared to JS.

Domain Seven Code Community by Tony DePrato is a reader-supported publication. I give 90% of all my work away for free to K-12 education and other non-profits. D7CC is a real business and can provide you with a W-9. This means you can pay for a subscribtion and use Professional Development Funds and use this work for CPEs and other requirements. This isn’t just a SubStackm, it is a dynamic learning space.

💡 Why this matters
AI-powered search is expensive. 💰💰💰💰💰
That’s why this setup chains your models in a smart way:
🔗 Search only happens when it's actually needed.

I’ve intentionally kept the design clean and minimal — but functional. Think of it as a blueprint. You can absolutely get fancier with it (and I hope you do — tag me if you make something wild 🚀).

Share

Share Domain Seven Code Community by Tony DePrato


🧩 Features

  • 🧠 Memory: Stores the last AI response in memory (can be extended with arrays or logs)

  • 🧮 Control costs: Limits use of high-cost operations like search

  • 🔄 Modular: Easy to swap components (e.g., model types, logic triggers)


⚠️ A final word of caution:
The more data you store in memory (especially across user sessions), the more you’ll pay. Keep it lean where you can.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Domain Seven Code Community
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share