Skip to content

Commit

Permalink
fix dependant if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
David Motsonashvili committed Feb 23, 2024
1 parent 3ff8105 commit e9c3adc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Chat(private val model: GenerativeModel, val history: MutableList<Content>
tempHistory.add(prompt)
tempHistory.add(response.candidates.first().content)
if (responsePart is FunctionCallPart) {
if (!model.requestOptions.disableAutoFunction) {
if (model.requestOptions.disableAutoFunction) {
break
}
val output = model.executeFunction(responsePart)
Expand Down Expand Up @@ -191,7 +191,7 @@ class Chat(private val model: GenerativeModel, val history: MutableList<Content>
tempHistory.add(Content("model", listOf(part)))
}
is FunctionCallPart -> {
if (!model.requestOptions.disableAutoFunction) {
if (model.requestOptions.disableAutoFunction) {
tempHistory.add(response.candidates.first().content)
continue
}
Expand Down

0 comments on commit e9c3adc

Please sign in to comment.