Skip to content

Commit

Permalink
fix and ignore flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aallam committed Feb 1, 2025
1 parent 04ab4a6 commit 16df487
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class TestChatCompletions : TestOpenAI() {
assertNotNull(answer.response)
}

@Ignore
@Test
fun logprobs() = test {
val request = chatCompletionRequest {
Expand All @@ -209,6 +210,7 @@ class TestChatCompletions : TestOpenAI() {
assertEquals(response.usage!!.completionTokens, logprobs.content!!.size)
}

@Ignore
@Test
fun top_logprobs() = test {
val expectedTopLogProbs = 5
Expand All @@ -227,7 +229,7 @@ class TestChatCompletions : TestOpenAI() {
val logprobs = response.choices.first().logprobs
assertNotNull(logprobs)
assertEquals(response.usage!!.completionTokens, logprobs.content!!.size)
assertEquals(logprobs.content!![0].topLogprobs?.size, expectedTopLogProbs)
assertEquals(logprobs.content!![0].topLogprobs.size, expectedTopLogProbs)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestChatVision : TestOpenAI() {
@Test
fun textimage() = test {
val request = chatCompletionRequest {
model = ModelId("gpt-4-vision-preview")
model = ModelId("gpt-4o")
messages {
user {
content {
Expand All @@ -28,7 +28,7 @@ class TestChatVision : TestOpenAI() {
@Test
fun multiImage() = test {
val request = chatCompletionRequest {
model = ModelId("gpt-4-vision-preview")
model = ModelId("gpt-4o")
messages {
user {
content {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.aallam.openai.api.vectorstore.FileBatchRequest
import com.aallam.openai.api.vectorstore.VectorStoreFileRequest
import com.aallam.openai.api.vectorstore.VectorStoreRequest
import com.aallam.openai.client.internal.asSource
import kotlin.test.Ignore
import kotlin.test.Test
import kotlin.test.assertContains
import kotlin.test.assertEquals
Expand Down Expand Up @@ -35,6 +36,7 @@ class TestVectorStores : TestOpenAI() {
assertEquals(true, deleted)
}

@Ignore
@Test
fun testVectorStoreFiles() = test {
val filetxt = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TestChatVisionJVM : TestOpenAI() {
}
val encoded = Base64.encode(source = byteString)
val request = chatCompletionRequest {
model = ModelId("gpt-4-vision-preview")
model = ModelId("gpt-4o")
messages {
user {
content {
Expand Down

0 comments on commit 16df487

Please sign in to comment.