Generative AI

All the latest news and updates on the rapidly evolving field of Generative AI space. From cutting-edge research and developments in LLMs, text-to-image generators, to real-world applications, and the impact of generative AI on various industries.

Follow publication

OpenAI GPT-4 and GPT-3.5-Turbo Updates: Cheaper and Larger Context

Jim Clyde Monge
Generative AI
Published in
5 min readJun 14, 2023

--

OpenAI GPT-4 and GPT-3.5-Turbo Updates: Cheaper and Larger Context. medium article cover by Jim Clyde Monge
Image by Jim Clyde Monge

Today, I woke up to an exciting email from OpenAI announcing upgrades to its text-generator AI models and reduced pricing!

Let’s unpack these new features one by one.

Function calling

Function calling allows developers to describe functions to the model and have it intelligently choose to output a JSON object containing arguments to call those functions.

This is a new way to more reliably connect GPT’s capabilities with external tools and APIs.

Here’s an example:

{
"model": "gpt-3.5-turbo-0613",
"messages": [
{"role": "user", "content": "Send Jim an email asking for a coffee date?"}
],
"functions": [
{
"name": "send_email",
"description": "Please send an email.",
"parameters": {
"type": "object",
"properties": {
"to_address": {
"type": "string",
"description": "To address for email"
},
"subject": {
"type": "string",
"description": "subject of the email"
},
"body": {
"type": "string",
"description": "Body of the email"
}
}
}
}
]
}

I sent the POST request via Postman; you can try it out for yourself here.

Image by Jim Clyde Monge

This is the response I received from the model in JSON format.

{
"id": "chatcmpl-7RATyvNoqYlbkoeffEkIEbXUL7zqW",
"object": "chat.completion",
"created": 1686709506,
"model": "gpt-3.5-turbo-0613",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": null,
"function_call": {
"name": "send_email",
"arguments": "{\n \"to_address\": \"jim@example.com\",\n \"subject\": \"Coffee Date\",\n \"body\": \"Hi…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

--

--

Published in Generative AI

All the latest news and updates on the rapidly evolving field of Generative AI space. From cutting-edge research and developments in LLMs, text-to-image generators, to real-world applications, and the impact of generative AI on various industries.

Responses (3)

Write a response