https://github.com/tinybiggames/phippsai
Your Personal AI Butler
https://github.com/tinybiggames/phippsai
library llm-inference local-inference ollama ollama-api win64 windows-10 windows-11
Last synced: 10 months ago
JSON representation
Your Personal AI Butler
- Host: GitHub
- URL: https://github.com/tinybiggames/phippsai
- Owner: tinyBigGAMES
- License: bsd-3-clause
- Created: 2025-02-07T22:24:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-18T09:43:34.000Z (12 months ago)
- Last Synced: 2025-04-02T16:13:30.225Z (11 months ago)
- Language: Pascal
- Size: 4.42 MB
- Stars: 16
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

[](https://discord.gg/tPWjMwK)
[](https://bsky.app/profile/tinybiggames.com)
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.
## ๐ Features
- ๐ **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.
## ๐ฅ Model Requirements
### ๐ Required Model
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](https://huggingface.co/tinybiggames/DeepSeek-R1-Distill-Llama-8B-abliterated-Q4_K_M-GGUF/resolve/main/deepseek-r1-distill-llama-8b-abliterated-q4_k_m.gguf?download=true)
### ๐ Model Overview
- This model is a **distilled** version of **Llama 3.1 8B**.
- It supports **๐ง function calling**, which is necessary for web search functionality.
## ๐ Web Search Integration
### ๐ ๏ธ Implemented Tool: Web Search
- 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.
### โ๏ธ Setting Up Web Search
To enable **๐ web search capabilities**, you need to set up a **Tavily** account:
- ๐ Sign up for a free **Tavily** account: [๐ Tavily Website](https://tavily.com/)
- ๐ Obtain your **Tavily API key** after signing up.
### ๐ง Setting the API Key
There are two ways to provide the **Tavily API key** to PhippsAI:
#### **๐ ๏ธ Option 1: Set API Key in Code**
Call the following function:
```delphi
phSetSearchAPIKey('YOUR_TAVILY_APIKEY')
```
#### **๐ Option 2: Use an Environment Variable**
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.
## ๐ Getting Started
### ๐ฅ 1. Download PhippsAI
Download **PhippsAI** from the **GitHub repo**:
- [Download PhippsAI](https://github.com/tinyBigGAMES/PhippsAI/archive/refs/heads/main.zip)
- Add `PhippsAI` bindings to your project from the `lib` folder.
### ๐ฅ 2. Download the Model
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`.
### ๐ง 3. Configure Web Search
If you want to enable **real-time web search**, set up your **Tavily API key** as described above.
โ
We recommend the environment variable option.
### โถ๏ธ 4. Run the Examples
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.
## ๐บ Media
https://github.com/user-attachments/assets/9f7a8fc5-8888-4e82-ad73-d7239993c245
## ๐ ๏ธ Support and Resources
- ๐ **Report issues** via the [Issue Tracker](https://github.com/tinyBigGAMES/PhippsAI/issues).
- ๐ฌ **Engage in discussions** on the [Forum](https://github.com/tinyBigGAMES/PhippsAI/discussions) and [Discord](https://discord.gg/tPWjMwK).
- ๐ **Learn more** at [Learn Delphi](https://learndelphi.org).
## ๐ค Contributing
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! ๐โจ
#### Contributors ๐ฅ๐ค
## ๐ Licensing
**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](https://github.com/tinyBigGAMES/PhippsAI?tab=BSD-3-Clause-1-ov-file#BSD-3-Clause-1-ov-file) file for more details.
---
๐ฐ **Enhance your experience with PhippsAI โ Your AI Butler, always at your service ๐คโ.**
Made with โค๏ธ in Delphi