refactor: remove regeneration and other configurability (#31)

This commit is contained in:
Adrian Lyjak
2025-10-22 13:28:58 -04:00
committed by GitHub
parent 2e7a5f4ce9
commit c18b2cc187
10 changed files with 20 additions and 78 deletions
-20
View File
@@ -1,20 +0,0 @@
# questions
project_name:
type: str
help: What is your project name? This will be used as an identifier. Must only contain letters, numbers, or dashes.
default: "{{ _folder_name | regex_replace('[^a-zA-Z0-9-]', '-') | regex_replace('-+', '-') | regex_replace('^-|-$', '') }}"
validator: |-
{% if not project_name.replace("-", "").isalnum() %}
Project name must contain only letters, numbers, and dashes
{% endif %}
project_title:
type: str
help: What is the title of your project? This will be used in the UI Title Bar.
default: "{{ project_name.replace('-', ' ').title() }}"
# computed variables
project_name_snake:
type: str
default: "{{ project_name.replace('-', '_') }}"
when: false
+3 -3
View File
@@ -1,5 +1,5 @@
[project]
name = "{{ project_name }}"
name = "document-qa"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
@@ -45,5 +45,5 @@ llama_cloud = true
directory = "./ui"
[tool.llamadeploy.workflows]
upload = "{{ project_name_snake }}.qa_workflows:upload"
chat = "{{ project_name_snake }}.qa_workflows:chat"
upload = "document_qa.qa_workflows:upload"
chat = "document_qa.qa_workflows:chat"
+13 -5
View File
@@ -1,21 +1,28 @@
{
"name": "ui",
"name": "document-qa-ui",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview"
"build": "tsc --noEmit && vite build",
"preview": "vite preview",
"lint": "tsc --noEmit",
"format": "prettier --write src",
"format-check": "prettier --check src",
"all-check": "pnpm i && pnpm run lint && pnpm run format-check && pnpm run build",
"all-fix": "pnpm i && pnpm run lint && pnpm run format && pnpm run build"
},
"dependencies": {
"@llamaindex/ui": "^1.0.2",
"@llamaindex/ui": "^2.1.1",
"@llamaindex/workflows-client": "^1.2.0",
"llama-cloud-services": "^0.3.6",
"@radix-ui/themes": "^3.2.1",
"idb": "^8.0.3",
"llama-cloud-services": "^0.3.6",
"lucide-react": "^0.544.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sonner": "^2.0.7",
"tw-animate-css": "^1.3.8"
},
"devDependencies": {
@@ -27,6 +34,7 @@
"@vitejs/plugin-react": "^4.3.4",
"dotenv": "^17.2.2",
"eslint": "^9",
"prettier": "^3.6.2",
"tailwindcss": "^4",
"typescript": "^5",
"vite": "^5.4.8"
-43
View File
@@ -1,43 +0,0 @@
{
"name": "{{ project_name }}-ui",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc --noEmit && vite build",
"preview": "vite preview",
"lint": "tsc --noEmit",
"format": "prettier --write src",
"format-check": "prettier --check src",
"all-check": "pnpm i && pnpm run lint && pnpm run format-check && pnpm run build",
"all-fix": "pnpm i && pnpm run lint && pnpm run format && pnpm run build"
},
"dependencies": {
"@llamaindex/ui": "^2.1.1",
"@llamaindex/workflows-client": "^1.2.0",
"@radix-ui/themes": "^3.2.1",
"idb": "^8.0.3",
"llama-cloud-services": "^0.3.6",
"lucide-react": "^0.544.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sonner": "^2.0.7",
"tw-animate-css": "^1.3.8"
},
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@tailwindcss/vite": "^4.1.13",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@vitejs/plugin-react": "^4.3.4",
"dotenv": "^17.2.2",
"eslint": "^9",
"prettier": "^3.6.2",
"tailwindcss": "^4",
"typescript": "^5",
"vite": "^5.4.8"
},
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
}
+2 -2
View File
@@ -1,3 +1,3 @@
export const APP_TITLE = "Test Project";
export const APP_TITLE = "Document Q&A";
export const AGENT_NAME = import.meta.env.VITE_LLAMA_DEPLOY_DEPLOYMENT_NAME;
export const INDEX_NAME = "document_qa_index";
export const INDEX_NAME = "document_qa_index";
-3
View File
@@ -1,3 +0,0 @@
export const APP_TITLE = "{{ project_title }}";
export const AGENT_NAME = import.meta.env.VITE_LLAMA_DEPLOY_DEPLOYMENT_NAME;
export const INDEX_NAME = "document_qa_index";
@@ -3,13 +3,13 @@ import { WorkflowEvent } from "@llamaindex/ui";
export function createQueryConversationHistoryEvent(): WorkflowEvent {
return {
data: {},
type: "{{ project_name_snake }}.qa_workflows.QueryConversationHistoryEvent",
type: "document_qa.qa_workflows.QueryConversationHistoryEvent",
};
}
export function createHumanResponseEvent(response: string): WorkflowEvent {
return {
data: { _data: { response } },
type: "{{ project_name_snake }}.qa_workflows.HumanResponseEvent",
type: "document_qa.qa_workflows.HumanResponseEvent",
};
}