Skip to content

A powerful Flask-based web application that enables an LLM to interact with multiple tools, performing complex tasks through intelligent function calling. Features include Python code execution, web search, Wikipedia lookup, image and YouTube search, and web scraping, all powered by a local language model.

Notifications You must be signed in to change notification settings

fivelity/llm-toolcall-wapp

 
 

Repository files navigation

LLM Tool Calling Web Application 🤖💬

Overview

This is a web application that enables a Large Language Model (LLM) to interact with multiple tools and perform tasks using function calling. Built with Flask and with LM Studio server, this application provides an interactive chat experience with multi-tool support.

🌟 Key Features

Multi-Tool Integration

  • 🐍 Python Code Execution: Run and analyze Python code directly in the chat
  • 🌐 Web Search: Perform real-time web searches and extract citations
  • 📚 Wikipedia Lookup: Instantly retrieve Wikipedia article introductions
  • 🖼️ Image Search: Find and display images related to your queries
  • 🎥 YouTube Search: Search and retrieve YouTube video information
  • 🔗 Web Scraping: Extract content from specific websites

Advanced Conversation Management

  • 💬 Persistent Conversations: Save and load chat histories
  • ♻️ Conversation Regeneration: Easily regenerate or delete last messages
  • 🏷️ Automatic Conversation Naming: Smart, context-aware conversation titles
  • 📜 Conversation Listing: Browse and manage your chat history

User Experience

  • 🎨 Responsive Design: Clean, modern UI with Tailwind CSS
  • </> Code Highlighting: Syntax highlighting with Prism.js
  • 📊 Markdown & Math Support: Render markdown and mathematical equations
  • 🌈 Tool Results Visualization: Interactive, collapsible tool result sections

🖥️ Screenshots

python web and image YT urls wikipidia history

🔧 Prerequisites

📦 Installation

1. Clone the Repository

git clone https://github.com/yossifibrahem/LLM-Tool-Calling-Web-Application.git
cd LLM-Tool-Calling-Web-Application

2. Install Dependencies

pip install numpy pandas sympy flask openai duckduckgo_search pytubefix youtube_transcript_api waitress

3. Set Environment Variables

# For Windows
set FLASK_ENV=production
set FLASK_DEBUG=0

# For Unix/MacOS
export FLASK_ENV=production
export FLASK_DEBUG=0

🚀 Running the Application

Option 1: Using Python

python server.py

Option 2: Using Batch File (Windows)

Double-click serverstart.bat

Access the Application

Open your browser and navigate to http://localhost:8080

🛠️ Tools Supported

  1. Python Execution

    • Execute Python code
    • Perform mathematical computations
    • Automate tasks
  2. Web Search

    • Find relevant websites
    • Extract citations
    • Configurable search depth
  3. Wikipedia Search

    • Fetch article introductions
    • Quick knowledge retrieval
  4. Web Scraping

    • Extract content from specific URLs
    • Retrieve webpage information
  5. YouTube Integration

    • Search videos
    • Retrieve video metadata
    • Get video transcriptions
  6. Image Search

    • Find and display images
    • Configurable result count

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

🙏 Acknowledgements

  • LM Studio
  • Open-source libraries and tools used in this project

📞 Support

For issues or questions, please open a GitHub issue or contact the maintainer.

This README is written Anthropic's Claude

About

A powerful Flask-based web application that enables an LLM to interact with multiple tools, performing complex tasks through intelligent function calling. Features include Python code execution, web search, Wikipedia lookup, image and YouTube search, and web scraping, all powered by a local language model.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 53.7%
  • HTML 36.9%
  • CSS 9.4%