Skip to content

Commit

Permalink
fixed llama-index package versions and add missing env for web data s…
Browse files Browse the repository at this point in the history
…ource (#14)
  • Loading branch information
leehuwuj authored Mar 22, 2024
1 parent 56faee0 commit 60ed8fe
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/khaki-jeans-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-llama": patch
---

Add missing environment variable config for web data source
5 changes: 5 additions & 0 deletions .changeset/popular-berries-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-llama": patch
---

Fixed llama-index package versions
5 changes: 5 additions & 0 deletions helpers/env-variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
TemplateDataSource,
TemplateFramework,
TemplateVectorDB,
WebSourceConfig,
} from "./types";

type EnvVar = {
Expand Down Expand Up @@ -105,18 +106,22 @@ const getDataSourceEnvs = (
) => {
switch (dataSource.type) {
case "web":
const config = dataSource.config as WebSourceConfig;
return [
{
name: "BASE_URL",
description: "The base URL to start web scraping.",
value: config.baseUrl,
},
{
name: "URL_PREFIX",
description: "The prefix of the URL to start web scraping.",
value: config.baseUrl,
},
{
name: "MAX_DEPTH",
description: "The maximum depth to scrape.",
value: config.depth?.toString(),
},
];
case "file":
Expand Down
4 changes: 3 additions & 1 deletion templates/types/simple/fastapi/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ python = "^3.11,<3.12"
fastapi = "^0.109.1"
uvicorn = { extras = ["standard"], version = "^0.23.2" }
python-dotenv = "^1.0.0"
llama-index = "^0.10.7"
llama-index = "0.10.15"
llama-index-core = "0.10.15"
llama-index-agent-openai = "0.1.5"

[build-system]
requires = ["poetry-core"]
Expand Down
4 changes: 3 additions & 1 deletion templates/types/streaming/fastapi/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ python = "^3.11,<3.12"
fastapi = "^0.109.1"
uvicorn = { extras = ["standard"], version = "^0.23.2" }
python-dotenv = "^1.0.0"
llama-index = "^0.10.7"
llama-index = "0.10.15"
llama-index-core = "0.10.15"
llama-index-agent-openai = "0.1.5"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 60ed8fe

Please sign in to comment.