mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
style: fix rustfmt formatting in routine_engine.rs
https://claude.ai/code/session_01CsP5wMZ2evEMHgGghjAfR1
This commit is contained in:
+14
-13
@@ -1146,7 +1146,12 @@ async fn execute_routine(ctx: EngineContext, routine: Routine, run: RoutineRun)
|
|||||||
let total = Some(accumulated_tokens.saturating_add(tokens.unwrap_or(0)));
|
let total = Some(accumulated_tokens.saturating_add(tokens.unwrap_or(0)));
|
||||||
break Ok((status, summary, total));
|
break Ok((status, summary, total));
|
||||||
}
|
}
|
||||||
Err(ref e) if is_lightweight && !uses_tools && e.is_retryable() && attempt < MAX_RETRIES => {
|
Err(ref e)
|
||||||
|
if is_lightweight
|
||||||
|
&& !uses_tools
|
||||||
|
&& e.is_retryable()
|
||||||
|
&& attempt < MAX_RETRIES =>
|
||||||
|
{
|
||||||
// Accumulate any partial tokens from the failed attempt
|
// Accumulate any partial tokens from the failed attempt
|
||||||
if let RoutineError::LlmFailed {
|
if let RoutineError::LlmFailed {
|
||||||
partial_tokens: Some(t),
|
partial_tokens: Some(t),
|
||||||
@@ -1558,18 +1563,14 @@ async fn execute_lightweight_no_tools(
|
|||||||
.with_max_tokens(effective_max_tokens)
|
.with_max_tokens(effective_max_tokens)
|
||||||
.with_temperature(0.3);
|
.with_temperature(0.3);
|
||||||
|
|
||||||
let response = ctx
|
let response = ctx.llm.complete(request).await.map_err(|e| {
|
||||||
.llm
|
let retryable = crate::llm::retry::is_retryable(&e);
|
||||||
.complete(request)
|
RoutineError::LlmFailed {
|
||||||
.await
|
reason: e.to_string(),
|
||||||
.map_err(|e| {
|
partial_tokens: None,
|
||||||
let retryable = crate::llm::retry::is_retryable(&e);
|
retryable,
|
||||||
RoutineError::LlmFailed {
|
}
|
||||||
reason: e.to_string(),
|
})?;
|
||||||
partial_tokens: None,
|
|
||||||
retryable,
|
|
||||||
}
|
|
||||||
})?;
|
|
||||||
|
|
||||||
handle_text_response(
|
handle_text_response(
|
||||||
&response.content,
|
&response.content,
|
||||||
|
|||||||
Reference in New Issue
Block a user