For instance, an API that handles bi-directional video streaming will have very different requirements than an API that is responsible for an authentication workflow. These use cases are enabled by new API parameters in our /v1/chat/completions endpoint, functions and function_call, that allow developers to describe functions to the model via JSON Schema, and optionally ask it to call a specific function. Overview For clarity of presentation, the samples on this page show the distinctive elements of each request and abbreviate the base URL for the host that processes Data API requests (. Step 1: Design the API The first step in the API design process is to gain clarity on what you need your API to do. ![]() place last month?” to a SQL query using sql_query(query: string).ĭefine a function called extract_people_data(people: ), to extract all people mentioned in a Wikipedia article. Convert natural language into API calls or database queriesĬonvert “Who are my top ten customers this month?” to an internal API call such as get_customers_by_revenue(start_date: string, end_date: string, limit: int), or “How many orders did Acme, Inc.Start collaborating Postman Flows Use Postman's visual tool for creating API workflows. Create tests Collaborate with your team Use Postman to enhance collaboration within your team. Create chatbots that answer questions by calling external tools (e.g., like ChatGPT Plugins)Ĭonvert queries such as “Email Anya to see if she wants to get coffee next Friday” to a function call like send_email(to: string, body: string), or “What’s the weather like in Boston?” to get_current_weather(location: string, unit: 'celsius' | 'fahrenheit'). Develop your API Test with Postman Write test scripts and build automation into your workflow. In This Tutorial, we will Explain How and When to Use Postman Pre-request Scripts and Post Request Scripts or Tests with the Help of Simple Examples: In analogy to the unit testing world, the pre-request script is nothing but the setup that will happen before a test is executed.The second part of the course will get into the most exciting feature of Postman: writing API tests and automating their execution. In this course you will learn how to build API requests with Postman and how to inspect responses and create workflows. We’re going to use a new demo API that we have set up, and which you can use while following this tutorial. Function calling allows developers to more reliably get structured data back from the model. Valentin is a developer educator who has been teaching software concepts for many years. Writing a simple test Let’s write a simple test to give you a feel of how everything fits together. These models have been fine-tuned to both detect when a function needs to be called (depending on the user’s input) and to respond with JSON that adheres to the function signature. ![]() This is a new way to more reliably connect GPT's capabilities with external tools and APIs. Developers can now describe functions to gpt-4-0613 and gpt-3.5-turbo-0613, and have the model intelligently choose to output a JSON object containing arguments to call those functions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |