Recently, I've had time to sit down and wade into the my own little area of the digital Wild West, that being AI integration. With the explosion of AI, I wanted to give my apps the ability to tap into that vast potential. While it seems like every tech giant, startup, and their mother is putting out an AI these days, I had to settle on one that I would develop against. I wanted something where I could create a custom model; has a robust REST API; and finally has a proven track record (at least as long a record as you can have in such a young field). Given these criteria I set out, OpenAI was the best vendor for this purpose, at the time. Specifically the custom assistant via platform.openai.com Background aside, here's what you'll need to follow along: • A funded account on platform.openai.com (I've gotten by on ~$2US for the past 8 months) • A ready assistant inside something other than the default project (We're only doing text, so you don't need the late
Registering Services for IEnumerable Injection Service Registration Fundamentals Service registration is the process of telling the DI container how to create instances of a service, typically done at application startup. Registering Services for IEnumerable When services implement a common interface, you can register them in such a way that the DI container can provide an IEnumerable of these services. In .NET, for example: services.AddTransient<ICommonService, ServiceA>(); services.AddTransient<ICommonService, ServiceB>(); Why would you register mulitple instances of the same interface? One use-case is that it is the same service with a different configuration. Here is an example of how that would look: services.Configure<CustomOption>("Opt1", configuration.GetSection("Options1")); services.Configure<CustomOption>("Opt2", configuration.GetSection("Options2")); builder.Services.AddSingleton<ICommonService,Servic