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