From the course: Azure AI for Developers: Building AI Agents

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

OpenAI Assistant Agent: Code Interpreter

OpenAI Assistant Agent: Code Interpreter

- [Instructor] The Semantic Kernel OpenAI assistant agent allows you to use the capabilities of OpenAI assistant APIs, such as the code interpreter. In this note, we will have the code interpreter write and execute code to answer questions from a dataset containing two CSV files. Here's what our CSV files look like. We will not specify to our language model anywhere how these two files are related. We will let the model decide based on the columns provided to it. We first get the file paths of the two CSV files we use as a data source. We then create the agent. We assign it the following, the kernel instance, service ID, agent name, detailed instructions, and more importantly, we set the enable code interpreter parameter to through, and specify the code interpreter file names. Notice that we didn't need to perform any processing to prepare the files. We then create a thread. Once the agent is created, you can also see the agent in Azure AI Foundry. The code interpreter can create…

Contents