|
9 | 9 | import java.util.List;
|
10 | 10 | import java.util.Map;
|
11 | 11 |
|
| 12 | +import com.fasterxml.jackson.annotation.JsonIgnore; |
12 | 13 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
13 | 14 | import com.fasterxml.jackson.annotation.JsonInclude;
|
14 | 15 | import com.fasterxml.jackson.annotation.JsonProperty;
|
@@ -964,61 +965,34 @@ public record CompleteCompletion(// @formatter:off
|
964 | 965 | @JsonSubTypes.Type(value = EmbeddedResource.class, name = "resource") })
|
965 | 966 | public sealed interface Content permits TextContent, ImageContent, EmbeddedResource {
|
966 | 967 |
|
967 |
| - String type(); |
| 968 | + // String type(); |
968 | 969 |
|
969 | 970 | }
|
970 | 971 |
|
971 | 972 | @JsonInclude(JsonInclude.Include.NON_ABSENT)
|
972 | 973 | public record TextContent( // @formatter:off
|
973 | 974 | @JsonProperty("audience") List<Role> audience,
|
974 | 975 | @JsonProperty("priority") Double priority,
|
975 |
| - @JsonProperty("type") String type, |
976 | 976 | @JsonProperty("text") String text) implements Content { // @formatter:on
|
977 | 977 |
|
978 |
| - public TextContent { |
979 |
| - type = "text"; |
980 |
| - } |
981 |
| - |
982 |
| - public String type() { |
983 |
| - return type; |
984 |
| - } |
985 |
| - |
986 | 978 | public TextContent(String content) {
|
987 |
| - this(null, null, "text", content); |
| 979 | + this(null, null, content); |
988 | 980 | }
|
989 | 981 | }
|
990 | 982 |
|
991 | 983 | @JsonInclude(JsonInclude.Include.NON_ABSENT)
|
992 | 984 | public record ImageContent( // @formatter:off
|
993 | 985 | @JsonProperty("audience") List<Role> audience,
|
994 | 986 | @JsonProperty("priority") Double priority,
|
995 |
| - @JsonProperty("type") String type, |
996 | 987 | @JsonProperty("data") String data,
|
997 | 988 | @JsonProperty("mimeType") String mimeType) implements Content { // @formatter:on
|
998 |
| - |
999 |
| - public ImageContent { |
1000 |
| - type = "image"; |
1001 |
| - } |
1002 |
| - |
1003 |
| - public String type() { |
1004 |
| - return type; |
1005 |
| - } |
1006 | 989 | }
|
1007 | 990 |
|
1008 | 991 | @JsonInclude(JsonInclude.Include.NON_ABSENT)
|
1009 | 992 | public record EmbeddedResource( // @formatter:off
|
1010 | 993 | @JsonProperty("audience") List<Role> audience,
|
1011 | 994 | @JsonProperty("priority") Double priority,
|
1012 |
| - @JsonProperty("type") String type, |
1013 | 995 | @JsonProperty("resource") ResourceContents resource) implements Content { // @formatter:on
|
1014 |
| - |
1015 |
| - public EmbeddedResource { |
1016 |
| - type = "resource"; |
1017 |
| - } |
1018 |
| - |
1019 |
| - public String type() { |
1020 |
| - return type; |
1021 |
| - } |
1022 | 996 | }
|
1023 | 997 |
|
1024 | 998 | // ---------------------------
|
|
0 commit comments