Skip to content

Commit a3e396e

Browse files
committed
fix
1 parent 215aa69 commit a3e396e

File tree

8 files changed

+18
-23
lines changed

8 files changed

+18
-23
lines changed

src/{{ project_name_snake }}/qa_workflows.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
from llama_index.embeddings.openai import OpenAIEmbedding
2222
from llama_index.core.memory import ChatMemoryBuffer
2323

24+
from dotenv import load_dotenv
25+
26+
load_dotenv()
27+
2428
from .clients import (
2529
LLAMA_CLOUD_API_KEY,
2630
LLAMA_CLOUD_BASE_URL,

test-proj/.copier-answers.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: '2405947'
2+
_commit: c9f43f6
33
_src_path: .
4-
llama_org_id: asdf
5-
llama_project_id: asdf
64
project_name: test-proj
5+
project_title: Test Proj

test-proj/src/test_proj/qa_workflows.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
from llama_index.llms.openai import OpenAI
2121
from llama_index.embeddings.openai import OpenAIEmbedding
2222
from llama_index.core.memory import ChatMemoryBuffer
23+
from dotenv import load_dotenv
24+
25+
load_dotenv()
2326

2427
from .clients import (
2528
LLAMA_CLOUD_API_KEY,

test-proj/ui/src/libs/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export const APP_TITLE = "Test Proj";
22
export const AGENT_NAME = import.meta.env.VITE_LLAMA_DEPLOY_DEPLOYMENT_NAME;
3+
export const INDEX_NAME = "document_qa_index";

test-proj/ui/src/pages/Home.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ChatBot from "../components/ChatBot";
22
import { WorkflowTrigger } from "@llamaindex/ui";
3-
import { APP_TITLE } from "../libs/config";
3+
import { APP_TITLE, INDEX_NAME } from "../libs/config";
44

55
export default function Home() {
66
return (
@@ -20,18 +20,10 @@ export default function Home() {
2020
<div className="flex mb-4">
2121
<WorkflowTrigger
2222
workflowName="upload"
23-
inputFields={[
24-
{
25-
key: "index_name",
26-
label: "Index Name",
27-
placeholder: "e.g. document_qa_index",
28-
required: true,
29-
},
30-
]}
3123
customWorkflowInput={(files, fieldValues) => {
3224
return {
3325
file_id: files[0].fileId,
34-
index_name: fieldValues.index_name,
26+
index_name: INDEX_NAME,
3527
};
3628
}}
3729
/>

ui/src/libs/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const APP_TITLE = "Test Project";
2+
export const AGENT_NAME = import.meta.env.VITE_LLAMA_DEPLOY_DEPLOYMENT_NAME;
3+
export const INDEX_NAME = "document_qa_index";

ui/src/libs/config.ts.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export const APP_TITLE = "{{ project_title }}";
22
export const AGENT_NAME = import.meta.env.VITE_LLAMA_DEPLOY_DEPLOYMENT_NAME;
3+
export const INDEX_NAME = "document_qa_index";

ui/src/pages/Home.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ChatBot from "../components/ChatBot";
22
import { WorkflowTrigger } from "@llamaindex/ui";
3-
import { APP_TITLE } from "../libs/config";
3+
import { APP_TITLE, INDEX_NAME } from "../libs/config";
44

55
export default function Home() {
66
return (
@@ -20,18 +20,10 @@ export default function Home() {
2020
<div className="flex mb-4">
2121
<WorkflowTrigger
2222
workflowName="upload"
23-
inputFields={[
24-
{
25-
key: "index_name",
26-
label: "Index Name",
27-
placeholder: "e.g. document_qa_index",
28-
required: true,
29-
},
30-
]}
3123
customWorkflowInput={(files, fieldValues) => {
3224
return {
3325
file_id: files[0].fileId,
34-
index_name: fieldValues.index_name,
26+
index_name: INDEX_NAME,
3527
};
3628
}}
3729
/>

0 commit comments

Comments
 (0)