2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.chatgpt.internal.dto;
15 import java.util.List;
17 import com.google.gson.annotations.SerializedName;
20 * This is a dto used for parsing the JSON response from ChatGPT.
22 * @author Kai Kreuzer - Initial contribution
25 public class ChatResponse {
27 private List<Choice> choices;
29 private String object;
33 public List<Choice> getChoices() {
37 public String getId() {
41 public int getCreated() {
45 public String getObject() {
49 public String getModel() {
53 public static class Choice {
54 private Message message;
56 @SerializedName("finish_reason")
57 private String finishReason;
60 public Message getMessage() {
64 public String getFinishReason() {
68 public int getIndex() {
73 public static class Message {
75 private String content;
77 public String getRole() {
81 public String getContent() {