fix: ReAct tool use format in few-shot (#2542)
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user