Skip to content
Snippets Groups Projects
Unverified Commit 60ed8fe0 authored by Huu Le (Lee)'s avatar Huu Le (Lee) Committed by GitHub
Browse files

fixed llama-index package versions and add missing env for web data source (#14)

parent 56faee0b
No related branches found
No related tags found
No related merge requests found
---
"create-llama": patch
---
Add missing environment variable config for web data source
---
"create-llama": patch
---
Fixed llama-index package versions
...@@ -5,6 +5,7 @@ import { ...@@ -5,6 +5,7 @@ import {
TemplateDataSource, TemplateDataSource,
TemplateFramework, TemplateFramework,
TemplateVectorDB, TemplateVectorDB,
WebSourceConfig,
} from "./types"; } from "./types";
type EnvVar = { type EnvVar = {
...@@ -105,18 +106,22 @@ const getDataSourceEnvs = ( ...@@ -105,18 +106,22 @@ const getDataSourceEnvs = (
) => { ) => {
switch (dataSource.type) { switch (dataSource.type) {
case "web": case "web":
const config = dataSource.config as WebSourceConfig;
return [ return [
{ {
name: "BASE_URL", name: "BASE_URL",
description: "The base URL to start web scraping.", description: "The base URL to start web scraping.",
value: config.baseUrl,
}, },
{ {
name: "URL_PREFIX", name: "URL_PREFIX",
description: "The prefix of the URL to start web scraping.", description: "The prefix of the URL to start web scraping.",
value: config.baseUrl,
}, },
{ {
name: "MAX_DEPTH", name: "MAX_DEPTH",
description: "The maximum depth to scrape.", description: "The maximum depth to scrape.",
value: config.depth?.toString(),
}, },
]; ];
case "file": case "file":
......
...@@ -10,7 +10,9 @@ python = "^3.11,<3.12" ...@@ -10,7 +10,9 @@ python = "^3.11,<3.12"
fastapi = "^0.109.1" fastapi = "^0.109.1"
uvicorn = { extras = ["standard"], version = "^0.23.2" } uvicorn = { extras = ["standard"], version = "^0.23.2" }
python-dotenv = "^1.0.0" 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] [build-system]
requires = ["poetry-core"] requires = ["poetry-core"]
......
...@@ -10,7 +10,9 @@ python = "^3.11,<3.12" ...@@ -10,7 +10,9 @@ python = "^3.11,<3.12"
fastapi = "^0.109.1" fastapi = "^0.109.1"
uvicorn = { extras = ["standard"], version = "^0.23.2" } uvicorn = { extras = ["standard"], version = "^0.23.2" }
python-dotenv = "^1.0.0" 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] [build-system]
requires = ["poetry-core"] requires = ["poetry-core"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment