My latest posts


Looking to use OpenAI's Assistant?

So, lately I was working on experimenting with OpenAI’s SDK to use an OpenAI Assistant. So I went ahead, built my assistant which used a PDF file as a basis to analyse and summarize it, based on additional input that I send via the userprompt - I was happy with the outcome in the playground so went ahead and started writing a simple UI in Razor where you can upload a file and add the user prompt and got everything ready for the OpenAI interaction. ...


February 20, 2025

Specify the timeout while using OpenAI's .NET library

Ever had the issue that you hit the timeout of the OpenAI client and could not find any quick resolution? Well, don’t worry - Here you go! // Used NuGet: Azure.AI.OpenAI@2.0.0 using OpenAI; using OpenAI.Chat; // ... var config = sp.GetRequiredService<IOptions<AIConfiguration>>().Value; var apiKey = config.ApiKey; var client = new OpenAIClient(new(config.ApiKey), new OpenAIClientOptions { NetworkTimeout = TimeSpan.FromMinutes(3) // Specify your timeout here }); ...


February 12, 2025

Javascript date converter for Newtonsoft.Json

Ever got the need for a converter to convert a Javascript date timestamp to a DateTime and just don’t find the right one? -Issue with the built-in was that it was using seconds instead of milliseconds -Stack Overflow was not really giving a solution -Copilot did even weirder stuff (especially because it didn’t know the new DateTimeOffset functions) Well, I encountered that this week and in the end, wrote one myself. In the spirit of Don’t Repeat Yourself, I’ll share that class: ...


January 17, 2025
Placeholder image

YARP - The perfect reverse proxy?

YARP - The perfect reverse proxy? The situation Let’s firstly see the what the current situation is: Assume we have two (frontend) apps that are hosted under the same domain, let’s call it mydomain.app. App one can be found under - let’s say mydomain.app/app1, and app two can be found at mydomain.app/app2. Lastly, if you don’t type in any other valid path, it should redirect to app1. Also both apps use Supabase and its authentication provider - which is awesome! ...


December 18, 2024