1. Learn
  2. /
  3. Courses
  4. /
  5. Developing AI Systems with the OpenAI API

Connected

Exercise

Building a function dictionary

You are working on a research project where you need to extract key information from a collection of scientific research papers. The goal is to create a summary of key information from the papers you are given, that includes the title and year of publication. To compile this, you decide to use the OpenAI API with function calling to extract the key information.

The get_response() function and messages, containing the text of the research paper, have been preloaded. The function_definition variable has also partially been filled already.

Instructions

100 XP
  • Define the function 'type' parameter.
  • Define the 'properties' parameters to extract the title and year of publication from research papers.