Add default value for maxTokens
This commit is contained in:
parent
9d46ca2526
commit
7ac74f73bd
1 changed files with 6 additions and 1 deletions
|
@ -47,11 +47,16 @@ class Gemini2Test : LocalProperties() {
|
||||||
@DisplayName("Chat Tests")
|
@DisplayName("Chat Tests")
|
||||||
inner class ChatTests {
|
inner class ChatTests {
|
||||||
private val apiKey = getProperty(Gemini2.GEMINI_API_KEY)
|
private val apiKey = getProperty(Gemini2.GEMINI_API_KEY)
|
||||||
private val maxTokens = getProperty(Gemini2.MAX_TOKENS_PROP).toInt()
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@DisableOnCi
|
@DisableOnCi
|
||||||
fun chatHttpRequestInJavascript() {
|
fun chatHttpRequestInJavascript() {
|
||||||
|
val maxTokens = try {
|
||||||
|
getProperty(Gemini2.MAX_TOKENS_PROP).toInt()
|
||||||
|
} catch (_: NumberFormatException) {
|
||||||
|
1024
|
||||||
|
}
|
||||||
|
|
||||||
assertThat(
|
assertThat(
|
||||||
Gemini2.chat(
|
Gemini2.chat(
|
||||||
"javascript function to make a request with XMLHttpRequest, just code",
|
"javascript function to make a request with XMLHttpRequest, just code",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue