Open
Description
Describe the bug
I am trying to run a simple RAG endpoint in Deno Deploy/Supabase Edge Functions and this import makes the bundled function too heavy:
Deploying Function: analyze (script size: 167.8MB)
I tried to import each part individually:
import {
OpenAI,
OpenAIAgent,
} from "llamaindex/llm/openai";
import {
QueryEngineTool,
} from "llamaindex/tools/QueryEngineTool";
import {
PDFReader,
} from "llamaindex/readers/index";
import {
FunctionTool,
} from "llamaindex/tools/index";
import {
VectorStoreIndex,
} from "llamaindex/indices/vectorStore/index";
import {
Settings,
} from "llamaindex/Settings";
with no significant change.
To Reproduce
import {
VectorStoreIndex,
PDFReader,
Settings,
OpenAI,
FunctionTool,
OpenAIAgent,
QueryEngineTool,
Document,
Metadata
} from "npm:llamaindex@^0.8.30";
Expected behavior
The documentation does not mention any specific procedure to run this in an edge environment like this so I would expect this to run.
Desktop (please complete the following information):
- OS: [e.g. macOS, Linux]
- JS Runtime / Framework / Bundler (select all applicable)
- Node.js
- Deno
- Bun
- Next.js
- ESBuild
- Rollup
- Webpack
- Turbopack
- Vite
- Waku
- Edge Runtime
- AWS Lambda
- Cloudflare Worker
- Others (please elaborate on this)
- Version [e.g. 0.8.30]