mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
Rename registry to index
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user