summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.example.yaml2
-rw-r--r--src/function.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/config.example.yaml b/config.example.yaml
index 52b311c..262f41b 100644
--- a/config.example.yaml
+++ b/config.example.yaml
@@ -27,7 +27,7 @@ summary_prompt: 'This is a summary of the chat history as a recap: '
# ---- function-calling & agent ----
# Controls the function calling feature. For setup instructions, visit https://github.com/sigoden/llm-functions
-function_calling: false
+function_calling: true
# Regex for seletecting dangerous functions
# User confirmation is required when executing these functions
# e.g. 'execute_command|execute_js_code' 'execute_.*'
diff --git a/src/function.rs b/src/function.rs
index b91722c..8528af5 100644
--- a/src/function.rs
+++ b/src/function.rs
@@ -72,10 +72,10 @@ impl Functions {
vec![]
};
- let func_names = declarations.iter().map(|v| v.name.clone()).collect();
+ let names = declarations.iter().map(|v| v.name.clone()).collect();
Ok(Self {
- names: func_names,
+ names,
declarations,
})
}