https://github.com/tinybiggames/aitoolkit
AIToolkit - AI Construction Set
https://github.com/tinybiggames/aitoolkit
delphi genai llamacpp local-ai-development win64
Last synced: 2 months ago
JSON representation
AIToolkit - AI Construction Set
- Host: GitHub
- URL: https://github.com/tinybiggames/aitoolkit
- Owner: tinyBigGAMES
- License: bsd-3-clause
- Created: 2025-02-05T19:06:51.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-18T23:10:34.000Z (4 months ago)
- Last Synced: 2025-04-05T10:35:25.523Z (2 months ago)
- Topics: delphi, genai, llamacpp, local-ai-development, win64
- Language: Pascal
- Homepage:
- Size: 6.67 MB
- Stars: 13
- Watchers: 6
- Forks: 2
- 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)## π AIToolkit β Unlock Local Generative AI in Delphi!
πΉ **AIToolkit** is a powerful yet intuitive framework for **Delphi** developers, enabling **local generative AI** directly on your desktopβno cloud, no dependencies, just pure **on-device AI**!
β‘ **Powered by llama.cpp**, AIToolkit provides a **lightweight, efficient**, and **extendable** set of **classes and routines**, giving you full control over how you integrate AI into your applications. Whether you're building **chatbots π€, creative content generators β¨, or AI-powered tools π§**, this toolkit serves as your **foundation** to innovate without limits.
π‘ **Easy to use, simple yet elegant**, AIToolkit lets you customize and expand its features **to your heartβs desire**βtailor it to fit your needs and build something truly unique!
π Here's a sneak peek at some of AIToolkitβs powerful features: Pre-built classes for messages, inference, function calling (tools), utilities, and moreβgiving you a solid foundation to build and expand upon! π
π₯ **Start creating with AIToolkit today and bring AI to your Delphi projects!**
π **Ready to dive in?** [Get started now!](https://github.com/tinyBigGAMES/AIToolkit/archive/refs/heads/main.zip) π (*see the usage notes in `UTestbed.pas`*)
---
**π§ Note:** This repository is currently in the setup phase, and documentation is not yet available. However, the code is **fully functional** and generally **stable**. Stay tunedβthis README, along with the documentation and other resources, will be updated soon! π
---
## π οΈ Key Functionalities
### π₯οΈ Model Loading & GPU Optimization
- AIToolkit allows you to load **multiple models** across **CPU, GPU, or a hybrid setup**.
- Control GPU usage with:
- π― **`MainGPU`** β Select which GPU device to use.
- π **`GPULayers`** β Define how many layers to load on the GPU:
- `GPULayers = 0` β Model runs fully on **CPU**.
- `GPULayers = N` β N layers load onto **GPU**, the rest remain in **system memory**.
- `MainGPU = -1 & GPULayers = -1` β **Auto-selects the best GPU** and loads the model fully onto it.#### π₯ Download & Setup
1. **Download the model** from our **Hugging Face** account:
- [DeepSeek-R1-Distill-Llama-8B-Abliterated (Q4_K_M-GGUF)](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)
2. **Place the model in your desired directory** (example directory used in code):
- π `C:/LLM/GGUF`### π Always Up-to-Date with Llama.cpp
- β Stays aligned with the **latest llama.cpp** releases for **performance & compatibility improvements**.### π οΈ Modular Kit-Based Design
- Everything is in **kit form** (Messages, Inference, Tools, etc.), so you can **mix, match, and extend** as needed.### π Web Search Integration
- π Powered by **Tavily.com** for **seamless web search capabilities**.
- π **Get your search API key** from [Tavily](https://tavily.com/)
- π Includes **1,000 free tokens per month**
- π **Set up your API key**:
- Create an **environment variable** named **`TAVILY_API_KEY`** and assign it to your API key.### βοΈ Automated Tool Registration
- π§ **Auto-registers tools** from published **static class methods**.
- π **Generates JSON schema** required for LLM tool executionβno manual setup needed!## πΊ Media
π Deep Dive Podcast
Discover in-depth discussions and insights about AIToolkit and its innovative features. πβ¨https://github.com/user-attachments/assets/fc59e7ee-446f-43ad-889f-28b55dc6bb96
π AIToolkit in Action!
π Showing how it will use the π **web_search** tool to get the latest π’ up-to-date information.https://github.com/user-attachments/assets/14c306d2-114e-4121-8171-a5c500a804b8
## π οΈ Support and Resources
- π **Report issues** via the [Issue Tracker](https://github.com/tinyBigGAMES/AIToolkit/issues).
- π¬ **Engage in discussions** on the [Forum](https://github.com/tinyBigGAMES/AIToolkit/discussions) and [Discord](https://discord.gg/tPWjMwK).
- π **Learn more** at [Learn Delphi](https://learndelphi.org).## π€ Contributing
Contributions to **β¨ AIToolkit** are highly encouraged! π
- π **Report Issues:** Submit issues if you encounter bugs or need help.
- π‘ **Suggest Features:** Share your ideas to make **AIToolkit** even better.
- π§ **Create Pull Requests:** Help expand the capabilities and robustness of the library.Your contributions make a difference! πβ¨
#### Contributors π₯π€
## π Licensing
**AIToolkit** 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/AIToolkit?tab=BSD-3-Clause-1-ov-file#BSD-3-Clause-1-ov-file) file for more details.---
π οΈ AIToolkit β Empower Your Delphi Projects with Local AI, Simple, Fast, and Limitless! ππ€
![]()
Made with β€οΈ in Delphi