diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-26 23:04:06 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-26 23:04:06 +0800 |
| commit | f60df039979b8642aa82fec9e6ce56acb3a80f50 (patch) | |
| tree | d63a63b3972045ed5c065b471b9d161f88712a82 | |
| parent | 5985551abaf9418c1c37ef9fd6db39a6c9c94d69 (diff) | |
| download | aichat-f60df039979b8642aa82fec9e6ce56acb3a80f50.tar.gz | |
refactor: enable function_calling by default (#656)
| -rw-r--r-- | config.example.yaml | 2 | ||||
| -rw-r--r-- | src/function.rs | 4 |
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, }) } |
