{"id":22388063,"url":"https://github.com/tinybiggames/phippsai","last_synced_at":"2025-04-05T14:24:44.107Z","repository":{"id":276388149,"uuid":"929146197","full_name":"tinyBigGAMES/PhippsAI","owner":"tinyBigGAMES","description":"Your Personal AI Butler","archived":false,"fork":false,"pushed_at":"2025-02-18T09:43:34.000Z","size":4630,"stargazers_count":16,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T16:13:30.225Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinyBigGAMES.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tinyBigGAMES","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-02-07T22:24:00.000Z","updated_at":"2025-03-11T13:14:27.000Z","dependencies_parsed_at":"2025-02-07T23:34:57.521Z","dependency_job_id":null,"html_url":"https://github.com/tinyBigGAMES/PhippsAI","commit_stats":null,"previous_names":["tinybiggames/phippsai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyBigGAMES%2FPhippsAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyBigGAMES%2FPhippsAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyBigGAMES%2FPhippsAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinyBigGAMES%2FPhippsAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinyBigGAMES","download_url":"https://codeload.github.com/tinyBigGAMES/PhippsAI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247348325,"owners_count":20924543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library","llm-inference","local-inference","ollama","ollama-api","win64","windows-10","windows-11"],"created_at":"2024-12-05T02:12:18.702Z","updated_at":"2025-04-05T14:24:44.099Z","avatar_url":"https://github.com/tinyBigGAMES.png","language":"Pascal","readme":"\n![PhippsAI](media/phippsai.png)  \n[![Chat on Discord](https://img.shields.io/discord/754884471324672040?style=for-the-badge)](https://discord.gg/tPWjMwK)\n[![Follow on Bluesky](https://img.shields.io/badge/Bluesky-tinyBigGAMES-blue?style=for-the-badge\u0026logo=bluesky)](https://bsky.app/profile/tinybiggames.com)  \n\nPhippsAI 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.\n\n## 🚀 Features\n- 🏠 **Local AI Model**: Runs **DeepSeek R1 Distill Llama 8B**, a distilled version of **Llama 3.1 8B**.\n- ⚡ **Function Calling Support**: Allows the model to trigger web search actions when necessary.\n- 🌐 **Real-Time Web Search**: Uses **Tavily** to fetch up-to-date information dynamically.\n- 🏎️ **Optimized for Efficiency**: Leveraging **llama.cpp**, enabling fast and efficient execution on local hardware.\n- 🌍 **Cross-Language Support**: Built as a **Win64 Unicode DLL**, making it compatible with any language via DLL bindings, running Windows 10 or higher.\n- 🎯 **Developed in Delphi**: Requires Delphi 12.2 for building the DLL, but a prebuilt, ready-to-use DLL is included in the repository.\n\n## 📥 Model Requirements\n\n### 📌 Required Model\nTo run **PhippsAI**, you must use the following model:\n\n- **🧠 Model Name**: `deepseek-r1-distill-llama-8b-abliterated-q4_k_m.gguf`\n- 📥 **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)\n\n### 📝 Model Overview\n- This model is a **distilled** version of **Llama 3.1 8B**.\n- It supports **🔧 function calling**, which is necessary for web search functionality.\n\n## 🌍 Web Search Integration\n\n### 🛠️ Implemented Tool: Web Search\n- The AI model can **⚙️ call functions** to perform real-time web searches as needed.\n- The web search tool is powered by **Tavily**, enabling quick and accurate online information retrieval.\n\n### ⚙️ Setting Up Web Search\nTo enable **🌐 web search capabilities**, you need to set up a **Tavily** account:\n- 📝 Sign up for a free **Tavily** account: [🔗 Tavily Website](https://tavily.com/)\n- 🔑 Obtain your **Tavily API key** after signing up.\n\n### 🔧 Setting the API Key\nThere are two ways to provide the **Tavily API key** to PhippsAI:\n\n#### **🛠️ Option 1: Set API Key in Code**\nCall the following function:\n```delphi\nphSetSearchAPIKey('YOUR_TAVILY_APIKEY')\n```\n\n#### **🌍 Option 2: Use an Environment Variable**\nSet an **environment variable** for your API key:\n- Create a new environment variable named **`TAVILY_API_KEY`**.\n- Assign it your **Tavily API key**.\n\nIf the API key is not manually provided, the system will automatically attempt to retrieve it from the environment variable.\n\n## 🚀 Getting Started\n\n### 📥 1. Download PhippsAI\nDownload **PhippsAI** from the **GitHub repo**:  \n- [Download PhippsAI](https://github.com/tinyBigGAMES/PhippsAI/archive/refs/heads/main.zip)\n- Add `PhippsAI` bindings to your project from the `lib` folder.\n\n### 📥 2. Download the Model\nDownload the **DeepSeek R1** model file from the provided **Hugging Face** link and store it in the appropriate directory.  \n📂 The examples use `C:/LLM/GGUF`.\n\n### 🔧 3. Configure Web Search\nIf you want to enable **real-time web search**, set up your **Tavily API key** as described above.  \n✅ We recommend the environment variable option.\n\n### ▶️ 4. Run the Examples\nRun the provided examples to see **PhippsAI** in action!\n\n**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.\n\n## 📺 Media\n\n\nhttps://github.com/user-attachments/assets/9f7a8fc5-8888-4e82-ad73-d7239993c245\n\n\n## 🛠️ Support and Resources\n\n- 🐞 **Report issues** via the [Issue Tracker](https://github.com/tinyBigGAMES/PhippsAI/issues).\n- 💬 **Engage in discussions** on the [Forum](https://github.com/tinyBigGAMES/PhippsAI/discussions) and [Discord](https://discord.gg/tPWjMwK).\n- 📚 **Learn more** at [Learn Delphi](https://learndelphi.org).\n\n## 🤝 Contributing  \n\nContributions to **✨ PhippsAI** are highly encouraged! 🌟  \n- 🐛 **Report Issues:** Submit issues if you encounter bugs or need help.  \n- 💡 **Suggest Features:** Share your ideas to make **PhippsAI** even better.  \n- 🔧 **Create Pull Requests:** Help expand the capabilities and robustness of the library.  \n\nYour contributions make a difference! 🙌✨\n\n#### Contributors 👥🤝\n\u003cbr/\u003e\n\n\u003ca href=\"https://github.com/tinyBigGAMES/PhippsAI/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=tinyBigGAMES/PhippsAI\u0026max=250\u0026columns=10\u0026anon=1\" /\u003e\n\u003c/a\u003e\n\n## 📜 Licensing\n\n**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.  \nSee the [📜 LICENSE](https://github.com/tinyBigGAMES/PhippsAI?tab=BSD-3-Clause-1-ov-file#BSD-3-Clause-1-ov-file) file for more details.\n\n---\n\n🏰 **Enhance your experience with PhippsAI – Your AI Butler, always at your service 🤖☕.**  \n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"media/delphi.png\" alt=\"Delphi\"\u003e\n\u003c/p\u003e\n\u003ch5 align=\"center\"\u003e\n  \nMade with ❤️ in Delphi  \n","funding_links":["https://github.com/sponsors/tinyBigGAMES"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybiggames%2Fphippsai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinybiggames%2Fphippsai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinybiggames%2Fphippsai/lists"}