GPT-4 Function Calling Complete Guide | NEW ChaptGPT Models | OpenAI

Описание к видео GPT-4 Function Calling Complete Guide | NEW ChaptGPT Models | OpenAI

Written version: https://www.hackwithgpt.com/blog/func...

0:00 Introduction
0:16 What is Function Calling?
1:27 How to Use Function Calling?
4:28 Calling The Suggested Function
5:50 function_call Parameter Options
9:04 Structured Data / Non-existent Functions
11:03 Emulate Multiple Functions
13:16 JSON Schema ChatGPT Prompt
13:59 Troubleshooting


OpenAI’s gpt-3.5-turbo-0613 and gpt-4-0613 models are fine-tuned to detect when a function needs to be called based on user input and how to respond with proper JSON.

These models enable developers to create ChatGPT plugin functionality that can be used outside of the ChatGPT web app. This tutorial will show you how to use OpenAI’s gpt-3.5-turbo-0613 and gpt-4-0613 models to develop with the function calling feature.

In this tutorial, we will go over the following:

What is Function Calling
How to Use Function Calling
Diving Deeper
function_call Parameter Options
Multiple Functions
Problem
Solution
Any Structured Data / Non-existent Functions
Generate a Function Call JSON Schema
Troubleshooting

Function calling enables programmers to consistently retrieve structured data from OpenAI’s GPT models. OpenAI isn’t executing the function for you, but it returns a JSON object with the function name it thinks should be called and the arguments to pass to the function.

This gives programmers the ability to:

Create Plugin like functionality that can be used outside of the ChatGPT web app

Transform inquiries like “Message Ravi to see if he can join for lunch next Wednesday” into a command like send_message(recipient: string, content: string), or “How’s the temperature in New York?” to get_present_temperature(location: string, scale: 'celsius' | 'fahrenheit').
Convert natural language into API requests or database queries

Change “Who are my top five clients this week?” to a private API request such as get_clients_by_income(start_period: string, end_period: string, cap: int), or “How many transactions did Delta Corp make last week?” to a SQL request utilizing sql_request(request: string).
Extract structured data from text

Create a function called extract_entity_data(entities: [{name: string, birthdate: string, place: string}]), to draw out all entities cited in an Encyclopedia Britannica entry.

Комментарии

Информация по комментариям в разработке