In my Blog space I write about tech I encounter in my day-to-day life. This is everything from .Net, Azure, AI - or even just about the journey of building a blog site from scratch!
I hope you enjoy!
In my Blog space I write about tech I encounter in my day-to-day life. This is everything from .Net, Azure, AI - or even just about the journey of building a blog site from scratch!
I hope you enjoy!
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. ...
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 }); ...
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: ...
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! ...
Building a Blog & Profile Site - Let's build a Hugo-Site!
Building a Blog & Profile Site - Let’s build a Hugo-Site! (2/2) So last time, we looked at the steps that I took to where we are today. This time, we will look on the solution that I am using for my blog & profile site! I hope you are ready because it is one heck of a journey! Let’s look at Hugo Well, Hugo is a static site generator, built in the Go-language. It uses the famous Go-template and is able to generate the HTML pages based on Markdown input files. It is also able to build reusable components like shortcodes, partials and layouts. ...
Building a Blog & Profile Site - How Hard Can It Be?
Building a Blog & Profile Site - How Hard Can It Be? (1/2) Well, if you found yourself in the same pickle as I have Let’s build a blog site!, you might have found yourself in the same shoes as I have: What technology should I use to do so… How should it look… Jeez, this is not easy! Everything started about 4-5 years ago when I already wanted to do this but never got to finish it (the famous developer starting a project and never finishing it story): ...
AI-Scraping with MarkitDown
AI-Scraping with MarkitDown So Microsoft recently released