diff --git a/src/main/java/io/github/stefanbratanov/jvm/openai/ChunkingStrategy.java b/src/main/java/io/github/stefanbratanov/jvm/openai/ChunkingStrategy.java index 68f259a..b113998 100644 --- a/src/main/java/io/github/stefanbratanov/jvm/openai/ChunkingStrategy.java +++ b/src/main/java/io/github/stefanbratanov/jvm/openai/ChunkingStrategy.java @@ -34,7 +34,7 @@ public String type() { } } - record StaticChunkingStrategy(@JsonProperty("static") Static aStatic) + record StaticChunkingStrategy(@JsonProperty("static") Static staticVal) implements ChunkingStrategy { public record Static(int maxChunkSizeTokens, int chunkOverlapTokens) {} diff --git a/src/main/java/io/github/stefanbratanov/jvm/openai/ThreadMessage.java b/src/main/java/io/github/stefanbratanov/jvm/openai/ThreadMessage.java index c862740..4f2a878 100644 --- a/src/main/java/io/github/stefanbratanov/jvm/openai/ThreadMessage.java +++ b/src/main/java/io/github/stefanbratanov/jvm/openai/ThreadMessage.java @@ -104,7 +104,7 @@ public String type() { return Constants.FILE_CITATION_ANNOTATION_TYPE; } - public record FileCitation(String fileId, String quote) {} + public record FileCitation(String fileId) {} } record FilePathAnnotation(String text, FilePath filePath, int startIndex, int endIndex) diff --git a/src/test/java/io/github/stefanbratanov/jvm/openai/SerializationTest.java b/src/test/java/io/github/stefanbratanov/jvm/openai/SerializationTest.java index 088f022..cba63b1 100644 --- a/src/test/java/io/github/stefanbratanov/jvm/openai/SerializationTest.java +++ b/src/test/java/io/github/stefanbratanov/jvm/openai/SerializationTest.java @@ -231,11 +231,11 @@ void doesNotSerializeTypeTwiceForJsonSubTypesAnnotatedClasses() throws JsonProce .isEqualTo("{\"index\":0,\"logs\":\"foobar\",\"type\":\"logs\"}"); Annotation annotation = - new Annotation.FileCitationAnnotation("foobar", new FileCitation("foobar", "foobar"), 0, 0); + new Annotation.FileCitationAnnotation("foobar", new FileCitation("foobar"), 0, 0); assertThat(objectMapper.writeValueAsString(annotation)) .isEqualTo( - "{\"text\":\"foobar\",\"file_citation\":{\"file_id\":\"foobar\",\"quote\":\"foobar\"},\"start_index\":0,\"end_index\":0,\"type\":\"file_citation\"}"); + "{\"text\":\"foobar\",\"file_citation\":{\"file_id\":\"foobar\"},\"start_index\":0,\"end_index\":0,\"type\":\"file_citation\"}"); Delta.Content.TextContent.Text.Annotation.FilePathAnnotation deltaAnnotation = new Text.Annotation.FilePathAnnotation(0, "foobar", new FilePath("foobar"), 0, 0); diff --git a/src/test/java/io/github/stefanbratanov/jvm/openai/TestDataUtil.java b/src/test/java/io/github/stefanbratanov/jvm/openai/TestDataUtil.java index 82c6be5..65202fe 100644 --- a/src/test/java/io/github/stefanbratanov/jvm/openai/TestDataUtil.java +++ b/src/test/java/io/github/stefanbratanov/jvm/openai/TestDataUtil.java @@ -765,7 +765,7 @@ private Annotation randomThreadMessageAnnotation() { return oneOf( new FileCitationAnnotation( randomString(10, 100), - new FileCitationAnnotation.FileCitation(randomString(8), randomString(5, 20)), + new FileCitationAnnotation.FileCitation(randomString(8)), randomInt(0, 100), randomInt(0, 100)), new FilePathAnnotation(