Registration disabled at the moment Read more...
×
-
Content Count
9 -
Joined
-
Last visited
-
Days Won
5
Maxidonkey last won the day on August 15
Maxidonkey had the most liked content!
Community Reputation
25 ExcellentRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
[Info & Feedback] DelphiGenAI v1.1.0 — Sharing Updates and an Educational Approach
Maxidonkey replied to Maxidonkey's topic in I made this
I have just updated the DelphiGenAI wrapper to support the OpenAI APIs. Below is the list of changes made compared to version 1.1.0. These enhancements are designed to fully leverage the capabilities of the GPT-5 model while ensuring optimal compatibility with previous models. You can find the complete repository here: https://github.com/MaxiDonkey/DelphiGenAI Version 1.2.0 JSON Normalization Before Deserialization New GenAI.API.Normalizer module (TJSONNormalizer, TWrapKind, TNormalizationRule) to unify polymorphic fields (e.g., string vs. object). Direct integration into the HTTP layer: new Get(..., Path) | Post(..., Path) overloads enabling targeted normalization of a JSON subtree before object mapping. Canceling Background Requests New Responses.AsyncAwaitCancel(response_id) method to cancel an asynchronous response (background = true), with full callback support (OnStart, OnSuccess, OnError). Streaming Enhancements Extended typed coverage for streaming events and outputs (MCP, Code Interpreter, Image Generation, etc.) via new Responses.OutputParams classes (TResponseOutput*, TResponseImageGenerationTool, TResponseCodeInterpreter, etc.). New Types and Parameters InputParams: full coverage for computer interactions, local shell, MCP, web search, code, image generation, reasoning, text/JSON formats, tool choice/hosted tool, and file search filters. OutputParams: states (Created, InProgress, etc.), events (Added, Delta), usage metrics, and statistics. New enums: TOutputIncluding, TReasoningGenerateSummary, TFidelityType, etc. API v1/chat/completions New parameters: prompt_cache_key (prompt caching) safety_identifier (stable ID for safety monitoring) verbosity (low / medium / high) API v1/responses New parameters: max_tool_calls prompt (template reference via TPromptParams) prompt_cache_key, safety_identifier stream_options, top_logprobs, verbosity Structured System and Developer Messages New overloads: TMessagePayload.Developer(const Content: TArray; const Name: string = '') TMessagePayload.System(const Content: TArray; const Name: string = '') Improves parity between plain text and structured content flows. -
Hi all, Just wanted to share a quick update on the DelphiMistralAI wrapper: it's now aligned with the latest capabilities released by MistralAI. 1. Conversational Agents & Agentic Tools Full support for the “agentic” approach: define custom agents with instructions and embedded tools (code execution, premium web search, access to libraries/documentation, etc.). Conversations and Agents endpoints enable multi-turn sessions with actions (function calling, callbacks, web_search_premium, code_interpreter, etc.). Usage example in the documentation: agent configuration, callback handling, and customization of triggerable tools. 2. Vision & Advanced OCR (Document AI) Image processing: text extraction, description, classification, and visual analysis via vision models (e.g., pixtral-12b-2409). Extended OCR: recognizes not just text but structural elements (boxes, tables, metadata), outputs structured JSON per user-defined schema, and handles figures, charts, signatures automatically. Native handling of PDFs and images with automatic annotation for industry use cases (finance, legal, HR, etc.). 3. Audio Multilingual transcription with automatic language detection, segmentation, and timestamps (voxtral models). Analysis of audio files (up to roughly 15–20 minutes) integrated directly into the multimodal chat session. Typical use cases: meeting summarization, indexing, context-aware voice assistants, and audio+NLP pipelines. 4. Batch & Moderation Asynchronous batch inference over large volumes, with background job tracking. Native integration of moderation APIs to filter incoming or generated content. Designed for high-throughput or sensitive applications (personal data, enterprise contexts, etc.). 5. Fine-tuning, Specialized Models & Libraries Fine-tuning support to adapt models to very specific domain requirements. Libraries endpoint for managing and sharing documentation resources; enables fine-grained, contextual access from OD agents. 6. Extensibility, Asynchronicity & Software Quality All endpoints exposed in both synchronous and asynchronous modes (promises, callbacks, progressive streaming, live cancellation). HTTP layer dependency injection to facilitate mocking, unit testing, and alignment with modern architecture patterns. Built-in unit tests: seamless DUnit integration via the MistralAI.DUnit.Tests unit to bootstrap validation suites quickly. 7. Tooling TutorialHub and ready-to-run sample projects. Explicit support for VCL and FMX architectures with functional scenarios.. 8. Getting Started Download one of the two ready-to-run sample projects (VCL or FMX) from the sample/ folder in the repository. Each .zip contains the full scaffold so you can start with minimal setup: unzip, open the project in Delphi, and provide your MistralAI API key (either in code or via the provided UI). Then follow the README as a step-by-step guide: obtain your API key, initialize the client in the form’s OnCreate, perform an initial “chat” call, and proceed to explore the included scenarios (vision, audio, agents, etc.). The samples are designed as a sandbox—feel free to tweak prompts, swap models, and iterate on workflows to validate and extend functionality. Feedback and Questions Feel free to post here or share your adaptations to help enrich the discussion and so, the project.
-
My experience with Delphi, much like with AI engineering, remains limited; yet, in the few projects I’ve worked on, I’ve tried to have my code reviewed (evaluation, refactoring, advice, etc.) by various models. The results have been disappointing: most of the time, these tools ended up wasting more of my time than saving it. After some analysis, three main reasons explain this inefficiency: Insufficient context Models readily recommend dependency injection or refactoring without having a global view of the project. To properly grasp the problem, they would need access to all relevant units, a volume that generally exceeds their context window. Out-of-touch code generation The code they generate is synthesized without grounding in any actual execution: it’s neither compiled nor tested. Reformulate the prompt and you’ll get a different version, with no connection to the previous one. In practice, we write an algorithm, compile it, test it, and then optimize it. These models bypass that validation loop, which severely limits their usefulness. No guarantee of backward compatibility Let’s suppose the model generates functional code. After using it, you spot edge cases or security issues and resubmit the same code for correction. The model then outputs a new version that often breaks compatibility with the previous one, or worse, reintroduces past regressions. Repeating this cycle only amplifies these side effects. AI vendors now highlight agentic approaches, with tools capable of dynamically enriching context (e.g., through vectorized data). While this may improve the model’s understanding of software architecture, it still doesn’t validate the generated code, so the core problem remains unsolved. These are just my impressions and may not reflect everyone’s experience on the matter.
-
[Info & Feedback] DelphiGenAI v1.1.0 — Sharing Updates and an Educational Approach
Maxidonkey replied to Maxidonkey's topic in I made this
Thank you very much for your detailed feedback and suggestions. Simplified description of the wrapper : I understand your point about the clarity of the project description. It’s not easy to explain simply, especially since my main background is in mathematics, and both coding and documentation are not my core activities. The DelphiGenAI project provides a “wrapper” to simplify working with OpenAI’s APIs in Delphi—in other words, it lets you easily integrate features like ChatGPT or DALL-E into your Delphi projects without having to deal with the technical complexity of API calls yourself. I’m definitely open to any ideas or help that could make this explanation even clearer or more engaging for the community. Asynchronous: Basic and advanced use cases Regarding the asynchronous aspect, there are two main uses: – The “simple” asynchronous mode is for launching a single task that doesn’t require immediate interaction or feedback from the user. This avoids blocking the application, but it’s somewhat limited in scope. – For more advanced scenarios, the use of promises, also provided in the library, enables true orchestration: chaining multiple requests or operations smoothly and without blocking, as illustrated in the File2knowledge project, where several operations are chained together during file registration for RAG. Refert to the units : https://github.com/MaxiDonkey/file2knowledge/blob/main/providers/Provider.OpenAI.FileStore.pas and https://github.com/MaxiDonkey/file2knowledge/blob/main/providers/Provider.OpenAI.VectorStore.pas Thanks again for your feedback. Any help with wording or contributions to the clarity of the project are most welcome. -
[Info & Feedback] DelphiGenAI v1.1.0 — Sharing Updates and an Educational Approach
Maxidonkey posted a topic in I made this
Hi everyone, I wanted to share the main updates in version 1.1.0 of DelphiGenAI (OpenAI wrapper for Delphi) here—mainly to offer what I can to the community, and maybe get some feedback if anyone feels like weighing in on my approach. Main Updates Compatibility with the Latest OpenAI Features (including Remote MCP & Code interpreter) Ready-to-Use Templates Two archives (TestGenAI_VCL.zip and TestGenAI_FMX.zip) let you copy and paste any snippet from the documentation and test it out, with no complicated setup. Variety of Code Snippets For each feature: synchronous, asynchronous (event/callback), and asynchronous with async/await. The idea is to allow everyone to compare the approaches and pick the one that fits them best. Documentation That’s Directly Usable All markdown examples can be tested as-is within the supplied templates. A Gradual Learning Path The aim: make it easier to learn about AI in Delphi, whatever your starting level, and to keep things as accessible as possible. About This Approach I’m not an experienced “Delphi old-timer” and I don’t know the community very well yet; that’s why I chose to offer several approaches (synchronous, asynchronous, and async/await) for each example. But maybe that’s not really necessary—maybe some would prefer strictly asynchronous, or even just synchronous? I’d be interested in your thoughts or experiences on this (no pressure—just curious, and trying to do what's most helpful). Also Tried on Other Wrappers I’ve used the same principle in a Delphi wrapper for Deepseek. Depending on the feedback I get here, I’ll decide whether to take this approach with a few other wrappers I’ve put up on Github. Thanks in advance for reading, and best wishes to all. -
Hey, Delphi’s built-ins already cover everything the AI tried to re-code. Here’s the absolute minimum—25 lines, no more—tested on Delphi 12.1 uses System.Net.URLClient, System.Net.HttpClient, System.Net.HttpClientComponent, System.JSON; procedure CallService; var Http : TNetHTTPClient; Response : IHTTPResponse; Payload : TJSONObject; begin Http := TNetHTTPClient.Create(nil); try // auth ➜ replace XXX Http.CustomHeaders['Authorization'] := 'Bearer XXX'; // timeouts, proxy… if needed Response := Http.Get('https://api.your-service.com/v1/endpoint'); if Response.StatusCode = 200 then begin Payload := TJSONObject.ParseJSONValue(Response.ContentAsString) as TJSONObject; try // process your data here Writeln(Payload.ToJSON); finally Payload.Free; end; end else raise Exception.CreateFmt('HTTP %d – %s', [Response.StatusCode, Response.StatusText]); finally Http.Free; end; end; Auth: shown with a simple Bearer token—swap in OAuth2, HMAC, etc., as needed. POST / PUT: Http.Post(URL, TStringStream.Create(JSON, TEncoding.UTF8), nil, ['Content-Type', 'application/json']); Skip TRESTClient if you’re only making a couple of calls; it just wraps TNetHTTPClient and adds another mapping layer. Why the AI went off the rails API hallucination – mixes old FireMonkey REST.* units with the newer System.Net.* ones. Copy-pasta from outdated posts – many snippets were written for Delphi XE7–10 Seattle; since 10.4 the method signatures changed. No compile-fix loop – the model never actually builds the code, it just invents. Hope that saves you from wading through 300 generated lines. When the AI starts free-styling, fall back to Delphi’s native API—shorter and, most important, it compiles. Ping me if you get stuck on auth or JSON parsing.
-
Explore OpenAI Agentic Workflows with File2knowledge
Maxidonkey posted a topic in Tips / Blogs / Tutorials / Videos
Hello all, I recently released File2knowledge on GitHub—a true playground for Delphi developers who want to explore OpenAI via the v1/responses endpoint, perfect for agentic approaches. This project is primarily educational, and here’s why it deserves your attention: Web/Edge UI ready to go: dive in within seconds, no hassle. Session history: replay every experiment, debug model logic, and refine your prompts step by step. Native async: everything’s built on Promises for clean, non-blocking workflows. Mockable architecture: with IoC/DI you can swap out any internal service, simplify your tests, evolve the project… or even switch to FMX if you feel like it. Built-in Assistant File2knowledge goes beyond a simple wrapper: it uses file_search to dig through your source files and the docs of existing GenAI wrappers on GitHub. In practice, you can: Understand a wrapper’s design in detail. Integrate the code directly into your own projects. Customize or fix the base files using vectorized versions of your own technical resources. Turnkey Client Delivered in VCL so you can jump in right away, with a fully modifiable foundation—and an FMX version is coming soon to cover even more platforms. Whenever OpenAI rolls out a new tool (with v1/responses as THE standard for the agentic revolution), I’ll integrate it ASAP so you can test it on the fly. This tool is designed as a hands-on educational lab, but it’s up to you to shape it however you like. I’m all ears for your feedback and suggestions! GitHub : https://github.com/MaxiDonkey/file2knowledge -
Hi everyone, (Oops, I made a mistake posting in the VCL section when it's more appropriate here) For more than six months, I’ve been developing turnkey solutions for the Delphi developer community in the form of API wrappers that harness the full range of models and features offered by leading providers (OpenAI, Deepseek, Anthropic, Gemini, MistralAI, Groq Cloud, Hugging Face, and Stability AI). Each README file is written as a tutorial to help users get started. Natively, these libraries support both synchronous and asynchronous workflows and some even offer parallel execution to optimize performance. In addition, I’ve published two projects demonstrating the use of the Promise pattern to orchestrate asynchronous requests (notably with OpenAI, but also compatible with other wrappers), as well as a pipeline-based project that simplifies the processing chain for model calls. Coming soon, I will introduce a module dedicated to OpenAI’s new file_search feature (endpoint v1/response), which, thanks to an expanded semantic surface, enables querying vector stores with unprecedented precision and temporarily enriches models without the need for fine-tuning. If you’re new to AI integration or looking to accelerate your development, feel free to check out my projects on GitHub. Additionally, all of these tools are available via GetIt. Your feedback is welcome and will be incredibly helpful in improving these tools. https://github.com/MaxiDonkey As a point of clarification regarding my background, I am a mathematician by training rather than a professional software developer. I returned to Delphi just over a year ago—if you’d like to understand my motivations, please consult this document. My core expertise lies in using formal proof tools such as Lean and Coq, rather than in Delphi-specific development.
-
Maxidonkey changed their profile photo
-
Hi everyone, For more than six months, I’ve been developing turnkey solutions for the Delphi developer community in the form of API wrappers that harness the full range of models and features offered by leading providers (OpenAI, Deepseek, Anthropic, Gemini, MistralAI, Groq Cloud, Hugging Face, and Stability AI). Each of these libraries supports both synchronous and asynchronous workflows, and some even offer parallel execution to optimize performance. In addition, I’ve published two projects demonstrating the use of the Promise pattern to orchestrate asynchronous requests (notably with OpenAI, but also compatible with other wrappers), as well as a pipeline-based project that simplifies the processing chain for model calls. Coming soon, I will introduce a module dedicated to OpenAI’s new file_search feature (endpoint v1/response), which, thanks to an expanded semantic surface, enables querying vector stores with unprecedented precision and temporarily enriches models without the need for fine-tuning. f you’re new to AI integration or looking to accelerate your development, feel free to check out my projects on GitHub. Please note that I only provide the entry point to my GitHub page, from which you can navigate to the repositories that interest you. Additionally, all of these tools are available via GetIt. If you’d like me to share direct links to each repository, I can do so in this thread. Your feedback is welcome and will be incredibly helpful in improving these tools. https://github.com/MaxiDonkey