package com.zy.ai.entity;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
import lombok.Data;
|
|
import java.util.ArrayList;
|
import java.util.List;
|
|
@Data
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
public class ResponsesApiResponse {
|
|
private String id;
|
private String object = "response";
|
private String model;
|
private String status = "completed";
|
private List<OutputItem> output;
|
|
@JsonProperty("created_at")
|
private Long createdAt;
|
|
@JsonProperty("output_text")
|
private String outputText;
|
|
private Usage usage;
|
|
@Data
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
public static class OutputItem {
|
private String id;
|
private String type = "message";
|
private String status = "completed";
|
private String role = "assistant";
|
private List<ContentItem> content;
|
}
|
|
@Data
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
public static class ContentItem {
|
private String type = "output_text";
|
private String text;
|
private List<Object> annotations = new ArrayList<>();
|
}
|
|
@Data
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
public static class Usage {
|
@JsonProperty("input_tokens")
|
private Integer inputTokens;
|
|
@JsonProperty("output_tokens")
|
private Integer outputTokens;
|
|
@JsonProperty("total_tokens")
|
private Integer totalTokens;
|
}
|
}
|