Leaderboard
Popular Content
Showing content with the highest reputation on 08/03/25 in all areas
-
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.
-
Libreoffice integration struggles
Kas Ob. replied to Pierre le Riche's topic in RTL and Delphi Object Pascal
This works fine program LibreOfficeLoadingFromStream; {$APPTYPE CONSOLE} uses System.SysUtils, System.Win.ComObj, Winapi.ActiveX; procedure LoadWriterDocumentFromStream(const ADocumentData: TBytes); var LServiceManager, LDesktop, LStream, LDocData, LProperties: Variant; LPropertyArray: TArray<Variant>; WrittenBytes: TBytes; begin {Connect to LibreOffice} LServiceManager := CreateOleObject('com.sun.star.ServiceManager'); LDesktop := LServiceManager.createInstance('com.sun.star.frame.Desktop'); {Instantiate in input stream to load the document data from} //LInputStream := LServiceManager.createInstance('com.sun.star.io.SequenceInputStream'); LStream := LServiceManager.createInstance('com.sun.star.io.SequenceOutputStream'); // <- {Populate the input stream with the document data} LDocData := ADocumentData; //LInputStream.createStreamFromSequence(LDocData); // <- error here LStream.writeBytes(LDocData); WrittenBytes := LStream.getWrittenBytes; Writeln(StringOf(WrittenBytes)); // test again Writeln('Test again'); LStream.writeBytes(Variant(BytesOf(#13#10'Another TExt'))); Writeln(StringOf(LStream.getWrittenBytes)); end; var LDocData: TBytes; begin CoInitialize(nil); //SetLength(LDocData, 10000); //In an actual application LDocData would contain the .odt document file content LDocData := BytesOf('Sample text 123!@#'); try LoadWriterDocumentFromStream(LDocData); except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; Readln; end. the output is The problem is in API naming and assumption of simple logical naming, it seems the Output/Input words (and meaning) are reversed in the whole SDK, so you should look at them in reverse (from the binary/exe perspective) https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1io.html and the one you need is https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1io_1_1SequenceOutputStream.html -
Hello everyone! Together with the Softacom team, I have been exploring how AI can support Delphi projects. As part of these experiments, we created a video showing how to use OpenAI features to generate text, images, and speech via an Embarcadero Delphi FMX app. If you are curious how these APIs can be integrated into your Delphi workflow, check out our video. I hope you will find it useful! Watch the video: If you prefer reading, we have article versions too: Generate text with GPT: https://www.softacom.com/blog/development/text-generation-capabilities-with-delphi-fmx-application-via-openai-api-gpt-models/ Create images using DALL·E: https://www.softacom.com/blog/development/image-generation-capabilities-with-delphi-fmx-application-via-openai-api-dall·e-models/ Convert text to speech with OpenAI API (TTS-1 and WHISPER-1 models): https://medium.com/@softacom.com/speech-and-text-by-speech-generation-capabilities-with-delphi-fmx-app-via-openai-api-tts-1-and-b19293070588
-
Object Pascal Card Framework
Gustavo 'Gus' Carreno replied to Gustavo 'Gus' Carreno's topic in I made this
Hey Patrick, Only the FrenchCard and the FrenchDeck have image support. You'll find that both have a TMemoryStream field to store the card front and the card back. It doesn't make sense to store any image data in the base classes. I'm providing the most used, the French deck, in the package as an example. But any other type of deck, that's to the programmer to extrapolate from the French example. And thanks very, very much for the card images!! I haven't done it yet, but on the README.md file, I'll have 2 sections: Algorithms and Resources. Respectively a list different types of games and a list of card images. I'll keep yours in mind and add it to the appropriate section!! Cheers, Gus -
When it comes to mobile development you cannot count on that kind of stability. Not because of Delphi, but because of platforms. android and iOS get new OS version every year, often with drastic changes in some workflows and features. They also expect that you frequently update your application and make it compatible with new OS versions (old applications still run, but if you don't make an update in two years period applications will not be available to users with new OS versions - this is just example, there are variants of what exactly happens in each particular case). Those OS changes also require changes in Delphi toolset and sometimes additions in code. How drastic depends on the each particular change. This is valid for all mobile development toolsets, and is nothing Delphi specific. But, this also means that you will have to keep current with new Delphi releases and you cannot stick using some old Delphi version for too long after new one gets out.
-
I have since merged the sasl-oauth branch into the master code earlier today.
-
[Android / Delphi 10.4] How to access the log.d messages without monitor.bat?
Fabian1648 posted a topic in FMX
Hi, The Android SDK provided with Delphi 10.3 included a logging system of the Android device events (launched by monitor.bat). With Delphi 10.4, the tool still exists but crashes indicating that Eclipse files are missing. With Delphi 11, this tool does not even exist anymore! How can I access the log of the Android device (internal messages of the Android device and those originating from "log.d('My error message');" added to its Delphi code? Thanks for you help -
[Android / Delphi 10.4] How to access the log.d messages without monitor.bat?
Rollo62 replied to Fabian1648's topic in FMX
Yes, serialgames is a nice tool, I used that before too, but I'm not sure how well that is maintained. There would be also a solution from DelphiWorlds: DeviceLens