Skip to content

Commit

Permalink
test(api): Add AnthropicTest case for new data classes
Browse files Browse the repository at this point in the history
 - refactor move class out

New data classes ContentMessage and Usage added in the anthropic module require test coverage. Add AnthropicTest cases to cover these data classes.
  • Loading branch information
hanrw committed Jun 4, 2024
1 parent 54a17b2 commit 1b36506
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.tddworks.anthropic.api.messages.api

import kotlinx.serialization.Serializable

@Serializable
data class ContentMessage(val text: String, val type: String)
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,4 @@ data class CreateMessageResponse(
)
)
}
}


@Serializable
data class ContentMessage(val text: String, val type: String)

@Serializable
data class Usage(
@SerialName("input_tokens")
val inputTokens: Int? = null,
@SerialName("output_tokens")
val outputTokens: Int? = null,
)


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.tddworks.anthropic.api.messages.api

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class Usage(
@SerialName("input_tokens")
val inputTokens: Int? = null,
@SerialName("output_tokens")
val outputTokens: Int? = null,
)

0 comments on commit 1b36506

Please sign in to comment.