File tree Expand file tree Collapse file tree 13 files changed +32
-43
lines changed
src/{{ project_name_snake }} Expand file tree Collapse file tree 13 files changed +32
-43
lines changed Original file line number Diff line number Diff line change 62
62
- name : Activate pnpm version
63
63
working-directory : test-proj/ui
64
64
run : corepack prepare --activate
65
-
66
65
67
66
- name : Run UI checks
68
67
run : pnpm run all-check
69
- working-directory : test-proj/ui
68
+ working-directory : test-proj/ui
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ This application uses LlamaDeploy. For more information see [the docs](https://d
9
9
10
10
1 . install ` uv ` if you haven't ` brew install uv `
11
11
2 . run ` uvx llamactl serve `
12
- 3 . Visit http://localhost:4501/docs and see workflow APIs
13
-
14
12
15
13
# Organization
16
14
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ build-backend = "hatchling.build"
20
20
21
21
[dependency-groups]
22
22
dev = [
23
+ "click==8.1.7",
23
24
"hatch>=1.14.1",
24
25
"pytest>=8.4.2",
25
26
"ruff>=0.13.0",
Original file line number Diff line number Diff line change 1
1
import logging
2
2
import os
3
+ import tempfile
3
4
4
5
import httpx
6
+ from dotenv import load_dotenv
5
7
from llama_cloud .types import RetrievalMode
6
- import tempfile
8
+ from llama_index . core import Settings
7
9
from llama_index .core .chat_engine .types import BaseChatEngine , ChatMode
10
+ from llama_index .core .memory import ChatMemoryBuffer
11
+ from llama_index .embeddings .openai import OpenAIEmbedding
12
+ from llama_index .llms .openai import OpenAI
13
+ from llama_cloud_services import LlamaCloudIndex
8
14
from workflows import Workflow , step , Context
9
15
from workflows .events import (
10
16
StartEvent ,
15
21
)
16
22
from workflows .retry_policy import ConstantDelayRetryPolicy
17
23
18
- from llama_cloud_services import LlamaCloudIndex
19
- from llama_index .core import Settings
20
- from llama_index .llms .openai import OpenAI
21
- from llama_index .embeddings .openai import OpenAIEmbedding
22
- from llama_index .core .memory import ChatMemoryBuffer
23
-
24
24
from .clients import (
25
25
LLAMA_CLOUD_API_KEY ,
26
26
LLAMA_CLOUD_BASE_URL ,
30
30
LLAMA_CLOUD_PROJECT_ID ,
31
31
)
32
32
33
+ load_dotenv ()
34
+
33
35
34
36
logger = logging .getLogger (__name__ )
35
37
Original file line number Diff line number Diff line change 1
1
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
- _commit : ' 2405947 '
2
+ _commit : c9f43f6
3
3
_src_path : .
4
- llama_org_id : asdf
5
- llama_project_id : asdf
6
4
project_name : test-proj
5
+ project_title : Test Proj
Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ This application uses LlamaDeploy. For more information see [the docs](https://d
9
9
10
10
1 . install ` uv ` if you haven't ` brew install uv `
11
11
2 . run ` uvx llamactl serve `
12
- 3 . Visit http://localhost:4501/docs and see workflow APIs
13
-
14
12
15
13
# Organization
16
14
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ build-backend = "hatchling.build"
20
20
21
21
[dependency-groups ]
22
22
dev = [
23
+ " click==8.1.7" ,
23
24
" hatch>=1.14.1" ,
24
25
" pytest>=8.4.2" ,
25
26
" ruff>=0.13.0" ,
Original file line number Diff line number Diff line change 1
1
import logging
2
2
import os
3
+ import tempfile
3
4
4
5
import httpx
6
+ from dotenv import load_dotenv
5
7
from llama_cloud .types import RetrievalMode
6
- import tempfile
8
+ from llama_index . core import Settings
7
9
from llama_index .core .chat_engine .types import BaseChatEngine , ChatMode
10
+ from llama_index .core .memory import ChatMemoryBuffer
11
+ from llama_index .embeddings .openai import OpenAIEmbedding
12
+ from llama_index .llms .openai import OpenAI
13
+ from llama_cloud_services import LlamaCloudIndex
8
14
from workflows import Workflow , step , Context
9
15
from workflows .events import (
10
16
StartEvent ,
15
21
)
16
22
from workflows .retry_policy import ConstantDelayRetryPolicy
17
23
18
- from llama_cloud_services import LlamaCloudIndex
19
- from llama_index .core import Settings
20
- from llama_index .llms .openai import OpenAI
21
- from llama_index .embeddings .openai import OpenAIEmbedding
22
- from llama_index .core .memory import ChatMemoryBuffer
23
-
24
24
from .clients import (
25
25
LLAMA_CLOUD_API_KEY ,
26
26
LLAMA_CLOUD_BASE_URL ,
30
30
LLAMA_CLOUD_PROJECT_ID ,
31
31
)
32
32
33
+ load_dotenv ()
34
+
33
35
34
36
logger = logging .getLogger (__name__ )
35
37
Original file line number Diff line number Diff line change 1
1
export const APP_TITLE = "Test Proj" ;
2
2
export const AGENT_NAME = import . meta. env . VITE_LLAMA_DEPLOY_DEPLOYMENT_NAME ;
3
+ export const INDEX_NAME = "document_qa_index" ;
Original file line number Diff line number Diff line change 1
1
import ChatBot from "../components/ChatBot" ;
2
2
import { WorkflowTrigger } from "@llamaindex/ui" ;
3
- import { APP_TITLE } from "../libs/config" ;
3
+ import { APP_TITLE , INDEX_NAME } from "../libs/config" ;
4
4
5
5
export default function Home ( ) {
6
6
return (
@@ -20,18 +20,10 @@ export default function Home() {
20
20
< div className = "flex mb-4" >
21
21
< WorkflowTrigger
22
22
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
- ] }
31
23
customWorkflowInput = { ( files , fieldValues ) => {
32
24
return {
33
25
file_id : files [ 0 ] . fileId ,
34
- index_name : fieldValues . index_name ,
26
+ index_name : INDEX_NAME ,
35
27
} ;
36
28
} }
37
29
/>
You can’t perform that action at this time.
0 commit comments