file2knowledge
file2knowledge copied to clipboard
Delphi Lab showcasing OpenAI's v1/responses endpoint with vector search, integrations, and session-based chat. Practical integration of generative AI. Also manages Deep Research.
File2Knowledge
NEW
Mini-lab Delphi/VCL open source to experiment with the v1/responses endpoint of the OpenAI API in a modern environment.
Clone & run: the app acts as a tutor for exploring my AI wrappers through the file_search, embeddings, chat features and Deep Reseach.
Changelog
To review the latest changes, please refer to the changelog.
[!IMPORTANT] To perform the update, install DelphiGenAI version 1.3.1 and then recompile the project.
Introduction
Built with Delphi 12 Community Edition (v12.1 Patch 1)
You can compile and test it free of charge with Delphi CE; any recent commercial Delphi edition works as well.
File2knowledge was designed to provide a concrete implementation of the OpenAI API’s v1/responses endpoint (necessary for the agentic approach).
Its main goal: to demonstrate how to leverage advanced file search (file_search) features and the use of vector stores to enhance the semantic processing of documents.
This approach enables more contextual, relevant, and intelligent responses when querying technical documentation, source code, or any other textual files.
Quick Start
git clone https://github.com/MaxiDonkey/file2Knowledge.git
open WrapperAssistant.dproj # Delphi 12 Athens Prerequisites: OpenAI API key
Dependencies
- Add DelphiGenAI (OpenAI wrapper) version 1.3.1 to your Delphi project Library Path if not globally referenced
- Delphi 12 Athens (or later)
- WebView2 Runtime (EdgeView2 for VCL)
- OpenAI API key (OPENAI_API_KEY)
- Windows 11 MineShaft (custom VCL theme)
Things You Should Know
[!NOTE] Make sure to correctly set the search path to the
DelphiGenAIwrapper in your Delphi project settings. This is required for proper compilation and integration.
Before running the client for the first time, make sure to place the appropriate DLL (32-bit or 64-bit) in the executable's directory. The required files are available in the repository.
[!WARNING] To access reasoning visualization with o-models, you must enable this feature in the Verification section of your OpenAI account. The activation process takes only a few minutes.
[!NOTE] To access the uploaded files and active vector stores, go to the dashboard then navigating to the
Storagesection.
Features
-
Upload .txt / .md → embeddings auto, Vector search handled by OpenAI
-
Persistent multi-turn chat (session history preserved)
-
JS-style Promises (TPromise<T>) and generalized IoC
-
UI VCL & WebView2
-
Session-based conversational chaining with OpenAI response IDs
-
Web research and reasoning.
License
This project is licensed under the MIT License.
Going further
Want the full architecture breakdown?