Rename registry to index

This commit is contained in:
Emir Karabeg
2025-01-17 20:55:03 -08:00
parent ca2711b7a3
commit bb9d8f942c
3 changed files with 5 additions and 1 deletions
+4
View File
@@ -35,13 +35,17 @@ export const AgentBlock: BlockConfig = {
config: {
tool: (params: Record<string, any>) => {
const model = params.model || 'gpt-4o';
if (!model) {
throw new Error('No model selected');
}
const tool = MODEL_TOOLS[model as keyof typeof MODEL_TOOLS];
if (!tool) {
throw new Error(`Invalid model selected: ${model}`);
}
return tool;
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
import { SerializedWorkflow, SerializedBlock, BlockConfig } from '@/serializer/types';
import { ExecutionContext, ExecutionResult, Tool } from './types';
import { tools } from '@/tools/registry';
import { tools } from '@/tools';
export class Executor {
private workflow: SerializedWorkflow;