Perform calling and different API updates

Builders can now describe features to gpt-4-0613 and gpt-3.5-turbo-0613and have the mannequin intelligently select to output a JSON object containing arguments to name these features. It is a new solution to extra reliably join GPT’s capabilities with exterior instruments and APIs.

These fashions have been fine-tuned to each detect when a perform must be known as (relying on the person’s enter) and to reply with JSON that adheres to the perform signature. Perform calling permits builders to extra reliably get structured information again from the mannequin. For instance, builders can:

  • Create chatbots that reply questions by calling exterior instruments (e.g., like ChatGPT Plugins)

Convert queries resembling “Email Anya to see if she wants to get coffee next Friday” to a perform name like send_email(to: string, physique: string)or “What’s the weather like in Boston?” to get_current_weather(location: string, unit: 'celsius' | 'fahrenheit').

  • Convert pure language into API calls or database queries

Convert “Who are my top ten customers this month?” to an inner API name resembling get_customers_by_revenue(start_date: string, end_date: string, restrict: int)or “How many orders did Acme, Inc. place last month?” to a SQL question utilizing sql_query(question: string).

  • Extract structured information from textual content

Outline a perform known as extract_people_data(folks: [{name: string, birthday: string, location: string}])to extract all folks talked about in a Wikipedia article.

These use instances are enabled by new API parameters in our /v1/chat/completions endpoint, features and function_callthat permit builders to explain features to the mannequin through JSON Schema, and optionally ask it to name a particular perform. Get began with our developer documentation and add evals if you happen to discover instances the place perform calling may very well be improved

Author:
Date: 2023-06-13 03:00:00

Source link

spot_imgspot_img

Subscribe

Related articles

spot_imgspot_img
Alina A, Toronto
Alina A, Torontohttp://alinaa-cybersecurity.com
Alina A, an UofT graduate & Google Certified Cyber Security analyst, currently based in Toronto, Canada. She is passionate for Research and to write about Cyber-security related issues, trends and concerns in an emerging digital world.

LEAVE A REPLY

Please enter your comment!
Please enter your name here