A Question about ChatResponse and Generations #2390
-
| The  Here is an excerpt from the  public Generation getResult() {
  if (CollectionUtils.isEmpty(this.generations)) {
    return null;
  }
    return this.generations.get(0);
}So what is the point of the list? | 
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
| You can retrieve the entire list of Generation objects using the  | 
Beta Was this translation helpful? Give feedback.
-
| @dev-jonghoonpark Thanks for the answer!! It is possible to query multiple results using the  {
  "results": [
    { "content": "Hello! How can I help?" },
    { "content": "Hey! What can I do for you?" },
    { "content": "Hi! How can I assist you?" }
  ]
} | 
Beta Was this translation helpful? Give feedback.
You can retrieve the entire list of Generation objects using the
getResults()method.If you only need to return a single result, you can use
getResult. If you need the rest as well, you can usegetResults.