Skip to content

Commit 76ec360

Browse files
authored
update templates to use new chat UI config (#553)
1 parent 5cfdec7 commit 76ec360

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

.changeset/eighty-schools-kick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-llama": patch
3+
---
4+
5+
Update templates to use new chat ui config

templates/types/llamaindexserver/fastapi/main.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from app.settings import init_settings
66
from app.workflow import create_workflow
77
from dotenv import load_dotenv
8-
from llama_index.server import LlamaIndexServer
8+
from llama_index.server import LlamaIndexServer, UIConfig
99

1010
logger = logging.getLogger("uvicorn")
1111

@@ -15,7 +15,10 @@ def create_app():
1515

1616
app = LlamaIndexServer(
1717
workflow_factory=create_workflow, # A factory function that creates a new workflow for each request
18-
component_dir="components",
18+
ui_config=UIConfig(
19+
component_dir="components",
20+
app_title="Chat App",
21+
),
1922
env=env,
2023
logger=logger,
2124
)

templates/types/llamaindexserver/fastapi/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ python-dotenv = "^1.0.0"
1717
pydantic = "<2.10"
1818
aiostream = "^0.5.2"
1919
llama-index-core = "^0.12.28"
20-
llama-index-server = "^0.1.8"
20+
llama-index-server = "^0.1.10"
2121

2222
[tool.poetry.group.dev.dependencies]
2323
mypy = "^1.8.0"

templates/types/llamaindexserver/nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"dependencies": {
1010
"@llamaindex/openai": "0.2.0",
1111
"@llamaindex/readers": "^2.0.0",
12-
"@llamaindex/server": "0.0.9",
12+
"@llamaindex/server": "0.1.0",
1313
"@llamaindex/tools": "0.0.4",
1414
"dotenv": "^16.4.7",
1515
"llamaindex": "0.9.17",

templates/types/llamaindexserver/nextjs/src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ initSettings();
77

88
new LlamaIndexServer({
99
workflow: workflowFactory,
10-
appTitle: "LlamaIndex App",
11-
componentsDir: "components",
10+
uiConfig: {
11+
appTitle: "LlamaIndex App",
12+
componentsDir: "components",
13+
},
1214
}).start();

0 commit comments

Comments
 (0)