Refactor AIEngine and registry to improve function ID generation and support legacy names
- Updated AIEngine to normalize function names by replacing underscores with hyphens in generated function IDs for better consistency with frontend tracking. - Enhanced registry to resolve function name aliases, allowing for backward compatibility with legacy function names when retrieving function instances.
This commit is contained in:
@@ -83,7 +83,9 @@ class AIEngine:
|
||||
function_name = fn.get_name()
|
||||
|
||||
# Generate function_id for tracking (ai-{function_name}-01)
|
||||
function_id = f"ai-{function_name}-01"
|
||||
# Normalize underscores to hyphens to match frontend tracking IDs
|
||||
function_id_base = function_name.replace('_', '-')
|
||||
function_id = f"ai-{function_id_base}-01"
|
||||
|
||||
# Get model config from settings (Stage 4 requirement)
|
||||
model_config = get_model_config(function_name)
|
||||
|
||||
Reference in New Issue
Block a user