@@ -11,7 +11,7 @@ import { ModelConfig, TemplateFramework } from "../helpers/types";
11
11
import { PureQuestionArgs , QuestionResults } from "./types" ;
12
12
import { askPostInstallAction , questionHandlers } from "./utils" ;
13
13
14
- type AppType =
14
+ type UseCase =
15
15
| "rag"
16
16
| "code_artifact"
17
17
| "financial_report_agent"
@@ -22,7 +22,7 @@ type AppType =
22
22
| "blog" ;
23
23
24
24
type SimpleAnswers = {
25
- appType : AppType ;
25
+ useCase : UseCase ;
26
26
language : TemplateFramework ;
27
27
useLlamaCloud : boolean ;
28
28
llamaCloudKey ?: string ;
@@ -35,38 +35,63 @@ export const askSimpleQuestions = async (
35
35
{
36
36
type : "select" ,
37
37
name : "appType" ,
38
- message : "What app do you want to build?" ,
38
+ message : "What type of app do you want to build?" ,
39
39
choices : [
40
- { title : "Agentic RAG" , value : "rag" } ,
41
- { title : "Data Scientist" , value : "data_scientist" } ,
42
40
{
43
- title : "Financial Report Generator (using Workflows) " ,
44
- value : "financial_report_agent " ,
41
+ title : "Agentic Document Workflows" ,
42
+ value : "agentic_document_workflow " ,
45
43
} ,
46
- {
47
- title : "Form Filler (using Workflows)" ,
48
- value : "form_filling" ,
49
- } ,
50
- { title : "Code Artifact Agent" , value : "code_artifact" } ,
51
- { title : "Information Extractor" , value : "extractor" } ,
52
- {
53
- title : "Contract Review (using Workflows)" ,
54
- value : "contract_review" ,
55
- } ,
56
- { title : "Blog Writer (using Workflows)" , value : "blog" } ,
44
+ { title : "Agents" , value : "agents" } ,
57
45
] ,
58
46
} ,
59
47
questionHandlers ,
60
48
) ;
61
49
50
+ let useCaseOptions : prompts . Choice [ ] ;
51
+
52
+ if ( appType === "agents" ) {
53
+ useCaseOptions = [
54
+ { title : "Simple RAG chat app" , value : "rag" } ,
55
+ { title : "Data Scientist" , value : "data_scientist" } ,
56
+ { title : "Code Artifact Agent" , value : "code_artifact" } ,
57
+ { title : "Information Extractor" , value : "extractor" } ,
58
+ ] ;
59
+ } else {
60
+ useCaseOptions = [
61
+ {
62
+ title : "Financial Report Generator" ,
63
+ value : "financial_report_agent" ,
64
+ } ,
65
+ {
66
+ title : "Financial 10k SEC Form Filler" ,
67
+ value : "form_filling" ,
68
+ } ,
69
+ {
70
+ title : "Contract Review" ,
71
+ value : "contract_review" ,
72
+ } ,
73
+ { title : "Blog Writer" , value : "blog" } ,
74
+ ] ;
75
+ }
76
+
77
+ const { useCase } = await prompts (
78
+ {
79
+ type : "select" ,
80
+ name : "useCase" ,
81
+ message : "What use case do you want to build?" ,
82
+ choices : useCaseOptions ,
83
+ } ,
84
+ questionHandlers ,
85
+ ) ;
86
+
62
87
let language : TemplateFramework = "fastapi" ;
63
88
let llamaCloudKey = args . llamaCloudKey ;
64
89
let useLlamaCloud = false ;
65
90
66
91
if (
67
- appType !== "extractor" &&
68
- appType !== "contract_review" &&
69
- appType !== "blog"
92
+ useCase !== "extractor" &&
93
+ useCase !== "contract_review" &&
94
+ useCase !== "blog"
70
95
) {
71
96
const { language : newLanguage } = await prompts (
72
97
{
@@ -112,7 +137,7 @@ export const askSimpleQuestions = async (
112
137
}
113
138
114
139
const results = await convertAnswers ( args , {
115
- appType ,
140
+ useCase ,
116
141
language,
117
142
useLlamaCloud,
118
143
llamaCloudKey,
@@ -137,7 +162,7 @@ const convertAnswers = async (
137
162
} ,
138
163
} ;
139
164
const lookup : Record <
140
- AppType ,
165
+ UseCase ,
141
166
Pick <
142
167
QuestionResults ,
143
168
"template" | "tools" | "frontend" | "dataSources" | "useCase"
@@ -203,7 +228,7 @@ const convertAnswers = async (
203
228
dataSources : [ AI_REPORTS ] ,
204
229
} ,
205
230
} ;
206
- const results = lookup [ answers . appType ] ;
231
+ const results = lookup [ answers . useCase ] ;
207
232
return {
208
233
framework : answers . language ,
209
234
ui : "shadcn" ,
0 commit comments