https://github.com/maxidonkey/file2knowledge
Delphi lab demonstrating OpenAI’s v1/responses endpoint with vector search, embeddings, and session-based chat. Hands-on GenAI integration.
https://github.com/maxidonkey/file2knowledge
agentic-ai async-await asynchronous chatbot delphi file-search openai promises reasoning response web-search
Last synced: 12 months ago
JSON representation
Delphi lab demonstrating OpenAI’s v1/responses endpoint with vector search, embeddings, and session-based chat. Hands-on GenAI integration.
- Host: GitHub
- URL: https://github.com/maxidonkey/file2knowledge
- Owner: MaxiDonkey
- Created: 2025-05-27T04:11:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-18T13:43:24.000Z (about 1 year ago)
- Last Synced: 2025-06-21T02:37:45.798Z (about 1 year ago)
- Topics: agentic-ai, async-await, asynchronous, chatbot, delphi, file-search, openai, promises, reasoning, response, web-search
- Language: Pascal
- Homepage:
- Size: 2.37 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
Awesome Lists containing this project
README
# File2Knowledge



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`, and `chat` features.
## Changelog
To review the latest changes, please refer to the [changelog](https://github.com/MaxiDonkey/file2knowledge/blob/main/Changelog.md).
>[!IMPORTANT]
> To perform the update, install [DelphiGenAI](https://github.com/MaxiDonkey/DelphiGenAI) version 1.1.0 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
```bash
git clone https://github.com/MaxiDonkey/file2Knowledge.git
```
open WrapperAssistant.dproj # Delphi 12 Athens
Prerequisites: OpenAI API key
## Dependencies
- Add [DelphiGenAI (OpenAI wrapper)](https://github.com/MaxiDonkey/DelphiGenAI) version 1.1.0 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 `DelphiGenAI` wrapper 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](https://platform.openai.com/settings/organization/general). The activation process takes only a few minutes.
>[!NOTE]
>To access the uploaded files and active vector stores, go to the [dashboard](https://platform.openai.com/logs) then navigating to the `Storage` section.
## Features
- Upload .txt / .md → embeddings auto, Vector search handled by OpenAI
- Persistent multi-turn chat (session history preserved)
- JS-style Promises (TPromise) 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](https://choosealicense.com/licenses/mit/) License.
## Going further
**Want the full architecture breakdown?**
[Read the deep-dive.md](https://github.com/MaxiDonkey/file2knowledge/blob/main/deep-dive.md)