@@ -364,7 +364,12 @@ export const installPythonTemplate = async ({
364
364
| "modelConfig"
365
365
> ) => {
366
366
console . log ( "\nInitializing Python project with template:" , template , "\n" ) ;
367
- const templatePath = path . join ( templatesDir , "types" , template , framework ) ;
367
+ let templatePath ;
368
+ if ( template === "extractor" ) {
369
+ templatePath = path . join ( templatesDir , "types" , "extractor" , framework ) ;
370
+ } else {
371
+ templatePath = path . join ( templatesDir , "types" , "streaming" , framework ) ;
372
+ }
368
373
await copy ( "**" , root , {
369
374
parents : true ,
370
375
cwd : templatePath ,
@@ -402,17 +407,7 @@ export const installPythonTemplate = async ({
402
407
} ) ;
403
408
}
404
409
405
- // Copy tools for multiagent template
406
- // TODO: Remove this once we support selecting tools for multiagent template
407
- if ( template === "multiagent" ) {
408
- // templates / components / engines / python / agent / tools;
409
- await copy ( "**" , path . join ( root , "app" , "engine" , "tools" ) , {
410
- cwd : path . join ( compPath , "engines" , "python" , "agent" , "tools" ) ,
411
- } ) ;
412
- }
413
-
414
- if ( template === "streaming" ) {
415
- // For the streaming template only:
410
+ if ( template === "streaming" || template === "multiagent" ) {
416
411
// Select and copy engine code based on data sources and tools
417
412
let engine ;
418
413
if ( dataSources . length > 0 && ( ! tools || tools . length === 0 ) ) {
@@ -427,6 +422,14 @@ export const installPythonTemplate = async ({
427
422
} ) ;
428
423
}
429
424
425
+ if ( template === "multiagent" ) {
426
+ // Copy multi-agent code
427
+ await copy ( "**" , path . join ( root ) , {
428
+ parents : true ,
429
+ cwd : path . join ( compPath , "multiagent" , "python" ) ,
430
+ } ) ;
431
+ }
432
+
430
433
console . log ( "Adding additional dependencies" ) ;
431
434
432
435
const addOnDependencies = getAdditionalDependencies (
0 commit comments