PhippsAI is an 🧪 experimental project that integrates 💻 local generative AI with real-time 🌐 web search capabilities using function calling. The system is powered by 🧠 DeepSeek R1, running locally via llama.cpp, and employs 🔍 Tavily for live web searches.
- 🏠 Local AI Model: Runs DeepSeek R1 Distill Llama 8B, a distilled version of Llama 3.1 8B.
- ⚡ Function Calling Support: Allows the model to trigger web search actions when necessary.
- 🌐 Real-Time Web Search: Uses Tavily to fetch up-to-date information dynamically.
- 🏎️ Optimized for Efficiency: Leveraging llama.cpp, enabling fast and efficient execution on local hardware.
- 🌍 Cross-Language Support: Built as a Win64 Unicode DLL, making it compatible with any language via DLL bindings, running Windows 10 or higher.
- 🎯 Developed in Delphi: Requires Delphi 12.2 for building the DLL, but a prebuilt, ready-to-use DLL is included in the repository.
To run PhippsAI, you must use the following model:
- 🧠 Model Name:
deepseek-r1-distill-llama-8b-abliterated-q4_k_m.gguf
- 📥 Download Link: 🔗 Hugging Face Repository
- This model is a distilled version of Llama 3.1 8B.
- It supports 🔧 function calling, which is necessary for web search functionality.
- The AI model can ⚙️ call functions to perform real-time web searches as needed.
- The web search tool is powered by Tavily, enabling quick and accurate online information retrieval.
To enable 🌐 web search capabilities, you need to set up a Tavily account:
- 📝 Sign up for a free Tavily account: 🔗 Tavily Website
- 🔑 Obtain your Tavily API key after signing up.
There are two ways to provide the Tavily API key to PhippsAI:
Call the following function:
phSetSearchAPIKey('YOUR_TAVILY_APIKEY')
Set an environment variable for your API key:
- Create a new environment variable named
TAVILY_API_KEY
. - Assign it your Tavily API key.
If the API key is not manually provided, the system will automatically attempt to retrieve it from the environment variable.
Download PhippsAI from the GitHub repo:
- Download PhippsAI
- Add
PhippsAI
bindings to your project from thelib
folder.
Download the DeepSeek R1 model file from the provided Hugging Face link and store it in the appropriate directory.
📂 The examples use C:/LLM/GGUF
.
If you want to enable real-time web search, set up your Tavily API key as described above.
✅ We recommend the environment variable option.
Run the provided examples to see PhippsAI in action!
NOTE: This project is experimental and still a work in progress. There are known issues with function calling. At times, the model may attempt to reason out of a function call when it should simply execute it. Occasionally, it successfully calls the web search but displays the results with formatting errors. These and other similar edge cases are ongoing issues that still need to be addressed.
PhippsAI01.mp4
- 🐞 Report issues via the Issue Tracker.
- 💬 Engage in discussions on the Forum and Discord.
- 📚 Learn more at Learn Delphi.
Contributions to ✨ PhippsAI are highly encouraged! 🌟
- 🐛 Report Issues: Submit issues if you encounter bugs or need help.
- 💡 Suggest Features: Share your ideas to make PhippsAI even better.
- 🔧 Create Pull Requests: Help expand the capabilities and robustness of the library.
Your contributions make a difference! 🙌✨
PhippsAI is distributed under the 🆓 BSD-3-Clause License, allowing for redistribution and use in both source and binary forms, with or without modification, under specific conditions.
See the 📜 LICENSE file for more details.
🏰 Enhance your experience with PhippsAI – Your AI Butler, always at your service 🤖☕.