Skip to content

Commit 352d40b

Browse files
committed
revert changes on create-llama
1 parent 215f102 commit 352d40b

File tree

14 files changed

+471
-1125
lines changed

14 files changed

+471
-1125
lines changed

.changeset/fluffy-otters-refuse.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/yummy-moles-lick.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/create-llama/helpers/typescript.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const installLlamaIndexServerTemplate = async ({
3131
process.exit(1);
3232
}
3333

34-
await copy("*.ts", path.join(root, "src", "app"), {
34+
await copy("workflow.ts", path.join(root, "src", "app"), {
3535
parents: true,
3636
cwd: path.join(
3737
templatesDir,

packages/create-llama/questions/simple.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,21 @@ export const askSimpleQuestions = async (
6262

6363
let useLlamaCloud = false;
6464

65-
const { language: newLanguage } = await prompts(
66-
{
67-
type: "select",
68-
name: "language",
69-
message: "What language do you want to use?",
70-
choices: [
71-
{ title: "Python (FastAPI)", value: "fastapi" },
72-
{ title: "Typescript (NextJS)", value: "nextjs" },
73-
],
74-
},
75-
questionHandlers,
76-
);
77-
language = newLanguage;
65+
if (appType !== "artifacts") {
66+
const { language: newLanguage } = await prompts(
67+
{
68+
type: "select",
69+
name: "language",
70+
message: "What language do you want to use?",
71+
choices: [
72+
{ title: "Python (FastAPI)", value: "fastapi" },
73+
{ title: "Typescript (NextJS)", value: "nextjs" },
74+
],
75+
},
76+
questionHandlers,
77+
);
78+
language = newLanguage;
79+
}
7880

7981
const { useLlamaCloud: newUseLlamaCloud } = await prompts(
8082
{

packages/create-llama/templates/components/agents/typescript/financial_report/workflow/fin-report.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ export class FinancialReportWorkflow extends Workflow<
6565
timeout: options?.timeout ?? 360,
6666
});
6767

68-
const llm = Settings.llm as ToolCallLLM;
69-
if (!llm.supportToolCall) {
68+
this.llm = options.llm ?? (Settings.llm as ToolCallLLM);
69+
if (!(this.llm instanceof ToolCallLLM)) {
7070
throw new Error("LLM is not a ToolCallLLM");
7171
}
7272
this.systemPrompt = options.systemPrompt ?? DEFAULT_SYSTEM_PROMPT;

packages/create-llama/templates/components/agents/typescript/form_filling/workflow/form-filling.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ export class FormFillingWorkflow extends Workflow<
6767
timeout: options?.timeout ?? 360,
6868
});
6969

70-
const llm = Settings.llm as ToolCallLLM;
71-
if (!llm.supportToolCall) {
70+
this.llm = options.llm ?? (Settings.llm as ToolCallLLM);
71+
if (!(this.llm instanceof ToolCallLLM)) {
7272
throw new Error("LLM is not a ToolCallLLM");
7373
}
7474
this.systemPrompt = options.systemPrompt ?? DEFAULT_SYSTEM_PROMPT;

packages/create-llama/templates/components/workflows/typescript/agentic_rag/workflow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { agent } from "@llamaindex/workflow";
1+
import { agent } from "llamaindex";
22
import { getIndex } from "./data";
33

44
export const workflowFactory = async (reqBody: any) => {

packages/create-llama/templates/components/workflows/typescript/artifacts/README-template.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)