Functional Call - Multiple break down results in one call

Hey team!

Problem:
Below is the example functional call I drafted, but I only got one result instead of multiple ones.

I am trying to get some support from here and am open to any thoughts on top of this.

{
  "name": "get_topics",
  "parameters": {
    "type": "object",
    "properties": {
      "topics": {
        "type": "array",
        "topic": {
          "type": "object",
          "properties": {
            "topic_sentence": {
              "type": "string",
              "description": "Topic: \"title\""
            },
            "topic_start": {
              "type": "string",
              "description": "Sentence Start: [Number of the sentence]"
            },
            "topic_end": {
              "type": "string",
              "description": "Sentence End: [Number of the sentence]"
            }
          }
        }
      }
    },
    "required": [
      "topics"
    ]
  },
  "description": "I will provide you the transcript. The sentences inside the transcript are enumerated. You will read the transcript and break it up into individual chapters. Each topic provides separate information and represents a separate topic."
}

Context of the task:
I have the input as the transcript, and each sentence is tagged with a unique number in ascending order.
I plan to use chatgpt to understand the transcript and then break down this transcript into a different slice.

I would try to get a result like the one below.

Summary sentences 1 - 5, start sentence 1, end sentence 5.
Summary sentences 11 - 15, start sentence 11, end sentence 15.
etc…

As far as I know, without a functional call, the response from chatgpt is not always predictable, even if I give them a strict prompt.

Therefore, I think a functional call would be an excellent option to constrain the response to the format I like.

Thanks!
Len

That’s not the way you specify an array of objects in JSON Schema. The word “topic” in your schema should be “items”

Thanks!
But how do you know I should use “items” instead of my defined “topic”?
Is there any doc reference for this since I don’t see any…