OpenAI Assistants Streaming

The OpenAI Assistant Client has been improved to implement the streaming responses when calling a run thread. Before this new feature, it requires to poll the run object status till it's completed. Now you can use the new Stream events to handle the streaming messages. Streaming Events Instead of waiting the full response from the assistant, y...

Continue reading

OpenAI Assistants File Search

From sgcWebSockets 2024.10.0 you can use the OpenAI Assistants to search in your own files instead of using the generic model. File Search augments the Assistant with knowledge from outside its model, such as proprietary product information or documents provided by your users. OpenAI automatically parses and chunks your documents, creates and store...

Continue reading

OpenAPI Parser Bundle Schemas

From sgcOpenAPI 2024.9.0 the parser has been improved with the following new features: - Bundle Specification: if the specification is built with multiple schemas, the parser can bundle into a single specification file. - Output Parser Parameters: when creating the pascal interface, the parameters used to import the specifications are written in th...

Continue reading

OpenSSL 3 Legacy support

OpenSSL 3.0 moved several deprecated or insecure algorithms into an internal library module called legacy provider. It is not loaded by default, so apps (or their language runtimes) that use OpenSSL for cryptographic operations cannot use such algorithms when loading certificates, creating message digests ... If you try to load a p12 certificate fo...

Continue reading

Delphi PKCE OAuth2

From sgcWebSockets 2024.5.0 PKCE, which stands for "Proof of Key Code Exchange" is an extension of the OAuth 2.0 protocol that helps prevent code interception attacks. PKCE is supported on OAuth2 Server and Client Components. What is PKCE PKCE (Proof Key for Code Exchange) is an OAuth 2.0 security enhancement designed to protect against a...

Continue reading

OpenSSL 1.1 and 3.*

While the openSSL libraries 1.0 and 1.1 are not receiving any more updates, users should consider to use the latest openSSL 3.0 or 3.1 APIs.  Find below the differences between 3.0 and 3.1: OpenSSL 3.0 is a Long Term Support version and will be supported till 7th September 2026.OpenSSL 3.1 will be supported till 14th March 2025....

Continue reading

HTTP/2 Server Threads

From sgcWebSockets 2024.2.0 the HTTP/2 server has been improved when receiving HTTP/2 requests. Now, by default, when the server receives a new HTTP/2 request, this is queued and dispatched by one of threads of the Pool of Threads. This avoid the problem when several requests are sent using the same connection and those are processed sequentially. ...

Continue reading

Delphi Indy Server EC Certificates

Indy supports RSA and EC Certificates when using the openSSL libraries, but by default, the EC certificates can be created different curves and the openSSL libraries only are configured with some of these curves. So if you're using an EC Certificate that it's not included by the default by the openSSL libraries, the certificate won't work...

Continue reading

Azure IoT Upload Files

Azure IoT allows to send data using several protocols like MQTT or AMQP, but in some cases, the size of the message is too big and requires to upload files to Azure Servers. To provide a solution to this issue IoT hub facilitates file uploads from connected devices by providing them with shared access signature (SAS) URIs on a per-upload basis...

Continue reading

Azure OpenAI Service for Rad Studio

From sgcWebSockets 2023.7.0 the Microsoft Azure OpenAI Service is supported.  Azure OpenAI Service can be used to create chatbots, generate text, translate languages, and write different kinds of creative content. As the platform continues to evolve, developers will be able to use it to build even more powerful and sophisticated applications. ...

Continue reading

Customizing OpenAI with your Data (2 / 2)

In a previous post, we see how to use OpenAI Embeddings to add contextual information to OpenAI chat methods. Now, we'll see how to use the TsgcOpenAIEmbeddings component from sgcWebSockets package to build AI applications using our own data. In the post Delphi Voice ChatBot, we used the component TsgcAIOpenAIChatBot to build a ChatBot handled...

Continue reading

Customizing OpenAI with your Data (1 / 2)

When we ask to OpenAI a question that requires some specific context, example: Who is my father? OpenAI can either hallucinate or answer that he doesn't know. To help OpenAI answer specific questions, you can provide extra contextual information in the prompt itself. My father lives in Barcelona and is 50 year's old. If we ask again to openAI the s...

Continue reading

Image Generator OpenAI Delphi (5 / 5)

OpenAI API allows given a prompt and/or an input image, the model will generate a new image. The Images API provides three methods for interacting with images:1. Creating images from scratch based on a text prompt2. Creating edits of an existing image based on a new text prompt3. Creating variations of an existing image Image Generator Delphi ...

Continue reading

Translate OpenAI Delphi Client (4 / 5)

Translating Audio to Text is very easy using the OpenAI API, just upload an Audio file in one of the following formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm. And the API will translate the audio to English. Translation Delphi Example OpenAI requires to build a request were you pass the audio file, the model, the temperature (to get a more ore le...

Continue reading

Transcription OpenAI Delphi Client (3 / 5)

Transcribing Audio to Text (also known as Speech to Text) is very easy using the OpenAI API, just upload an Audio file in one of the following formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm. And the API will return the string. Transcription Delphi Example OpenAI requires to build a request were you pass the audio file, the model, the te...

Continue reading

ChatGPT Delphi Client (2 / 5)

OpenAI API allows to build your own AI Chats using ChatGPT Turbo. Using the sgcWebSockets library is very easy to interactuate with the API, given a chat conversation, the model will return a chat completion response.  ChatGPT Delphi Example OpenAI requires to build a request were you pass the messages to sent to ChatGPT Turbo, the temper...

Continue reading

OpenAI Delphi API (1 / 5)

From sgcWebSockets 2023.3.0 the OpenAI API is fully supported. The OpenAI API can be applied to virtually any task that involves understanding or generating natural language, code, or images. OpenAI offer a spectrum of models with different levels of power suitable for different tasks, as well as the ability to fine-tune your own custom models. The...

Continue reading

OpenAPI Delphi Parser

I am happy to announce the sgcOpenAPI Pascal Parser, a brand new product allowing import an OpenAPI Specification and generate a Pascal Interface. The sgcOpenAPI Parser supports the following specifications: OpenAPI 3.*Swagger 2.* (automatically converted from 2.0 to 3.0)Swagger 1.* (automatically converted from 1.0 to 3.0) Supports the follow...

Continue reading

Delphi Server Sent Events (SSE) Client

From sgcWebSockets 2023.2.0 the HTTP/1 Client has been improved and supports SSE requests. Remember than SSE was already supported on Server components but not on client. SSE (Server-Sent Events) is a web technology for efficiently receiving push notifications from a server to a client's browser. It's a standard that allows a web page to receive up...

Continue reading

Mapping Groups and Connections

In a previous post I Introduced the new Groups feature on WebSocket Servers. This post I will show how to combine the WebSocket Groups with the Client Connections to identify and store the user data in a client connection. sgcWebSockets library allows you to create your own objects and link to a TsgcWSConnection class, so you can access at any time...

Continue reading