Adding AI to the .NET Application You Already Run
AddChatClient goes into the same startup file as the repository and the mail sender, resolved by the same dependency injection everything else uses. The part worth deciding deliberately is the order: a cache hit returns without forwarding the request along the pipeline, so nothing registered after the cache runs, and the lookup matches on the whole submitted chat history rather than on the last thing a user typed.
Read article