A universal chat client implemented as a Jupyter notebook, using the OpenAI SDK to work with any OpenAI-compatible API provider. Currently supports web search and web extraction tools, with a roadmap for expanded tool capabilities.
- Universal API Support — Works with any OpenAI-compatible API (OpenAI, NVIDIA, DeepSeek, etc.)
- Web Search — Integrated DuckDuckGo search for real-time information retrieval
- Web Extract — URL content extraction for reading and analyzing web pages
- Time-Aware — Automatically aware of current date/time for contextual responses
- Sliding Context — Manages conversation history without unbounded memory growth
- Interactive Display — Rich Markdown output in Jupyter environment
- Language: Python 3.x
- Environment: Jupyter Notebook
- SDK: OpenAI Python Client
- Search: DuckDuckGo (ddgs)
- Configuration: python-dotenv for environment management
-
Clone or download this repository
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment:
cp ".env example" .env -
Edit
.envwith your API credentials:# Choose your provider OPENAI_API_KEY=your-api-key-here # or NVIDIA_API_KEY=your-nvidia-api-key-here # or DEEPSEEK_API_KEY=your-deepseek-api-key-here # Set API base URL (uncomment your provider) API_BASE_URL=https://api.openai.com/v1 # API_BASE_URL=https://integrate.api.nvidia.com/v1 # API_BASE_URL=https://api.deepseek.com # Optional: Specify model MODEL=gpt-4o
-
Open the notebook:
jupyter notebook chatNotebook.ipynb
-
Run all cells from top to bottom
-
Start chatting using the interactive interface
-
Tool usage is automatic—the model will invoke web search or extraction when needed
| Variable | Description | Example |
|---|---|---|
OPENAI_API_KEY |
Your API key | sk-... |
API_BASE_URL |
API endpoint URL | https://api.openai.com/v1 |
MODEL |
Model identifier | gpt-4o, google/diffusiongemma-26b-a4b-it |
EXTRA_BODY |
Model-specific parameters | {"chat_template_kwargs":{"thinking":true}} |
- ✅ OpenAI — Full feature support
- ✅ NVIDIA NIM — Optimized inference endpoints
- ✅ DeepSeek — Cost-effective alternative
- 🔄 Other OpenAI-compatible APIs — May require configuration
- Advanced Web Extraction — Integration of tools like
crawl4aifor deep web scraping, sitemap parsing, and structured data extraction - Code Execution Sandbox — Safe Python code execution environment
- File Operations — Read/write files, parse CSVs, JSON, PDFs
- Calculator Tool — Precise mathematical computations
- Calendar Integration — Schedule management and reminders
- Weather API — Real-time weather information
- Database Connector — SQL query execution and data analysis
- Email Integration — Send/receive emails via SMTP/IMAP
- Social Media Tools — Twitter/X, LinkedIn posting capabilities
- Image Generation — DALL-E, Stable Diffusion integration
- Voice/Speech — Text-to-speech and speech-to-text capabilities
- Multi-agent Collaboration — Coordinate between specialized AI agents
- Custom Tool Builder — GUI for creating custom tool integrations
- Plugin Ecosystem — Community-contributed tool marketplace
- Enterprise Features — SSO, audit logs, team collaboration
- Mobile App — iOS/Android native applications
- VS Code Extension — IDE-integrated chat interface
- Conversation Export — Save chats to various formats (PDF, Markdown, JSON)
- Theme Support — Dark/light mode customization
- Rate Limiting — Built-in request throttling and retry logic
- Caching Layer — Reduce API calls with intelligent response caching
- Multi-language Support — i18n for global accessibility
- Performance Metrics — Track latency, token usage, costs
/workspace
├── chatNotebook.ipynb # Main interactive notebook
├── requirements.txt # Python dependencies
├── .env example # Environment configuration template
├── .gitignore # Git ignore rules
├── LICENSE # MIT License
└── README.md # This file
- Python 3.8+
- Jupyter Notebook / JupyterLab
- API key from supported provider
See requirements.txt:
ipykernel— Jupyter kernelpython-dotenv— Environment variable managementddgs— DuckDuckGo search clientopenai— OpenAI SDK
Contributions are welcome! Areas of focus:
- New Tool Integrations — Add new capabilities following the existing pattern
- Provider Support — Test and document compatibility with additional API providers
- Bug Fixes — Report and fix issues via GitHub Issues
- Documentation — Improve guides, examples, and troubleshooting
- UI/UX Enhancements — Better notebook interface and user experience
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly with multiple providers
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License—see the LICENSE file for details.
- This is a research/educational project in active development
- Not production-ready without additional security hardening
- API costs apply—monitor your usage with respective providers
- Web scraping must comply with target sites'
robots.txtand terms of service - Handle API keys securely—never commit
.envfiles to version control
For issues, questions, or suggestions:
- 📝 Open an issue on GitHub
- 📧 Contact the maintainers
- 💬 Check existing discussions for common problems