enh: built-in tools toggle in model editor
This commit is contained in:
@@ -1556,8 +1556,10 @@ async def process_chat_payload(request, form_data, user, metadata, model):
|
||||
if mcp_clients:
|
||||
metadata["mcp_clients"] = mcp_clients
|
||||
|
||||
# Always inject builtin tools for native function calling based on enabled features
|
||||
if metadata.get("params", {}).get("function_calling") == "native":
|
||||
# Inject builtin tools for native function calling based on enabled features and model capability
|
||||
# Check if builtin_tools capability is enabled for this model (defaults to True if not specified)
|
||||
builtin_tools_enabled = model.get("info", {}).get("meta", {}).get("capabilities", {}).get("builtin_tools", True)
|
||||
if metadata.get("params", {}).get("function_calling") == "native" and builtin_tools_enabled:
|
||||
builtin_tools = get_builtin_tools(
|
||||
request,
|
||||
{
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
status_updates: {
|
||||
label: $i18n.t('Status Updates'),
|
||||
description: $i18n.t('Displays status updates (e.g., web search progress) in the response')
|
||||
},
|
||||
builtin_tools: {
|
||||
label: $i18n.t('Builtin Tools'),
|
||||
description: $i18n.t('Automatically inject system tools in native function calling mode (e.g., timestamps, memory, chat history, notes, etc.)')
|
||||
}
|
||||
};
|
||||
|
||||
@@ -52,6 +56,7 @@
|
||||
usage?: boolean;
|
||||
citations?: boolean;
|
||||
status_updates?: boolean;
|
||||
builtin_tools?: boolean;
|
||||
} = {};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -99,7 +99,8 @@
|
||||
code_interpreter: true,
|
||||
citations: true,
|
||||
status_updates: true,
|
||||
usage: undefined
|
||||
usage: undefined,
|
||||
builtin_tools: true
|
||||
};
|
||||
let defaultFeatureIds = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user