fix: ReAct tool use format in few-shot (#2542)

This commit is contained in:
yetone
2025-07-28 11:14:45 +08:00
committed by GitHub
parent 0a2143586a
commit 7e50de8904
3 changed files with 9 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ struct TemplateContext {
memory: Option<String>,
todos: Option<String>,
enable_fastapply: Option<bool>,
use_react_prompt: Option<bool>,
}
// Given the file name registered after add, the context table in Lua, resulted in a formatted
@@ -74,6 +75,7 @@ fn render(state: &State, template: &str, context: TemplateContext) -> LuaResult<
memory => context.memory,
todos => context.todos,
enable_fastapply => context.enable_fastapply,
use_react_prompt => context.use_react_prompt,
})
.map_err(LuaError::external)
.unwrap())