|
@@ -1,11 +1,13 @@
|
|
package com.caimei365.user.model.dto;
|
|
package com.caimei365.user.model.dto;
|
|
|
|
|
|
|
|
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import lombok.Data;
|
|
import lombok.Data;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@Data
|
|
@Data
|
|
|
|
+@JsonIgnoreProperties(ignoreUnknown = true)
|
|
public class ChatCompletionResponse {
|
|
public class ChatCompletionResponse {
|
|
|
|
|
|
|
|
|
|
@@ -47,6 +49,7 @@ public class ChatCompletionResponse {
|
|
// Getters and setters or Lombok annotations
|
|
// Getters and setters or Lombok annotations
|
|
|
|
|
|
@Data
|
|
@Data
|
|
|
|
+ @JsonIgnoreProperties(ignoreUnknown = true)
|
|
public static class SearchInfo {
|
|
public static class SearchInfo {
|
|
@JsonProperty("search_results")
|
|
@JsonProperty("search_results")
|
|
private List<SearchResult> searchResults;
|
|
private List<SearchResult> searchResults;
|
|
@@ -55,6 +58,7 @@ public class ChatCompletionResponse {
|
|
}
|
|
}
|
|
|
|
|
|
@Data
|
|
@Data
|
|
|
|
+ @JsonIgnoreProperties(ignoreUnknown = true)
|
|
public static class SearchResult {
|
|
public static class SearchResult {
|
|
@JsonProperty("index")
|
|
@JsonProperty("index")
|
|
private int index;
|
|
private int index;
|
|
@@ -73,6 +77,10 @@ public class ChatCompletionResponse {
|
|
|
|
|
|
@Data
|
|
@Data
|
|
public static class Usage {
|
|
public static class Usage {
|
|
|
|
+
|
|
|
|
+ @JsonProperty("prompt_tokens_details")
|
|
|
|
+ private Object tokenDetail;
|
|
|
|
+
|
|
@JsonProperty("prompt_tokens")
|
|
@JsonProperty("prompt_tokens")
|
|
private int promptTokens;
|
|
private int promptTokens;
|
|
|
|
|