@JsonIgnore
	public <T> T getStructuredOutput(Class<T> clazz) throws Exception {
		if (isEmpty())
			return null;
		String jsonContent = "";
		String refusal = null;
		for (ChatCompletionChoice choice : choices) {
			final ChatMessage message = choice.getMessage();
			if (message != null) {
				if (message.getContent() != null) {
					jsonContent = message.getContent();
					break;
				}
				if (message.getRefusal() != null) {
					refusal = message.getRefusal();
				}
			}

		}
		if (!jsonContent.startsWith("{")) {
			throw new Exception("No structured output found: " + refusal);
		}
		return GPTFunctionUtils.objectMapper.readValue(jsonContent, clazz);
	}
get reply text from messages' content
@return reply text
src/main/java/org/mvnsearch/chatgpt/model/completion/chat/ChatCompletionResponse.java