diff --git a/openai-java-core/src/test/kotlin/com/openai/models/BatchErrorTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/BatchErrorTest.kt index 369f8cd..2f16001 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/BatchErrorTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/BatchErrorTest.kt @@ -10,10 +10,10 @@ class BatchErrorTest { @Test fun createBatchError() { val batchError = - BatchError.builder().code("code").line(123L).message("message").param("param").build() + BatchError.builder().code("code").line(0L).message("message").param("param").build() assertThat(batchError).isNotNull assertThat(batchError.code()).contains("code") - assertThat(batchError.line()).contains(123L) + assertThat(batchError.line()).contains(0L) assertThat(batchError.message()).contains("message") assertThat(batchError.param()).contains("param") } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/BatchListParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/BatchListParamsTest.kt index 7e817c5..bddddae 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/BatchListParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/BatchListParamsTest.kt @@ -11,15 +11,15 @@ class BatchListParamsTest { @Test fun createBatchListParams() { - BatchListParams.builder().after("after").limit(123L).build() + BatchListParams.builder().after("after").limit(0L).build() } @Test fun getQueryParams() { - val params = BatchListParams.builder().after("after").limit(123L).build() + val params = BatchListParams.builder().after("after").limit(0L).build() val expected = QueryParams.builder() expected.put("after", "after") - expected.put("limit", "123") + expected.put("limit", "0") assertThat(params.getQueryParams()).isEqualTo(expected.build()) } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/BatchRequestCountsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/BatchRequestCountsTest.kt index 6c391f6..d499229 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/BatchRequestCountsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/BatchRequestCountsTest.kt @@ -10,10 +10,10 @@ class BatchRequestCountsTest { @Test fun createBatchRequestCounts() { val batchRequestCounts = - BatchRequestCounts.builder().completed(123L).failed(123L).total(123L).build() + BatchRequestCounts.builder().completed(0L).failed(0L).total(0L).build() assertThat(batchRequestCounts).isNotNull - assertThat(batchRequestCounts.completed()).isEqualTo(123L) - assertThat(batchRequestCounts.failed()).isEqualTo(123L) - assertThat(batchRequestCounts.total()).isEqualTo(123L) + assertThat(batchRequestCounts.completed()).isEqualTo(0L) + assertThat(batchRequestCounts.failed()).isEqualTo(0L) + assertThat(batchRequestCounts.total()).isEqualTo(0L) } } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/BatchTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/BatchTest.kt index 747ec7f..163e6ad 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/BatchTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/BatchTest.kt @@ -14,14 +14,14 @@ class BatchTest { Batch.builder() .id("id") .completionWindow("completion_window") - .createdAt(123L) + .createdAt(0L) .endpoint("endpoint") .inputFileId("input_file_id") .object_(Batch.Object.BATCH) .status(Batch.Status.VALIDATING) - .cancelledAt(123L) - .cancellingAt(123L) - .completedAt(123L) + .cancelledAt(0L) + .cancellingAt(0L) + .completedAt(0L) .errorFileId("error_file_id") .errors( Batch.Errors.builder() @@ -29,7 +29,7 @@ class BatchTest { listOf( BatchError.builder() .code("code") - .line(123L) + .line(0L) .message("message") .param("param") .build() @@ -38,28 +38,28 @@ class BatchTest { .object_("object") .build() ) - .expiredAt(123L) - .expiresAt(123L) - .failedAt(123L) - .finalizingAt(123L) - .inProgressAt(123L) + .expiredAt(0L) + .expiresAt(0L) + .failedAt(0L) + .finalizingAt(0L) + .inProgressAt(0L) .metadata(JsonNull.of()) .outputFileId("output_file_id") .requestCounts( - BatchRequestCounts.builder().completed(123L).failed(123L).total(123L).build() + BatchRequestCounts.builder().completed(0L).failed(0L).total(0L).build() ) .build() assertThat(batch).isNotNull assertThat(batch.id()).isEqualTo("id") assertThat(batch.completionWindow()).isEqualTo("completion_window") - assertThat(batch.createdAt()).isEqualTo(123L) + assertThat(batch.createdAt()).isEqualTo(0L) assertThat(batch.endpoint()).isEqualTo("endpoint") assertThat(batch.inputFileId()).isEqualTo("input_file_id") assertThat(batch.object_()).isEqualTo(Batch.Object.BATCH) assertThat(batch.status()).isEqualTo(Batch.Status.VALIDATING) - assertThat(batch.cancelledAt()).contains(123L) - assertThat(batch.cancellingAt()).contains(123L) - assertThat(batch.completedAt()).contains(123L) + assertThat(batch.cancelledAt()).contains(0L) + assertThat(batch.cancellingAt()).contains(0L) + assertThat(batch.completedAt()).contains(0L) assertThat(batch.errorFileId()).contains("error_file_id") assertThat(batch.errors()) .contains( @@ -68,7 +68,7 @@ class BatchTest { listOf( BatchError.builder() .code("code") - .line(123L) + .line(0L) .message("message") .param("param") .build() @@ -77,14 +77,14 @@ class BatchTest { .object_("object") .build() ) - assertThat(batch.expiredAt()).contains(123L) - assertThat(batch.expiresAt()).contains(123L) - assertThat(batch.failedAt()).contains(123L) - assertThat(batch.finalizingAt()).contains(123L) - assertThat(batch.inProgressAt()).contains(123L) + assertThat(batch.expiredAt()).contains(0L) + assertThat(batch.expiresAt()).contains(0L) + assertThat(batch.failedAt()).contains(0L) + assertThat(batch.finalizingAt()).contains(0L) + assertThat(batch.inProgressAt()).contains(0L) assertThat(batch._metadata()).isEqualTo(JsonNull.of()) assertThat(batch.outputFileId()).contains("output_file_id") assertThat(batch.requestCounts()) - .contains(BatchRequestCounts.builder().completed(123L).failed(123L).total(123L).build()) + .contains(BatchRequestCounts.builder().completed(0L).failed(0L).total(0L).build()) } } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionAudioTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionAudioTest.kt index cbd452e..1226ddb 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionAudioTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionAudioTest.kt @@ -13,13 +13,13 @@ class ChatCompletionAudioTest { ChatCompletionAudio.builder() .id("id") .data("data") - .expiresAt(123L) + .expiresAt(0L) .transcript("transcript") .build() assertThat(chatCompletionAudio).isNotNull assertThat(chatCompletionAudio.id()).isEqualTo("id") assertThat(chatCompletionAudio.data()).isEqualTo("data") - assertThat(chatCompletionAudio.expiresAt()).isEqualTo(123L) + assertThat(chatCompletionAudio.expiresAt()).isEqualTo(0L) assertThat(chatCompletionAudio.transcript()).isEqualTo("transcript") } } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionChunkTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionChunkTest.kt index 81f73bd..ee136a0 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionChunkTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionChunkTest.kt @@ -29,7 +29,7 @@ class ChatCompletionChunkTest { .toolCalls( listOf( ChatCompletionChunk.Choice.Delta.ToolCall.builder() - .index(123L) + .index(0L) .id("id") .function( ChatCompletionChunk.Choice.Delta.ToolCall @@ -49,22 +49,22 @@ class ChatCompletionChunkTest { .build() ) .finishReason(ChatCompletionChunk.Choice.FinishReason.STOP) - .index(123L) + .index(0L) .logprobs( ChatCompletionChunk.Choice.Logprobs.builder() .content( listOf( ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob .builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) @@ -75,15 +75,15 @@ class ChatCompletionChunkTest { listOf( ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob .builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) @@ -95,28 +95,28 @@ class ChatCompletionChunkTest { .build() ) ) - .created(123L) + .created(0L) .model("model") .object_(ChatCompletionChunk.Object.CHAT_COMPLETION_CHUNK) .serviceTier(ChatCompletionChunk.ServiceTier.SCALE) .systemFingerprint("system_fingerprint") .usage( CompletionUsage.builder() - .completionTokens(123L) - .promptTokens(123L) - .totalTokens(123L) + .completionTokens(0L) + .promptTokens(0L) + .totalTokens(0L) .completionTokensDetails( CompletionUsage.CompletionTokensDetails.builder() - .acceptedPredictionTokens(123L) - .audioTokens(123L) - .reasoningTokens(123L) - .rejectedPredictionTokens(123L) + .acceptedPredictionTokens(0L) + .audioTokens(0L) + .reasoningTokens(0L) + .rejectedPredictionTokens(0L) .build() ) .promptTokensDetails( CompletionUsage.PromptTokensDetails.builder() - .audioTokens(123L) - .cachedTokens(123L) + .audioTokens(0L) + .cachedTokens(0L) .build() ) .build() @@ -141,7 +141,7 @@ class ChatCompletionChunkTest { .toolCalls( listOf( ChatCompletionChunk.Choice.Delta.ToolCall.builder() - .index(123L) + .index(0L) .id("id") .function( ChatCompletionChunk.Choice.Delta.ToolCall.Function @@ -159,21 +159,21 @@ class ChatCompletionChunkTest { .build() ) .finishReason(ChatCompletionChunk.Choice.FinishReason.STOP) - .index(123L) + .index(0L) .logprobs( ChatCompletionChunk.Choice.Logprobs.builder() .content( listOf( ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) @@ -184,14 +184,14 @@ class ChatCompletionChunkTest { listOf( ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) @@ -202,7 +202,7 @@ class ChatCompletionChunkTest { ) .build() ) - assertThat(chatCompletionChunk.created()).isEqualTo(123L) + assertThat(chatCompletionChunk.created()).isEqualTo(0L) assertThat(chatCompletionChunk.model()).isEqualTo("model") assertThat(chatCompletionChunk.object_()) .isEqualTo(ChatCompletionChunk.Object.CHAT_COMPLETION_CHUNK) @@ -212,21 +212,21 @@ class ChatCompletionChunkTest { assertThat(chatCompletionChunk.usage()) .contains( CompletionUsage.builder() - .completionTokens(123L) - .promptTokens(123L) - .totalTokens(123L) + .completionTokens(0L) + .promptTokens(0L) + .totalTokens(0L) .completionTokensDetails( CompletionUsage.CompletionTokensDetails.builder() - .acceptedPredictionTokens(123L) - .audioTokens(123L) - .reasoningTokens(123L) - .rejectedPredictionTokens(123L) + .acceptedPredictionTokens(0L) + .audioTokens(0L) + .reasoningTokens(0L) + .rejectedPredictionTokens(0L) .build() ) .promptTokensDetails( CompletionUsage.PromptTokensDetails.builder() - .audioTokens(123L) - .cachedTokens(123L) + .audioTokens(0L) + .cachedTokens(0L) .build() ) .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionCreateParamsTest.kt index c335a26..a2f6328 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionCreateParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionCreateParamsTest.kt @@ -31,7 +31,7 @@ class ChatCompletionCreateParamsTest { .voice(ChatCompletionAudioParam.Voice.ALLOY) .build() ) - .frequencyPenalty(2.0) + .frequencyPenalty(-2.0) .functionCall( ChatCompletionCreateParams.FunctionCall.ofBehavior( ChatCompletionCreateParams.FunctionCall.Behavior.NONE @@ -48,11 +48,11 @@ class ChatCompletionCreateParamsTest { ) .logitBias(ChatCompletionCreateParams.LogitBias.builder().build()) .logprobs(true) - .maxCompletionTokens(123L) - .maxTokens(123L) + .maxCompletionTokens(0L) + .maxTokens(0L) .metadata(ChatCompletionCreateParams.Metadata.builder().build()) .modalities(listOf(ChatCompletionModality.TEXT)) - .n(123L) + .n(1L) .parallelToolCalls(true) .prediction( ChatCompletionPredictionContent.builder() @@ -60,18 +60,18 @@ class ChatCompletionCreateParamsTest { .type(ChatCompletionPredictionContent.Type.CONTENT) .build() ) - .presencePenalty(2.0) + .presencePenalty(-2.0) .responseFormat( ChatCompletionCreateParams.ResponseFormat.ofResponseFormatText( ResponseFormatText.builder().type(ResponseFormatText.Type.TEXT).build() ) ) - .seed(123L) + .seed(-9007199254740991L) .serviceTier(ChatCompletionCreateParams.ServiceTier.AUTO) .stop(ChatCompletionCreateParams.Stop.ofString("string")) .store(true) .streamOptions(ChatCompletionStreamOptions.builder().includeUsage(true).build()) - .temperature(2.0) + .temperature(1.0) .toolChoice( ChatCompletionToolChoiceOption.ofBehavior( ChatCompletionToolChoiceOption.Behavior.NONE @@ -92,7 +92,7 @@ class ChatCompletionCreateParamsTest { .build() ) ) - .topLogprobs(20L) + .topLogprobs(0L) .topP(1.0) .user("user-1234") .build() @@ -122,7 +122,7 @@ class ChatCompletionCreateParamsTest { .voice(ChatCompletionAudioParam.Voice.ALLOY) .build() ) - .frequencyPenalty(2.0) + .frequencyPenalty(-2.0) .functionCall( ChatCompletionCreateParams.FunctionCall.ofBehavior( ChatCompletionCreateParams.FunctionCall.Behavior.NONE @@ -139,11 +139,11 @@ class ChatCompletionCreateParamsTest { ) .logitBias(ChatCompletionCreateParams.LogitBias.builder().build()) .logprobs(true) - .maxCompletionTokens(123L) - .maxTokens(123L) + .maxCompletionTokens(0L) + .maxTokens(0L) .metadata(ChatCompletionCreateParams.Metadata.builder().build()) .modalities(listOf(ChatCompletionModality.TEXT)) - .n(123L) + .n(1L) .parallelToolCalls(true) .prediction( ChatCompletionPredictionContent.builder() @@ -151,18 +151,18 @@ class ChatCompletionCreateParamsTest { .type(ChatCompletionPredictionContent.Type.CONTENT) .build() ) - .presencePenalty(2.0) + .presencePenalty(-2.0) .responseFormat( ChatCompletionCreateParams.ResponseFormat.ofResponseFormatText( ResponseFormatText.builder().type(ResponseFormatText.Type.TEXT).build() ) ) - .seed(123L) + .seed(-9007199254740991L) .serviceTier(ChatCompletionCreateParams.ServiceTier.AUTO) .stop(ChatCompletionCreateParams.Stop.ofString("string")) .store(true) .streamOptions(ChatCompletionStreamOptions.builder().includeUsage(true).build()) - .temperature(2.0) + .temperature(1.0) .toolChoice( ChatCompletionToolChoiceOption.ofBehavior( ChatCompletionToolChoiceOption.Behavior.NONE @@ -183,7 +183,7 @@ class ChatCompletionCreateParamsTest { .build() ) ) - .topLogprobs(20L) + .topLogprobs(0L) .topP(1.0) .user("user-1234") .build() @@ -211,7 +211,7 @@ class ChatCompletionCreateParamsTest { .voice(ChatCompletionAudioParam.Voice.ALLOY) .build() ) - assertThat(body.frequencyPenalty()).isEqualTo(2.0) + assertThat(body.frequencyPenalty()).isEqualTo(-2.0) assertThat(body.functionCall()) .isEqualTo( ChatCompletionCreateParams.FunctionCall.ofBehavior( @@ -231,11 +231,11 @@ class ChatCompletionCreateParamsTest { assertThat(body.logitBias()) .isEqualTo(ChatCompletionCreateParams.LogitBias.builder().build()) assertThat(body.logprobs()).isEqualTo(true) - assertThat(body.maxCompletionTokens()).isEqualTo(123L) - assertThat(body.maxTokens()).isEqualTo(123L) + assertThat(body.maxCompletionTokens()).isEqualTo(0L) + assertThat(body.maxTokens()).isEqualTo(0L) assertThat(body.metadata()).isEqualTo(ChatCompletionCreateParams.Metadata.builder().build()) assertThat(body.modalities()).isEqualTo(listOf(ChatCompletionModality.TEXT)) - assertThat(body.n()).isEqualTo(123L) + assertThat(body.n()).isEqualTo(1L) assertThat(body.parallelToolCalls()).isEqualTo(true) assertThat(body.prediction()) .isEqualTo( @@ -244,20 +244,20 @@ class ChatCompletionCreateParamsTest { .type(ChatCompletionPredictionContent.Type.CONTENT) .build() ) - assertThat(body.presencePenalty()).isEqualTo(2.0) + assertThat(body.presencePenalty()).isEqualTo(-2.0) assertThat(body.responseFormat()) .isEqualTo( ChatCompletionCreateParams.ResponseFormat.ofResponseFormatText( ResponseFormatText.builder().type(ResponseFormatText.Type.TEXT).build() ) ) - assertThat(body.seed()).isEqualTo(123L) + assertThat(body.seed()).isEqualTo(-9007199254740991L) assertThat(body.serviceTier()).isEqualTo(ChatCompletionCreateParams.ServiceTier.AUTO) assertThat(body.stop()).isEqualTo(ChatCompletionCreateParams.Stop.ofString("string")) assertThat(body.store()).isEqualTo(true) assertThat(body.streamOptions()) .isEqualTo(ChatCompletionStreamOptions.builder().includeUsage(true).build()) - assertThat(body.temperature()).isEqualTo(2.0) + assertThat(body.temperature()).isEqualTo(1.0) assertThat(body.toolChoice()) .isEqualTo( ChatCompletionToolChoiceOption.ofBehavior( @@ -280,7 +280,7 @@ class ChatCompletionCreateParamsTest { .build() ) ) - assertThat(body.topLogprobs()).isEqualTo(20L) + assertThat(body.topLogprobs()).isEqualTo(0L) assertThat(body.topP()).isEqualTo(1.0) assertThat(body.user()).isEqualTo("user-1234") } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionMessageTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionMessageTest.kt index bf2b3fd..c833e1c 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionMessageTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionMessageTest.kt @@ -18,7 +18,7 @@ class ChatCompletionMessageTest { ChatCompletionAudio.builder() .id("id") .data("data") - .expiresAt(123L) + .expiresAt(0L) .transcript("transcript") .build() ) @@ -52,7 +52,7 @@ class ChatCompletionMessageTest { ChatCompletionAudio.builder() .id("id") .data("data") - .expiresAt(123L) + .expiresAt(0L) .transcript("transcript") .build() ) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionTest.kt index 6253fe5..09defdd 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionTest.kt @@ -16,22 +16,22 @@ class ChatCompletionTest { listOf( ChatCompletion.Choice.builder() .finishReason(ChatCompletion.Choice.FinishReason.STOP) - .index(123L) + .index(0L) .logprobs( ChatCompletion.Choice.Logprobs.builder() .content( listOf( ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob .builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) @@ -42,15 +42,15 @@ class ChatCompletionTest { listOf( ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob .builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) @@ -68,7 +68,7 @@ class ChatCompletionTest { ChatCompletionAudio.builder() .id("id") .data("data") - .expiresAt(123L) + .expiresAt(0L) .transcript("transcript") .build() ) @@ -97,28 +97,28 @@ class ChatCompletionTest { .build() ) ) - .created(123L) + .created(0L) .model("model") .object_(ChatCompletion.Object.CHAT_COMPLETION) .serviceTier(ChatCompletion.ServiceTier.SCALE) .systemFingerprint("system_fingerprint") .usage( CompletionUsage.builder() - .completionTokens(123L) - .promptTokens(123L) - .totalTokens(123L) + .completionTokens(0L) + .promptTokens(0L) + .totalTokens(0L) .completionTokensDetails( CompletionUsage.CompletionTokensDetails.builder() - .acceptedPredictionTokens(123L) - .audioTokens(123L) - .reasoningTokens(123L) - .rejectedPredictionTokens(123L) + .acceptedPredictionTokens(0L) + .audioTokens(0L) + .reasoningTokens(0L) + .rejectedPredictionTokens(0L) .build() ) .promptTokensDetails( CompletionUsage.PromptTokensDetails.builder() - .audioTokens(123L) - .cachedTokens(123L) + .audioTokens(0L) + .cachedTokens(0L) .build() ) .build() @@ -130,21 +130,21 @@ class ChatCompletionTest { .containsExactly( ChatCompletion.Choice.builder() .finishReason(ChatCompletion.Choice.FinishReason.STOP) - .index(123L) + .index(0L) .logprobs( ChatCompletion.Choice.Logprobs.builder() .content( listOf( ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) @@ -155,14 +155,14 @@ class ChatCompletionTest { listOf( ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) @@ -180,7 +180,7 @@ class ChatCompletionTest { ChatCompletionAudio.builder() .id("id") .data("data") - .expiresAt(123L) + .expiresAt(0L) .transcript("transcript") .build() ) @@ -208,7 +208,7 @@ class ChatCompletionTest { ) .build() ) - assertThat(chatCompletion.created()).isEqualTo(123L) + assertThat(chatCompletion.created()).isEqualTo(0L) assertThat(chatCompletion.model()).isEqualTo("model") assertThat(chatCompletion.object_()).isEqualTo(ChatCompletion.Object.CHAT_COMPLETION) assertThat(chatCompletion.serviceTier()).contains(ChatCompletion.ServiceTier.SCALE) @@ -216,21 +216,21 @@ class ChatCompletionTest { assertThat(chatCompletion.usage()) .contains( CompletionUsage.builder() - .completionTokens(123L) - .promptTokens(123L) - .totalTokens(123L) + .completionTokens(0L) + .promptTokens(0L) + .totalTokens(0L) .completionTokensDetails( CompletionUsage.CompletionTokensDetails.builder() - .acceptedPredictionTokens(123L) - .audioTokens(123L) - .reasoningTokens(123L) - .rejectedPredictionTokens(123L) + .acceptedPredictionTokens(0L) + .audioTokens(0L) + .reasoningTokens(0L) + .rejectedPredictionTokens(0L) .build() ) .promptTokensDetails( CompletionUsage.PromptTokensDetails.builder() - .audioTokens(123L) - .cachedTokens(123L) + .audioTokens(0L) + .cachedTokens(0L) .build() ) .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionTokenLogprobTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionTokenLogprobTest.kt index 3b81ec2..ec00068 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionTokenLogprobTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ChatCompletionTokenLogprobTest.kt @@ -12,28 +12,28 @@ class ChatCompletionTokenLogprobTest { val chatCompletionTokenLogprob = ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) .build() assertThat(chatCompletionTokenLogprob).isNotNull assertThat(chatCompletionTokenLogprob.token()).isEqualTo("token") - assertThat(chatCompletionTokenLogprob.bytes().get()).containsExactly(123L) - assertThat(chatCompletionTokenLogprob.logprob()).isEqualTo(42.23) + assertThat(chatCompletionTokenLogprob.bytes().get()).containsExactly(0L) + assertThat(chatCompletionTokenLogprob.logprob()).isEqualTo(0.0) assertThat(chatCompletionTokenLogprob.topLogprobs()) .containsExactly( ChatCompletionTokenLogprob.TopLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/CompletionChoiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/CompletionChoiceTest.kt index 314e7f6..a1de204 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/CompletionChoiceTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/CompletionChoiceTest.kt @@ -12,11 +12,11 @@ class CompletionChoiceTest { val completionChoice = CompletionChoice.builder() .finishReason(CompletionChoice.FinishReason.STOP) - .index(123L) + .index(0L) .logprobs( CompletionChoice.Logprobs.builder() - .textOffset(listOf(123L)) - .tokenLogprobs(listOf(42.23)) + .textOffset(listOf(0L)) + .tokenLogprobs(listOf(0.0)) .tokens(listOf("string")) .topLogprobs(listOf(CompletionChoice.Logprobs.TopLogprob.builder().build())) .build() @@ -25,12 +25,12 @@ class CompletionChoiceTest { .build() assertThat(completionChoice).isNotNull assertThat(completionChoice.finishReason()).isEqualTo(CompletionChoice.FinishReason.STOP) - assertThat(completionChoice.index()).isEqualTo(123L) + assertThat(completionChoice.index()).isEqualTo(0L) assertThat(completionChoice.logprobs()) .contains( CompletionChoice.Logprobs.builder() - .textOffset(listOf(123L)) - .tokenLogprobs(listOf(42.23)) + .textOffset(listOf(0L)) + .tokenLogprobs(listOf(0.0)) .tokens(listOf("string")) .topLogprobs(listOf(CompletionChoice.Logprobs.TopLogprob.builder().build())) .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/models/CompletionCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/CompletionCreateParamsTest.kt index 06be55d..21ff1f1 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/CompletionCreateParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/CompletionCreateParamsTest.kt @@ -13,19 +13,19 @@ class CompletionCreateParamsTest { CompletionCreateParams.builder() .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT) .prompt(CompletionCreateParams.Prompt.ofString("This is a test.")) - .bestOf(20L) + .bestOf(0L) .echo(true) - .frequencyPenalty(2.0) + .frequencyPenalty(-2.0) .logitBias(CompletionCreateParams.LogitBias.builder().build()) - .logprobs(5L) - .maxTokens(123L) - .n(123L) - .presencePenalty(2.0) - .seed(123L) + .logprobs(0L) + .maxTokens(16L) + .n(1L) + .presencePenalty(-2.0) + .seed(-9007199254740991L) .stop(CompletionCreateParams.Stop.ofString("\n")) .streamOptions(ChatCompletionStreamOptions.builder().includeUsage(true).build()) .suffix("test.") - .temperature(2.0) + .temperature(1.0) .topP(1.0) .user("user-1234") .build() @@ -37,19 +37,19 @@ class CompletionCreateParamsTest { CompletionCreateParams.builder() .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT) .prompt(CompletionCreateParams.Prompt.ofString("This is a test.")) - .bestOf(20L) + .bestOf(0L) .echo(true) - .frequencyPenalty(2.0) + .frequencyPenalty(-2.0) .logitBias(CompletionCreateParams.LogitBias.builder().build()) - .logprobs(5L) - .maxTokens(123L) - .n(123L) - .presencePenalty(2.0) - .seed(123L) + .logprobs(0L) + .maxTokens(16L) + .n(1L) + .presencePenalty(-2.0) + .seed(-9007199254740991L) .stop(CompletionCreateParams.Stop.ofString("\n")) .streamOptions(ChatCompletionStreamOptions.builder().includeUsage(true).build()) .suffix("test.") - .temperature(2.0) + .temperature(1.0) .topP(1.0) .user("user-1234") .build() @@ -58,20 +58,20 @@ class CompletionCreateParamsTest { assertThat(body.model()).isEqualTo(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT) assertThat(body.prompt()) .isEqualTo(CompletionCreateParams.Prompt.ofString("This is a test.")) - assertThat(body.bestOf()).isEqualTo(20L) + assertThat(body.bestOf()).isEqualTo(0L) assertThat(body.echo()).isEqualTo(true) - assertThat(body.frequencyPenalty()).isEqualTo(2.0) + assertThat(body.frequencyPenalty()).isEqualTo(-2.0) assertThat(body.logitBias()).isEqualTo(CompletionCreateParams.LogitBias.builder().build()) - assertThat(body.logprobs()).isEqualTo(5L) - assertThat(body.maxTokens()).isEqualTo(123L) - assertThat(body.n()).isEqualTo(123L) - assertThat(body.presencePenalty()).isEqualTo(2.0) - assertThat(body.seed()).isEqualTo(123L) + assertThat(body.logprobs()).isEqualTo(0L) + assertThat(body.maxTokens()).isEqualTo(16L) + assertThat(body.n()).isEqualTo(1L) + assertThat(body.presencePenalty()).isEqualTo(-2.0) + assertThat(body.seed()).isEqualTo(-9007199254740991L) assertThat(body.stop()).isEqualTo(CompletionCreateParams.Stop.ofString("\n")) assertThat(body.streamOptions()) .isEqualTo(ChatCompletionStreamOptions.builder().includeUsage(true).build()) assertThat(body.suffix()).isEqualTo("test.") - assertThat(body.temperature()).isEqualTo(2.0) + assertThat(body.temperature()).isEqualTo(1.0) assertThat(body.topP()).isEqualTo(1.0) assertThat(body.user()).isEqualTo("user-1234") } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/CompletionTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/CompletionTest.kt index 7fed651..b2c7916 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/CompletionTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/CompletionTest.kt @@ -16,11 +16,11 @@ class CompletionTest { listOf( CompletionChoice.builder() .finishReason(CompletionChoice.FinishReason.STOP) - .index(123L) + .index(0L) .logprobs( CompletionChoice.Logprobs.builder() - .textOffset(listOf(123L)) - .tokenLogprobs(listOf(42.23)) + .textOffset(listOf(0L)) + .tokenLogprobs(listOf(0.0)) .tokens(listOf("string")) .topLogprobs( listOf( @@ -33,27 +33,27 @@ class CompletionTest { .build() ) ) - .created(123L) + .created(0L) .model("model") .object_(Completion.Object.TEXT_COMPLETION) .systemFingerprint("system_fingerprint") .usage( CompletionUsage.builder() - .completionTokens(123L) - .promptTokens(123L) - .totalTokens(123L) + .completionTokens(0L) + .promptTokens(0L) + .totalTokens(0L) .completionTokensDetails( CompletionUsage.CompletionTokensDetails.builder() - .acceptedPredictionTokens(123L) - .audioTokens(123L) - .reasoningTokens(123L) - .rejectedPredictionTokens(123L) + .acceptedPredictionTokens(0L) + .audioTokens(0L) + .reasoningTokens(0L) + .rejectedPredictionTokens(0L) .build() ) .promptTokensDetails( CompletionUsage.PromptTokensDetails.builder() - .audioTokens(123L) - .cachedTokens(123L) + .audioTokens(0L) + .cachedTokens(0L) .build() ) .build() @@ -65,11 +65,11 @@ class CompletionTest { .containsExactly( CompletionChoice.builder() .finishReason(CompletionChoice.FinishReason.STOP) - .index(123L) + .index(0L) .logprobs( CompletionChoice.Logprobs.builder() - .textOffset(listOf(123L)) - .tokenLogprobs(listOf(42.23)) + .textOffset(listOf(0L)) + .tokenLogprobs(listOf(0.0)) .tokens(listOf("string")) .topLogprobs( listOf(CompletionChoice.Logprobs.TopLogprob.builder().build()) @@ -79,28 +79,28 @@ class CompletionTest { .text("text") .build() ) - assertThat(completion.created()).isEqualTo(123L) + assertThat(completion.created()).isEqualTo(0L) assertThat(completion.model()).isEqualTo("model") assertThat(completion.object_()).isEqualTo(Completion.Object.TEXT_COMPLETION) assertThat(completion.systemFingerprint()).contains("system_fingerprint") assertThat(completion.usage()) .contains( CompletionUsage.builder() - .completionTokens(123L) - .promptTokens(123L) - .totalTokens(123L) + .completionTokens(0L) + .promptTokens(0L) + .totalTokens(0L) .completionTokensDetails( CompletionUsage.CompletionTokensDetails.builder() - .acceptedPredictionTokens(123L) - .audioTokens(123L) - .reasoningTokens(123L) - .rejectedPredictionTokens(123L) + .acceptedPredictionTokens(0L) + .audioTokens(0L) + .reasoningTokens(0L) + .rejectedPredictionTokens(0L) .build() ) .promptTokensDetails( CompletionUsage.PromptTokensDetails.builder() - .audioTokens(123L) - .cachedTokens(123L) + .audioTokens(0L) + .cachedTokens(0L) .build() ) .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/models/CompletionUsageTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/CompletionUsageTest.kt index a8a2cc1..2545dbe 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/CompletionUsageTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/CompletionUsageTest.kt @@ -11,42 +11,42 @@ class CompletionUsageTest { fun createCompletionUsage() { val completionUsage = CompletionUsage.builder() - .completionTokens(123L) - .promptTokens(123L) - .totalTokens(123L) + .completionTokens(0L) + .promptTokens(0L) + .totalTokens(0L) .completionTokensDetails( CompletionUsage.CompletionTokensDetails.builder() - .acceptedPredictionTokens(123L) - .audioTokens(123L) - .reasoningTokens(123L) - .rejectedPredictionTokens(123L) + .acceptedPredictionTokens(0L) + .audioTokens(0L) + .reasoningTokens(0L) + .rejectedPredictionTokens(0L) .build() ) .promptTokensDetails( CompletionUsage.PromptTokensDetails.builder() - .audioTokens(123L) - .cachedTokens(123L) + .audioTokens(0L) + .cachedTokens(0L) .build() ) .build() assertThat(completionUsage).isNotNull - assertThat(completionUsage.completionTokens()).isEqualTo(123L) - assertThat(completionUsage.promptTokens()).isEqualTo(123L) - assertThat(completionUsage.totalTokens()).isEqualTo(123L) + assertThat(completionUsage.completionTokens()).isEqualTo(0L) + assertThat(completionUsage.promptTokens()).isEqualTo(0L) + assertThat(completionUsage.totalTokens()).isEqualTo(0L) assertThat(completionUsage.completionTokensDetails()) .contains( CompletionUsage.CompletionTokensDetails.builder() - .acceptedPredictionTokens(123L) - .audioTokens(123L) - .reasoningTokens(123L) - .rejectedPredictionTokens(123L) + .acceptedPredictionTokens(0L) + .audioTokens(0L) + .reasoningTokens(0L) + .rejectedPredictionTokens(0L) .build() ) assertThat(completionUsage.promptTokensDetails()) .contains( CompletionUsage.PromptTokensDetails.builder() - .audioTokens(123L) - .cachedTokens(123L) + .audioTokens(0L) + .cachedTokens(0L) .build() ) } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/CreateEmbeddingResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/CreateEmbeddingResponseTest.kt index 7bf169b..13dcf31 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/CreateEmbeddingResponseTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/CreateEmbeddingResponseTest.kt @@ -14,8 +14,8 @@ class CreateEmbeddingResponseTest { .data( listOf( Embedding.builder() - .embedding(listOf(42.23)) - .index(123L) + .embedding(listOf(0.0)) + .index(0L) .object_(Embedding.Object.EMBEDDING) .build() ) @@ -23,18 +23,15 @@ class CreateEmbeddingResponseTest { .model("model") .object_(CreateEmbeddingResponse.Object.LIST) .usage( - CreateEmbeddingResponse.Usage.builder() - .promptTokens(123L) - .totalTokens(123L) - .build() + CreateEmbeddingResponse.Usage.builder().promptTokens(0L).totalTokens(0L).build() ) .build() assertThat(createEmbeddingResponse).isNotNull assertThat(createEmbeddingResponse.data()) .containsExactly( Embedding.builder() - .embedding(listOf(42.23)) - .index(123L) + .embedding(listOf(0.0)) + .index(0L) .object_(Embedding.Object.EMBEDDING) .build() ) @@ -42,7 +39,7 @@ class CreateEmbeddingResponseTest { assertThat(createEmbeddingResponse.object_()).isEqualTo(CreateEmbeddingResponse.Object.LIST) assertThat(createEmbeddingResponse.usage()) .isEqualTo( - CreateEmbeddingResponse.Usage.builder().promptTokens(123L).totalTokens(123L).build() + CreateEmbeddingResponse.Usage.builder().promptTokens(0L).totalTokens(0L).build() ) } } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/EmbeddingCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/EmbeddingCreateParamsTest.kt index 1ee0d3c..58b0dc9 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/EmbeddingCreateParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/EmbeddingCreateParamsTest.kt @@ -13,7 +13,7 @@ class EmbeddingCreateParamsTest { EmbeddingCreateParams.builder() .input(EmbeddingCreateParams.Input.ofString("This is a test.")) .model(EmbeddingCreateParams.Model.TEXT_EMBEDDING_ADA_002) - .dimensions(123L) + .dimensions(1L) .encodingFormat(EmbeddingCreateParams.EncodingFormat.FLOAT) .user("user-1234") .build() @@ -25,7 +25,7 @@ class EmbeddingCreateParamsTest { EmbeddingCreateParams.builder() .input(EmbeddingCreateParams.Input.ofString("This is a test.")) .model(EmbeddingCreateParams.Model.TEXT_EMBEDDING_ADA_002) - .dimensions(123L) + .dimensions(1L) .encodingFormat(EmbeddingCreateParams.EncodingFormat.FLOAT) .user("user-1234") .build() @@ -33,7 +33,7 @@ class EmbeddingCreateParamsTest { assertThat(body).isNotNull assertThat(body.input()).isEqualTo(EmbeddingCreateParams.Input.ofString("This is a test.")) assertThat(body.model()).isEqualTo(EmbeddingCreateParams.Model.TEXT_EMBEDDING_ADA_002) - assertThat(body.dimensions()).isEqualTo(123L) + assertThat(body.dimensions()).isEqualTo(1L) assertThat(body.encodingFormat()).isEqualTo(EmbeddingCreateParams.EncodingFormat.FLOAT) assertThat(body.user()).isEqualTo("user-1234") } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/EmbeddingTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/EmbeddingTest.kt index 2f58273..44a8bd8 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/EmbeddingTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/EmbeddingTest.kt @@ -11,13 +11,13 @@ class EmbeddingTest { fun createEmbedding() { val embedding = Embedding.builder() - .embedding(listOf(42.23)) - .index(123L) + .embedding(listOf(0.0)) + .index(0L) .object_(Embedding.Object.EMBEDDING) .build() assertThat(embedding).isNotNull - assertThat(embedding.embedding()).containsExactly(42.23) - assertThat(embedding.index()).isEqualTo(123L) + assertThat(embedding.embedding()).containsExactly(0.0) + assertThat(embedding.index()).isEqualTo(0L) assertThat(embedding.object_()).isEqualTo(Embedding.Object.EMBEDDING) } } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/FileListParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/FileListParamsTest.kt index c348921..91e2376 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/FileListParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/FileListParamsTest.kt @@ -13,7 +13,7 @@ class FileListParamsTest { fun createFileListParams() { FileListParams.builder() .after("after") - .limit(123L) + .limit(0L) .order(FileListParams.Order.ASC) .purpose("purpose") .build() @@ -24,13 +24,13 @@ class FileListParamsTest { val params = FileListParams.builder() .after("after") - .limit(123L) + .limit(0L) .order(FileListParams.Order.ASC) .purpose("purpose") .build() val expected = QueryParams.builder() expected.put("after", "after") - expected.put("limit", "123") + expected.put("limit", "0") expected.put("order", FileListParams.Order.ASC.toString()) expected.put("purpose", "purpose") assertThat(params.getQueryParams()).isEqualTo(expected.build()) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/FileObjectTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/FileObjectTest.kt index 451c7f2..3e9a5c8 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/FileObjectTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/FileObjectTest.kt @@ -12,8 +12,8 @@ class FileObjectTest { val fileObject = FileObject.builder() .id("id") - .bytes(123L) - .createdAt(123L) + .bytes(0L) + .createdAt(0L) .filename("filename") .object_(FileObject.Object.FILE) .purpose(FileObject.Purpose.ASSISTANTS) @@ -22,8 +22,8 @@ class FileObjectTest { .build() assertThat(fileObject).isNotNull assertThat(fileObject.id()).isEqualTo("id") - assertThat(fileObject.bytes()).isEqualTo(123L) - assertThat(fileObject.createdAt()).isEqualTo(123L) + assertThat(fileObject.bytes()).isEqualTo(0L) + assertThat(fileObject.createdAt()).isEqualTo(0L) assertThat(fileObject.filename()).isEqualTo("filename") assertThat(fileObject.object_()).isEqualTo(FileObject.Object.FILE) assertThat(fileObject.purpose()).isEqualTo(FileObject.Purpose.ASSISTANTS) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCheckpointListParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCheckpointListParamsTest.kt index 3d1dd8f..be811c9 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCheckpointListParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCheckpointListParamsTest.kt @@ -14,7 +14,7 @@ class FineTuningJobCheckpointListParamsTest { FineTuningJobCheckpointListParams.builder() .fineTuningJobId("ft-AF1WoRqd3aJAHsqc9NY7iL8F") .after("after") - .limit(123L) + .limit(0L) .build() } @@ -24,11 +24,11 @@ class FineTuningJobCheckpointListParamsTest { FineTuningJobCheckpointListParams.builder() .fineTuningJobId("ft-AF1WoRqd3aJAHsqc9NY7iL8F") .after("after") - .limit(123L) + .limit(0L) .build() val expected = QueryParams.builder() expected.put("after", "after") - expected.put("limit", "123") + expected.put("limit", "0") assertThat(params.getQueryParams()).isEqualTo(expected.build()) } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCheckpointTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCheckpointTest.kt index 69d71b1..53f9cd6 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCheckpointTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCheckpointTest.kt @@ -12,43 +12,43 @@ class FineTuningJobCheckpointTest { val fineTuningJobCheckpoint = FineTuningJobCheckpoint.builder() .id("id") - .createdAt(123L) + .createdAt(0L) .fineTunedModelCheckpoint("fine_tuned_model_checkpoint") .fineTuningJobId("fine_tuning_job_id") .metrics( FineTuningJobCheckpoint.Metrics.builder() - .fullValidLoss(42.23) - .fullValidMeanTokenAccuracy(42.23) - .step(42.23) - .trainLoss(42.23) - .trainMeanTokenAccuracy(42.23) - .validLoss(42.23) - .validMeanTokenAccuracy(42.23) + .fullValidLoss(0.0) + .fullValidMeanTokenAccuracy(0.0) + .step(0.0) + .trainLoss(0.0) + .trainMeanTokenAccuracy(0.0) + .validLoss(0.0) + .validMeanTokenAccuracy(0.0) .build() ) .object_(FineTuningJobCheckpoint.Object.FINE_TUNING_JOB_CHECKPOINT) - .stepNumber(123L) + .stepNumber(0L) .build() assertThat(fineTuningJobCheckpoint).isNotNull assertThat(fineTuningJobCheckpoint.id()).isEqualTo("id") - assertThat(fineTuningJobCheckpoint.createdAt()).isEqualTo(123L) + assertThat(fineTuningJobCheckpoint.createdAt()).isEqualTo(0L) assertThat(fineTuningJobCheckpoint.fineTunedModelCheckpoint()) .isEqualTo("fine_tuned_model_checkpoint") assertThat(fineTuningJobCheckpoint.fineTuningJobId()).isEqualTo("fine_tuning_job_id") assertThat(fineTuningJobCheckpoint.metrics()) .isEqualTo( FineTuningJobCheckpoint.Metrics.builder() - .fullValidLoss(42.23) - .fullValidMeanTokenAccuracy(42.23) - .step(42.23) - .trainLoss(42.23) - .trainMeanTokenAccuracy(42.23) - .validLoss(42.23) - .validMeanTokenAccuracy(42.23) + .fullValidLoss(0.0) + .fullValidMeanTokenAccuracy(0.0) + .step(0.0) + .trainLoss(0.0) + .trainMeanTokenAccuracy(0.0) + .validLoss(0.0) + .validMeanTokenAccuracy(0.0) .build() ) assertThat(fineTuningJobCheckpoint.object_()) .isEqualTo(FineTuningJobCheckpoint.Object.FINE_TUNING_JOB_CHECKPOINT) - assertThat(fineTuningJobCheckpoint.stepNumber()).isEqualTo(123L) + assertThat(fineTuningJobCheckpoint.stepNumber()).isEqualTo(0L) } } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCreateParamsTest.kt index 29b0b44..655e2b6 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCreateParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobCreateParamsTest.kt @@ -49,7 +49,7 @@ class FineTuningJobCreateParamsTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -98,7 +98,7 @@ class FineTuningJobCreateParamsTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -144,7 +144,7 @@ class FineTuningJobCreateParamsTest { .build() ) ) - assertThat(body.seed()).isEqualTo(123L) + assertThat(body.seed()).isEqualTo(42L) assertThat(body.suffix()).isEqualTo("x") assertThat(body.validationFile()).isEqualTo("file-abc123") } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobEventTest.kt index f5e78a7..c006734 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobEventTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobEventTest.kt @@ -12,14 +12,14 @@ class FineTuningJobEventTest { val fineTuningJobEvent = FineTuningJobEvent.builder() .id("id") - .createdAt(123L) + .createdAt(0L) .level(FineTuningJobEvent.Level.INFO) .message("message") .object_(FineTuningJobEvent.Object.FINE_TUNING_JOB_EVENT) .build() assertThat(fineTuningJobEvent).isNotNull assertThat(fineTuningJobEvent.id()).isEqualTo("id") - assertThat(fineTuningJobEvent.createdAt()).isEqualTo(123L) + assertThat(fineTuningJobEvent.createdAt()).isEqualTo(0L) assertThat(fineTuningJobEvent.level()).isEqualTo(FineTuningJobEvent.Level.INFO) assertThat(fineTuningJobEvent.message()).isEqualTo("message") assertThat(fineTuningJobEvent.object_()) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobListEventsParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobListEventsParamsTest.kt index 1af6532..a74751f 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobListEventsParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobListEventsParamsTest.kt @@ -14,7 +14,7 @@ class FineTuningJobListEventsParamsTest { FineTuningJobListEventsParams.builder() .fineTuningJobId("ft-AF1WoRqd3aJAHsqc9NY7iL8F") .after("after") - .limit(123L) + .limit(0L) .build() } @@ -24,11 +24,11 @@ class FineTuningJobListEventsParamsTest { FineTuningJobListEventsParams.builder() .fineTuningJobId("ft-AF1WoRqd3aJAHsqc9NY7iL8F") .after("after") - .limit(123L) + .limit(0L) .build() val expected = QueryParams.builder() expected.put("after", "after") - expected.put("limit", "123") + expected.put("limit", "0") assertThat(params.getQueryParams()).isEqualTo(expected.build()) } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobListParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobListParamsTest.kt index aa13c3e..781e602 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobListParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobListParamsTest.kt @@ -11,15 +11,15 @@ class FineTuningJobListParamsTest { @Test fun createFineTuningJobListParams() { - FineTuningJobListParams.builder().after("after").limit(123L).build() + FineTuningJobListParams.builder().after("after").limit(0L).build() } @Test fun getQueryParams() { - val params = FineTuningJobListParams.builder().after("after").limit(123L).build() + val params = FineTuningJobListParams.builder().after("after").limit(0L).build() val expected = QueryParams.builder() expected.put("after", "after") - expected.put("limit", "123") + expected.put("limit", "0") assertThat(params.getQueryParams()).isEqualTo(expected.build()) } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobTest.kt index 4b9ee3e..05c9a3d 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/FineTuningJobTest.kt @@ -12,7 +12,7 @@ class FineTuningJobTest { val fineTuningJob = FineTuningJob.builder() .id("id") - .createdAt(123L) + .createdAt(0L) .error( FineTuningJob.Error.builder() .code("code") @@ -21,7 +21,7 @@ class FineTuningJobTest { .build() ) .fineTunedModel("fine_tuned_model") - .finishedAt(123L) + .finishedAt(0L) .hyperparameters( FineTuningJob.Hyperparameters.builder() .nEpochs( @@ -35,12 +35,12 @@ class FineTuningJobTest { .object_(FineTuningJob.Object.FINE_TUNING_JOB) .organizationId("organization_id") .resultFiles(listOf("file-abc123")) - .seed(123L) + .seed(0L) .status(FineTuningJob.Status.VALIDATING_FILES) - .trainedTokens(123L) + .trainedTokens(0L) .trainingFile("training_file") .validationFile("validation_file") - .estimatedFinish(123L) + .estimatedFinish(0L) .integrations( listOf( FineTuningJobWandbIntegrationObject.builder() @@ -59,13 +59,13 @@ class FineTuningJobTest { .build() assertThat(fineTuningJob).isNotNull assertThat(fineTuningJob.id()).isEqualTo("id") - assertThat(fineTuningJob.createdAt()).isEqualTo(123L) + assertThat(fineTuningJob.createdAt()).isEqualTo(0L) assertThat(fineTuningJob.error()) .contains( FineTuningJob.Error.builder().code("code").message("message").param("param").build() ) assertThat(fineTuningJob.fineTunedModel()).contains("fine_tuned_model") - assertThat(fineTuningJob.finishedAt()).contains(123L) + assertThat(fineTuningJob.finishedAt()).contains(0L) assertThat(fineTuningJob.hyperparameters()) .isEqualTo( FineTuningJob.Hyperparameters.builder() @@ -80,12 +80,12 @@ class FineTuningJobTest { assertThat(fineTuningJob.object_()).isEqualTo(FineTuningJob.Object.FINE_TUNING_JOB) assertThat(fineTuningJob.organizationId()).isEqualTo("organization_id") assertThat(fineTuningJob.resultFiles()).containsExactly("file-abc123") - assertThat(fineTuningJob.seed()).isEqualTo(123L) + assertThat(fineTuningJob.seed()).isEqualTo(0L) assertThat(fineTuningJob.status()).isEqualTo(FineTuningJob.Status.VALIDATING_FILES) - assertThat(fineTuningJob.trainedTokens()).contains(123L) + assertThat(fineTuningJob.trainedTokens()).contains(0L) assertThat(fineTuningJob.trainingFile()).isEqualTo("training_file") assertThat(fineTuningJob.validationFile()).contains("validation_file") - assertThat(fineTuningJob.estimatedFinish()).contains(123L) + assertThat(fineTuningJob.estimatedFinish()).contains(0L) assertThat(fineTuningJob.integrations().get()) .containsExactly( FineTuningJobWandbIntegrationObject.builder() diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ImageGenerateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ImageGenerateParamsTest.kt index c727ab1..17324fb 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ImageGenerateParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ImageGenerateParamsTest.kt @@ -13,7 +13,7 @@ class ImageGenerateParamsTest { ImageGenerateParams.builder() .prompt("A cute baby sea otter") .model(ImageGenerateParams.Model.DALL_E_2) - .n(10L) + .n(1L) .quality(ImageGenerateParams.Quality.STANDARD) .responseFormat(ImageGenerateParams.ResponseFormat.URL) .size(ImageGenerateParams.Size._256X256) @@ -28,7 +28,7 @@ class ImageGenerateParamsTest { ImageGenerateParams.builder() .prompt("A cute baby sea otter") .model(ImageGenerateParams.Model.DALL_E_2) - .n(10L) + .n(1L) .quality(ImageGenerateParams.Quality.STANDARD) .responseFormat(ImageGenerateParams.ResponseFormat.URL) .size(ImageGenerateParams.Size._256X256) @@ -39,7 +39,7 @@ class ImageGenerateParamsTest { assertThat(body).isNotNull assertThat(body.prompt()).isEqualTo("A cute baby sea otter") assertThat(body.model()).isEqualTo(ImageGenerateParams.Model.DALL_E_2) - assertThat(body.n()).isEqualTo(10L) + assertThat(body.n()).isEqualTo(1L) assertThat(body.quality()).isEqualTo(ImageGenerateParams.Quality.STANDARD) assertThat(body.responseFormat()).isEqualTo(ImageGenerateParams.ResponseFormat.URL) assertThat(body.size()).isEqualTo(ImageGenerateParams.Size._256X256) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ImagesResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ImagesResponseTest.kt index 6441e36..4297e64 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ImagesResponseTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ImagesResponseTest.kt @@ -11,7 +11,7 @@ class ImagesResponseTest { fun createImagesResponse() { val imagesResponse = ImagesResponse.builder() - .created(123L) + .created(0L) .data( listOf( Image.builder() @@ -23,7 +23,7 @@ class ImagesResponseTest { ) .build() assertThat(imagesResponse).isNotNull - assertThat(imagesResponse.created()).isEqualTo(123L) + assertThat(imagesResponse.created()).isEqualTo(0L) assertThat(imagesResponse.data()) .containsExactly( Image.builder() diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ModelTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ModelTest.kt index 40627ae..bd10b74 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ModelTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ModelTest.kt @@ -12,13 +12,13 @@ class ModelTest { val model = Model.builder() .id("id") - .created(123L) + .created(0L) .object_(Model.Object.MODEL) .ownedBy("owned_by") .build() assertThat(model).isNotNull assertThat(model.id()).isEqualTo("id") - assertThat(model.created()).isEqualTo(123L) + assertThat(model.created()).isEqualTo(0L) assertThat(model.object_()).isEqualTo(Model.Object.MODEL) assertThat(model.ownedBy()).isEqualTo("owned_by") } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ModerationCreateResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ModerationCreateResponseTest.kt index 9b42c5c..f4f5a38 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ModerationCreateResponseTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ModerationCreateResponseTest.kt @@ -95,19 +95,19 @@ class ModerationCreateResponseTest { ) .categoryScores( Moderation.CategoryScores.builder() - .harassment(42.23) - .harassmentThreatening(42.23) - .hate(42.23) - .hateThreatening(42.23) - .illicit(42.23) - .illicitViolent(42.23) - .selfHarm(42.23) - .selfHarmInstructions(42.23) - .selfHarmIntent(42.23) - .sexual(42.23) - .sexualMinors(42.23) - .violence(42.23) - .violenceGraphic(42.23) + .harassment(0.0) + .harassmentThreatening(0.0) + .hate(0.0) + .hateThreatening(0.0) + .illicit(0.0) + .illicitViolent(0.0) + .selfHarm(0.0) + .selfHarmInstructions(0.0) + .selfHarmIntent(0.0) + .sexual(0.0) + .sexualMinors(0.0) + .violence(0.0) + .violenceGraphic(0.0) .build() ) .flagged(true) @@ -177,19 +177,19 @@ class ModerationCreateResponseTest { ) .categoryScores( Moderation.CategoryScores.builder() - .harassment(42.23) - .harassmentThreatening(42.23) - .hate(42.23) - .hateThreatening(42.23) - .illicit(42.23) - .illicitViolent(42.23) - .selfHarm(42.23) - .selfHarmInstructions(42.23) - .selfHarmIntent(42.23) - .sexual(42.23) - .sexualMinors(42.23) - .violence(42.23) - .violenceGraphic(42.23) + .harassment(0.0) + .harassmentThreatening(0.0) + .hate(0.0) + .hateThreatening(0.0) + .illicit(0.0) + .illicitViolent(0.0) + .selfHarm(0.0) + .selfHarmInstructions(0.0) + .selfHarmIntent(0.0) + .sexual(0.0) + .sexualMinors(0.0) + .violence(0.0) + .violenceGraphic(0.0) .build() ) .flagged(true) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/ModerationTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/ModerationTest.kt index 69bfbc9..00f9591 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/ModerationTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/ModerationTest.kt @@ -59,19 +59,19 @@ class ModerationTest { ) .categoryScores( Moderation.CategoryScores.builder() - .harassment(42.23) - .harassmentThreatening(42.23) - .hate(42.23) - .hateThreatening(42.23) - .illicit(42.23) - .illicitViolent(42.23) - .selfHarm(42.23) - .selfHarmInstructions(42.23) - .selfHarmIntent(42.23) - .sexual(42.23) - .sexualMinors(42.23) - .violence(42.23) - .violenceGraphic(42.23) + .harassment(0.0) + .harassmentThreatening(0.0) + .hate(0.0) + .hateThreatening(0.0) + .illicit(0.0) + .illicitViolent(0.0) + .selfHarm(0.0) + .selfHarmInstructions(0.0) + .selfHarmIntent(0.0) + .sexual(0.0) + .sexualMinors(0.0) + .violence(0.0) + .violenceGraphic(0.0) .build() ) .flagged(true) @@ -128,19 +128,19 @@ class ModerationTest { assertThat(moderation.categoryScores()) .isEqualTo( Moderation.CategoryScores.builder() - .harassment(42.23) - .harassmentThreatening(42.23) - .hate(42.23) - .hateThreatening(42.23) - .illicit(42.23) - .illicitViolent(42.23) - .selfHarm(42.23) - .selfHarmInstructions(42.23) - .selfHarmIntent(42.23) - .sexual(42.23) - .sexualMinors(42.23) - .violence(42.23) - .violenceGraphic(42.23) + .harassment(0.0) + .harassmentThreatening(0.0) + .hate(0.0) + .hateThreatening(0.0) + .illicit(0.0) + .illicitViolent(0.0) + .selfHarm(0.0) + .selfHarmInstructions(0.0) + .selfHarmIntent(0.0) + .sexual(0.0) + .sexualMinors(0.0) + .violence(0.0) + .violenceGraphic(0.0) .build() ) assertThat(moderation.flagged()).isEqualTo(true) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/UploadCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/UploadCreateParamsTest.kt index 377f53d..6498a3c 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/UploadCreateParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/UploadCreateParamsTest.kt @@ -11,7 +11,7 @@ class UploadCreateParamsTest { @Test fun createUploadCreateParams() { UploadCreateParams.builder() - .bytes(123L) + .bytes(0L) .filename("filename") .mimeType("mime_type") .purpose(FilePurpose.ASSISTANTS) @@ -22,14 +22,14 @@ class UploadCreateParamsTest { fun getBody() { val params = UploadCreateParams.builder() - .bytes(123L) + .bytes(0L) .filename("filename") .mimeType("mime_type") .purpose(FilePurpose.ASSISTANTS) .build() val body = params.getBody() assertThat(body).isNotNull - assertThat(body.bytes()).isEqualTo(123L) + assertThat(body.bytes()).isEqualTo(0L) assertThat(body.filename()).isEqualTo("filename") assertThat(body.mimeType()).isEqualTo("mime_type") assertThat(body.purpose()).isEqualTo(FilePurpose.ASSISTANTS) @@ -39,14 +39,14 @@ class UploadCreateParamsTest { fun getBodyWithoutOptionalFields() { val params = UploadCreateParams.builder() - .bytes(123L) + .bytes(0L) .filename("filename") .mimeType("mime_type") .purpose(FilePurpose.ASSISTANTS) .build() val body = params.getBody() assertThat(body).isNotNull - assertThat(body.bytes()).isEqualTo(123L) + assertThat(body.bytes()).isEqualTo(0L) assertThat(body.filename()).isEqualTo("filename") assertThat(body.mimeType()).isEqualTo("mime_type") assertThat(body.purpose()).isEqualTo(FilePurpose.ASSISTANTS) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/UploadPartTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/UploadPartTest.kt index 8b1fce5..22557cb 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/UploadPartTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/UploadPartTest.kt @@ -12,13 +12,13 @@ class UploadPartTest { val uploadPart = UploadPart.builder() .id("id") - .createdAt(123L) + .createdAt(0L) .object_(UploadPart.Object.UPLOAD_PART) .uploadId("upload_id") .build() assertThat(uploadPart).isNotNull assertThat(uploadPart.id()).isEqualTo("id") - assertThat(uploadPart.createdAt()).isEqualTo(123L) + assertThat(uploadPart.createdAt()).isEqualTo(0L) assertThat(uploadPart.object_()).isEqualTo(UploadPart.Object.UPLOAD_PART) assertThat(uploadPart.uploadId()).isEqualTo("upload_id") } diff --git a/openai-java-core/src/test/kotlin/com/openai/models/UploadTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/UploadTest.kt index 256095d..5b70c09 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/UploadTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/UploadTest.kt @@ -12,9 +12,9 @@ class UploadTest { val upload = Upload.builder() .id("id") - .bytes(123L) - .createdAt(123L) - .expiresAt(123L) + .bytes(0L) + .createdAt(0L) + .expiresAt(0L) .filename("filename") .object_(Upload.Object.UPLOAD) .purpose("purpose") @@ -22,8 +22,8 @@ class UploadTest { .file( FileObject.builder() .id("id") - .bytes(123L) - .createdAt(123L) + .bytes(0L) + .createdAt(0L) .filename("filename") .object_(FileObject.Object.FILE) .purpose(FileObject.Purpose.ASSISTANTS) @@ -34,9 +34,9 @@ class UploadTest { .build() assertThat(upload).isNotNull assertThat(upload.id()).isEqualTo("id") - assertThat(upload.bytes()).isEqualTo(123L) - assertThat(upload.createdAt()).isEqualTo(123L) - assertThat(upload.expiresAt()).isEqualTo(123L) + assertThat(upload.bytes()).isEqualTo(0L) + assertThat(upload.createdAt()).isEqualTo(0L) + assertThat(upload.expiresAt()).isEqualTo(0L) assertThat(upload.filename()).isEqualTo("filename") assertThat(upload.object_()).isEqualTo(Upload.Object.UPLOAD) assertThat(upload.purpose()).isEqualTo("purpose") @@ -45,8 +45,8 @@ class UploadTest { .contains( FileObject.builder() .id("id") - .bytes(123L) - .createdAt(123L) + .bytes(0L) + .createdAt(0L) .filename("filename") .object_(FileObject.Object.FILE) .purpose(FileObject.Purpose.ASSISTANTS) diff --git a/openai-java-core/src/test/kotlin/com/openai/services/ErrorHandlingTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/ErrorHandlingTest.kt index 17dc53f..545d7d1 100644 --- a/openai-java-core/src/test/kotlin/com/openai/services/ErrorHandlingTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/services/ErrorHandlingTest.kt @@ -98,7 +98,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -106,7 +106,7 @@ class ErrorHandlingTest { val expected = FineTuningJob.builder() .id("id") - .createdAt(123L) + .createdAt(0L) .error( FineTuningJob.Error.builder() .code("code") @@ -115,7 +115,7 @@ class ErrorHandlingTest { .build() ) .fineTunedModel("fine_tuned_model") - .finishedAt(123L) + .finishedAt(0L) .hyperparameters( FineTuningJob.Hyperparameters.builder() .nEpochs( @@ -129,12 +129,12 @@ class ErrorHandlingTest { .object_(FineTuningJob.Object.FINE_TUNING_JOB) .organizationId("organization_id") .resultFiles(listOf("file-abc123")) - .seed(123L) + .seed(0L) .status(FineTuningJob.Status.VALIDATING_FILES) - .trainedTokens(123L) + .trainedTokens(0L) .trainingFile("training_file") .validationFile("validation_file") - .estimatedFinish(123L) + .estimatedFinish(0L) .integrations( listOf( FineTuningJobWandbIntegrationObject.builder() @@ -200,7 +200,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -259,7 +259,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -318,7 +318,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -377,7 +377,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -436,7 +436,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -499,7 +499,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -558,7 +558,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -617,7 +617,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -681,7 +681,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() @@ -739,7 +739,7 @@ class ErrorHandlingTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/services/ServiceParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/ServiceParamsTest.kt index 5f2971c..9e6a20c 100644 --- a/openai-java-core/src/test/kotlin/com/openai/services/ServiceParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/services/ServiceParamsTest.kt @@ -78,7 +78,7 @@ class ServiceParamsTest { .voice(ChatCompletionAudioParam.Voice.ALLOY) .build() ) - .frequencyPenalty(2.0) + .frequencyPenalty(-2.0) .functionCall( ChatCompletionCreateParams.FunctionCall.ofBehavior( ChatCompletionCreateParams.FunctionCall.Behavior.NONE @@ -95,11 +95,11 @@ class ServiceParamsTest { ) .logitBias(ChatCompletionCreateParams.LogitBias.builder().build()) .logprobs(true) - .maxCompletionTokens(123L) - .maxTokens(123L) + .maxCompletionTokens(0L) + .maxTokens(0L) .metadata(ChatCompletionCreateParams.Metadata.builder().build()) .modalities(listOf(ChatCompletionModality.TEXT)) - .n(123L) + .n(1L) .parallelToolCalls(true) .prediction( ChatCompletionPredictionContent.builder() @@ -107,18 +107,18 @@ class ServiceParamsTest { .type(ChatCompletionPredictionContent.Type.CONTENT) .build() ) - .presencePenalty(2.0) + .presencePenalty(-2.0) .responseFormat( ChatCompletionCreateParams.ResponseFormat.ofResponseFormatText( ResponseFormatText.builder().type(ResponseFormatText.Type.TEXT).build() ) ) - .seed(123L) + .seed(-9007199254740991L) .serviceTier(ChatCompletionCreateParams.ServiceTier.AUTO) .stop(ChatCompletionCreateParams.Stop.ofString("string")) .store(true) .streamOptions(ChatCompletionStreamOptions.builder().includeUsage(true).build()) - .temperature(2.0) + .temperature(1.0) .toolChoice( ChatCompletionToolChoiceOption.ofBehavior( ChatCompletionToolChoiceOption.Behavior.NONE @@ -139,7 +139,7 @@ class ServiceParamsTest { .build() ) ) - .topLogprobs(20L) + .topLogprobs(0L) .topP(1.0) .user("user-1234") .additionalHeaders(additionalHeaders) @@ -154,22 +154,22 @@ class ServiceParamsTest { listOf( ChatCompletion.Choice.builder() .finishReason(ChatCompletion.Choice.FinishReason.STOP) - .index(123L) + .index(0L) .logprobs( ChatCompletion.Choice.Logprobs.builder() .content( listOf( ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob .builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) @@ -180,15 +180,15 @@ class ServiceParamsTest { listOf( ChatCompletionTokenLogprob.builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .topLogprobs( listOf( ChatCompletionTokenLogprob.TopLogprob .builder() .token("token") - .bytes(listOf(123L)) - .logprob(42.23) + .bytes(listOf(0L)) + .logprob(0.0) .build() ) ) @@ -206,7 +206,7 @@ class ServiceParamsTest { ChatCompletionAudio.builder() .id("id") .data("data") - .expiresAt(123L) + .expiresAt(0L) .transcript("transcript") .build() ) @@ -235,28 +235,28 @@ class ServiceParamsTest { .build() ) ) - .created(123L) + .created(0L) .model("model") .object_(ChatCompletion.Object.CHAT_COMPLETION) .serviceTier(ChatCompletion.ServiceTier.SCALE) .systemFingerprint("system_fingerprint") .usage( CompletionUsage.builder() - .completionTokens(123L) - .promptTokens(123L) - .totalTokens(123L) + .completionTokens(0L) + .promptTokens(0L) + .totalTokens(0L) .completionTokensDetails( CompletionUsage.CompletionTokensDetails.builder() - .acceptedPredictionTokens(123L) - .audioTokens(123L) - .reasoningTokens(123L) - .rejectedPredictionTokens(123L) + .acceptedPredictionTokens(0L) + .audioTokens(0L) + .reasoningTokens(0L) + .rejectedPredictionTokens(0L) .build() ) .promptTokensDetails( CompletionUsage.PromptTokensDetails.builder() - .audioTokens(123L) - .cachedTokens(123L) + .audioTokens(0L) + .cachedTokens(0L) .build() ) .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/CompletionServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/CompletionServiceTest.kt index 9d3fff6..1983d85 100644 --- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/CompletionServiceTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/CompletionServiceTest.kt @@ -24,19 +24,19 @@ class CompletionServiceTest { CompletionCreateParams.builder() .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT) .prompt(CompletionCreateParams.Prompt.ofString("This is a test.")) - .bestOf(20L) + .bestOf(0L) .echo(true) - .frequencyPenalty(2.0) + .frequencyPenalty(-2.0) .logitBias(CompletionCreateParams.LogitBias.builder().build()) - .logprobs(5L) - .maxTokens(123L) - .n(123L) - .presencePenalty(2.0) - .seed(123L) + .logprobs(0L) + .maxTokens(16L) + .n(1L) + .presencePenalty(-2.0) + .seed(-9007199254740991L) .stop(CompletionCreateParams.Stop.ofString("\n")) .streamOptions(ChatCompletionStreamOptions.builder().includeUsage(true).build()) .suffix("test.") - .temperature(2.0) + .temperature(1.0) .topP(1.0) .user("user-1234") .build() @@ -59,19 +59,19 @@ class CompletionServiceTest { CompletionCreateParams.builder() .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT) .prompt(CompletionCreateParams.Prompt.ofString("This is a test.")) - .bestOf(20L) + .bestOf(0L) .echo(true) - .frequencyPenalty(2.0) + .frequencyPenalty(-2.0) .logitBias(CompletionCreateParams.LogitBias.builder().build()) - .logprobs(5L) - .maxTokens(123L) - .n(123L) - .presencePenalty(2.0) - .seed(123L) + .logprobs(0L) + .maxTokens(16L) + .n(1L) + .presencePenalty(-2.0) + .seed(-9007199254740991L) .stop(CompletionCreateParams.Stop.ofString("\n")) .streamOptions(ChatCompletionStreamOptions.builder().includeUsage(true).build()) .suffix("test.") - .temperature(2.0) + .temperature(1.0) .topP(1.0) .user("user-1234") .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/EmbeddingServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/EmbeddingServiceTest.kt index f4393e0..7408aea 100644 --- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/EmbeddingServiceTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/EmbeddingServiceTest.kt @@ -24,7 +24,7 @@ class EmbeddingServiceTest { EmbeddingCreateParams.builder() .input(EmbeddingCreateParams.Input.ofString("This is a test.")) .model(EmbeddingCreateParams.Model.TEXT_EMBEDDING_ADA_002) - .dimensions(123L) + .dimensions(1L) .encodingFormat(EmbeddingCreateParams.EncodingFormat.FLOAT) .user("user-1234") .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/ImageServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/ImageServiceTest.kt index b9f86d0..0429607 100644 --- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/ImageServiceTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/ImageServiceTest.kt @@ -24,7 +24,7 @@ class ImageServiceTest { ImageGenerateParams.builder() .prompt("A cute baby sea otter") .model(ImageGenerateParams.Model.DALL_E_2) - .n(10L) + .n(1L) .quality(ImageGenerateParams.Quality.STANDARD) .responseFormat(ImageGenerateParams.ResponseFormat.URL) .size(ImageGenerateParams.Size._256X256) diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/UploadServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/UploadServiceTest.kt index b3fe80e..a1c5724 100644 --- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/UploadServiceTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/UploadServiceTest.kt @@ -22,7 +22,7 @@ class UploadServiceTest { val upload = uploadService.create( UploadCreateParams.builder() - .bytes(123L) + .bytes(0L) .filename("filename") .mimeType("mime_type") .purpose(FilePurpose.ASSISTANTS) diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/chat/CompletionServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/chat/CompletionServiceTest.kt index 91e2c06..c72708d 100644 --- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/chat/CompletionServiceTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/chat/CompletionServiceTest.kt @@ -44,7 +44,7 @@ class CompletionServiceTest { .voice(ChatCompletionAudioParam.Voice.ALLOY) .build() ) - .frequencyPenalty(2.0) + .frequencyPenalty(-2.0) .functionCall( ChatCompletionCreateParams.FunctionCall.ofBehavior( ChatCompletionCreateParams.FunctionCall.Behavior.NONE @@ -61,11 +61,11 @@ class CompletionServiceTest { ) .logitBias(ChatCompletionCreateParams.LogitBias.builder().build()) .logprobs(true) - .maxCompletionTokens(123L) - .maxTokens(123L) + .maxCompletionTokens(0L) + .maxTokens(0L) .metadata(ChatCompletionCreateParams.Metadata.builder().build()) .modalities(listOf(ChatCompletionModality.TEXT)) - .n(123L) + .n(1L) .parallelToolCalls(true) .prediction( ChatCompletionPredictionContent.builder() @@ -75,18 +75,18 @@ class CompletionServiceTest { .type(ChatCompletionPredictionContent.Type.CONTENT) .build() ) - .presencePenalty(2.0) + .presencePenalty(-2.0) .responseFormat( ChatCompletionCreateParams.ResponseFormat.ofResponseFormatText( ResponseFormatText.builder().type(ResponseFormatText.Type.TEXT).build() ) ) - .seed(123L) + .seed(-9007199254740991L) .serviceTier(ChatCompletionCreateParams.ServiceTier.AUTO) .stop(ChatCompletionCreateParams.Stop.ofString("string")) .store(true) .streamOptions(ChatCompletionStreamOptions.builder().includeUsage(true).build()) - .temperature(2.0) + .temperature(1.0) .toolChoice( ChatCompletionToolChoiceOption.ofBehavior( ChatCompletionToolChoiceOption.Behavior.NONE @@ -107,7 +107,7 @@ class CompletionServiceTest { .build() ) ) - .topLogprobs(20L) + .topLogprobs(0L) .topP(1.0) .user("user-1234") .build() @@ -150,7 +150,7 @@ class CompletionServiceTest { .voice(ChatCompletionAudioParam.Voice.ALLOY) .build() ) - .frequencyPenalty(2.0) + .frequencyPenalty(-2.0) .functionCall( ChatCompletionCreateParams.FunctionCall.ofBehavior( ChatCompletionCreateParams.FunctionCall.Behavior.NONE @@ -167,11 +167,11 @@ class CompletionServiceTest { ) .logitBias(ChatCompletionCreateParams.LogitBias.builder().build()) .logprobs(true) - .maxCompletionTokens(123L) - .maxTokens(123L) + .maxCompletionTokens(0L) + .maxTokens(0L) .metadata(ChatCompletionCreateParams.Metadata.builder().build()) .modalities(listOf(ChatCompletionModality.TEXT)) - .n(123L) + .n(1L) .parallelToolCalls(true) .prediction( ChatCompletionPredictionContent.builder() @@ -181,18 +181,18 @@ class CompletionServiceTest { .type(ChatCompletionPredictionContent.Type.CONTENT) .build() ) - .presencePenalty(2.0) + .presencePenalty(-2.0) .responseFormat( ChatCompletionCreateParams.ResponseFormat.ofResponseFormatText( ResponseFormatText.builder().type(ResponseFormatText.Type.TEXT).build() ) ) - .seed(123L) + .seed(-9007199254740991L) .serviceTier(ChatCompletionCreateParams.ServiceTier.AUTO) .stop(ChatCompletionCreateParams.Stop.ofString("string")) .store(true) .streamOptions(ChatCompletionStreamOptions.builder().includeUsage(true).build()) - .temperature(2.0) + .temperature(1.0) .toolChoice( ChatCompletionToolChoiceOption.ofBehavior( ChatCompletionToolChoiceOption.Behavior.NONE @@ -213,7 +213,7 @@ class CompletionServiceTest { .build() ) ) - .topLogprobs(20L) + .topLogprobs(0L) .topP(1.0) .user("user-1234") .build() diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/fineTuning/JobServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/fineTuning/JobServiceTest.kt index 60649a3..ceffa47 100644 --- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/fineTuning/JobServiceTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/fineTuning/JobServiceTest.kt @@ -65,7 +65,7 @@ class JobServiceTest { .build() ) ) - .seed(123L) + .seed(42L) .suffix("x") .validationFile("file-abc123") .build()