Retrieving data from ChatGPT
When you were reviewing the output from your test flows, you probably noticed that ChatGPT’s answers (or responses) were structured in a particular way:
Figure 3.20 – ChatGPT response data
The structure, which is JavaScript Object Notation (JSON) here, is a standardized format that stores objects in a name:value
pair structure or notation.
So, what exactly is JSON?
Let’s take a look at a few fields in our example:
"body": {
"object": "text_completion",
"model": "gpt-3.5-turbo",
"choices": [
{
"text": "\n\n1. Flour...