Skip to content

Delphi lab demonstrating OpenAI’s v1/responses endpoint with vector search, embeddings, and session-based chat. Hands-on GenAI integration.

Notifications You must be signed in to change notification settings

MaxiDonkey/file2knowledge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File2Knowledge

Delphi Next Gen Ready GitHub GitHub

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.

Important

To perform the update, install DelphiGenAI version 1.0.6 and then recompile the project.

Introduction

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.

Preview

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.0.6 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)

Preview

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.

Preview

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 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 License.

Going further

Want the full architecture breakdown?

Read the deep-dive.md

About

Delphi lab demonstrating OpenAI’s v1/responses endpoint with vector search, embeddings, and session-based chat. Hands-on GenAI integration.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages