Semantic Kernel is an open-source development kit for building AI agents.
In this example I call a Semantic Kernel plugin to generate a joke.
I selected Python Environments...
I clicked the + Create Python Environment option
I clicked the Venv option
I selected Python 3.12.4
I did not select a requirements file
I reviewed the workbook
I ran the pip install
I set the variables
I reviewed the .env file documentation
I created an .env file
I created an api key https://platform.openai.com/api-keys
I named the key Semantic Kernel
I copied the key
I pasted the key into the .env file
I moved the .env file to the root of the repository and checked that I could retrieve values from it
I created a kernel variable
I created a selectedService variable
I ensured that the .env file included an OPENAI_CHAT_MODEL_ID set to gpt-3.5-turbo
I called the kernel.add_service method
I added a Semantic Kernel plugin
I invoked the joke_function with an input and a style
This is the joke plugin's (optional) config.json
This is the joke plugin's Semantic Kernel prompt template