Skip to content

Commit dea97f6

Browse files
authored
strategy update (#247)
1 parent a87052b commit dea97f6

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

composeApp/src/commonMain/kotlin/dev/johnoreilly/climatetrace/agent/ClimateTraceAgentProvider.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ClimateTraceAgentProvider(
4444
var inputMessage = initialInput
4545
var lastAssistantMessage = ""
4646

47-
repeat(50) { // align with agentConfig.maxAgentIterations
47+
while (inputMessage.isNotEmpty()) {
4848
println("Calling LLM with Input = $inputMessage")
4949
var responses = requestLLMMultiple(inputMessage)
5050

@@ -124,13 +124,10 @@ class ClimateTraceAgentProvider(
124124
onToolCallEvent("Tool ${ctx.toolName}, args ${ctx.toolArgs}")
125125
}
126126

127-
128127
onAgentExecutionFailed { ctx ->
129128
onErrorEvent("${ctx.throwable.message}")
130129
}
131130

132-
133-
134131
onAgentCompleted { _ ->
135132
// Skip finish event handling
136133
}

0 commit comments

Comments
 (0)