In Semantic Kernel you need to define the OpenAI settings before you use it. Please see the full example here Microsoft learn