OpenAI Introduces Function Calling & More API Improvements

OpenAI has recently announced a series of updates to its API, bringing a host of new features and improvements.

These updates are designed to enhance the capabilities of developers and provide a more efficient and effective user experience.

New Function Calling Capability

shopping basket

Understanding Function Calling

One of the most significant updates is the introduction of a new function calling capability in the Chat Completions API.

This feature allows developers to describe functions to the models, which can then intelligently output a JSON object containing arguments to call those functions.

This innovative approach provides a more reliable way to connect GPT’s capabilities with external tools and APIs.

Advantages for Developers

The function calling capability offers numerous benefits to developers.

It allows for more reliable retrieval of structured data from the model, enhancing the efficiency and effectiveness of applications built on top of these models.

Practical Applications of Function Calling

The function calling capability can be utilized in a variety of ways:

  1. Chatbots: Developers can create chatbots that answer questions by calling external tools. This feature enhances the functionality and versatility of chatbots, making them more useful and efficient.
  1. API Calls and Database Queries: Function calling can be used to convert natural language into API calls or database queries. This feature simplifies the process of interacting with APIs and databases, making it more accessible and user-friendly.
  1. Data Extraction: Function calling can be used to extract structured data from text. This feature can be particularly useful in applications that involve data analysis or information retrieval.
# Example of a function to extract structured data from text
def extract_data(text):
    # Extract structured data from text
    data = extract_structured_data(text)
    return datacurl -u :$OPENAI_API_KEY -H 'Content-Type: application/json' -d '{
  "model": "gpt-3.5-turbo-0613",
  "messages": [
    {"role": "user", "content": "What is the weather like in Boston?"}
  "functions": [
      "name": "get_current_weather",
      "description": "Get the current weather in a given location",
      "parameters": {
        "type": "object",
        "properties": {
          "location": {
            "type": "string",
            "description": "The city and state, e.g. San Francisco, CA"
          "unit": {
            "type": "string",
            "enum": ["celsius", "fahrenheit"]
        "required": ["location"]

These are just a few examples of how the new function calling capability can be used. The potential applications are vast and varied, offering exciting possibilities for developers.

Updates on Models

money flowing into a piggy bank

Introduction to the Updated Versions of GPT-4 and GPT-3.5-Turbo

OpenAI has introduced updated and more steerable versions of gpt-4 and gpt-3.5-turbo.

These models have been enhanced to provide better performance and more reliable results.

The updates include improvements in function calling capabilities, making it easier for developers to integrate these models into their applications.

The New 16k Context Version of GPT-3.5-Turbo

In addition to the updated versions of gpt-4 and gpt-3.5-turbo, OpenAI has also introduced a new 16k context version of gpt-3.5-turbo.

This version offers a longer context compared to the standard 4k version, allowing the model to support approximately 20 pages of text in a single request.

This enhancement significantly improves the model’s ability to comprehend larger texts, providing more accurate and comprehensive results.

Deprecation Timeline for the Older Models

OpenAI has announced the deprecation timeline for the older models, including gpt-3.5-turbo-0301 and gpt-4-0314.

Developers using these models will need to transition to the updated versions to continue benefiting from the latest features and improvements.

Lower Pricing

science lab testing new products

Cost Reduction on the State-of-the-Art Embeddings Model

OpenAI has reduced the cost of its state-of-the-art embeddings model by 75%.

This significant cost reduction makes it more affordable for developers to use this powerful model in their applications.

Cost Reduction on Input Tokens for GPT-3.5-Turbo

In addition to the cost reduction on the embeddings model, OpenAI has also reduced the cost of input tokens for gpt-3.5-turbo by 25%.

This reduction lowers the overall cost of using the model, making it more accessible to a wider range of developers.

These updates and cost reductions demonstrate OpenAI’s commitment to making its models more accessible and affordable for developers.

By continually improving its models and reducing costs, OpenAI is empowering developers to create more powerful and effective applications.

Safety Measures and Developer Protection

sad robot

Open Research Questions and Potential Risks

As with any technological advancement, the introduction of function calling and the updates to the models come with their own set of research questions and potential risks.

One such concern is the possibility of untrusted data from a tool’s output instructing the model to perform unintended actions.

This is a complex issue that requires careful consideration and ongoing research.

Strategies for Developers to Protect Their Applications

OpenAI is actively working on mitigating these risks. In the meantime, developers can protect their applications by implementing certain strategies.

One such strategy is to only consume information from trusted tools.

Another is to include user confirmation steps before performing actions with real-world impact, such as sending an email, posting online, or making a purchase.

These measures can help ensure the safety and integrity of applications built using OpenAI’s models.


Recap of the Updates and Their Potential Impact

OpenAI’s recent updates, including the introduction of function calling, the release of updated models, and the reduction in pricing, represent significant advancements in the field of AI.

These updates have the potential to greatly enhance the capabilities of developers and improve the user experience.

Encouragement for Developer Feedback and Future Improvements

OpenAI values the feedback of developers and is committed to making continuous improvements based on their suggestions.

Developers are encouraged to share their experiences and ideas for future updates.

This collaborative approach will help ensure that OpenAI’s models continue to meet the needs of developers and users alike.

By staying informed about the latest updates and actively participating in the feedback process, developers can help shape the future of AI and create more powerful and effective applications.

Similar Posts