mirror of
https://github.com/run-llama/create-llama.git
synced 2026-07-16 03:04:21 -04:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 16774f581f | |||
| fd3c96798a |
@@ -1,4 +1,4 @@
|
|||||||
import { BaseTool, OpenAIAgent, QueryEngineTool } from "llamaindex";
|
import { BaseToolWithCall, OpenAIAgent, QueryEngineTool } from "llamaindex";
|
||||||
import { ToolsFactory } from "llamaindex/tools/ToolsFactory";
|
import { ToolsFactory } from "llamaindex/tools/ToolsFactory";
|
||||||
import fs from "node:fs/promises";
|
import fs from "node:fs/promises";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
@@ -6,7 +6,7 @@ import { getDataSource } from "./index";
|
|||||||
import { STORAGE_CACHE_DIR } from "./shared";
|
import { STORAGE_CACHE_DIR } from "./shared";
|
||||||
|
|
||||||
export async function createChatEngine() {
|
export async function createChatEngine() {
|
||||||
let tools: BaseTool[] = [];
|
let tools: BaseToolWithCall[] = [];
|
||||||
|
|
||||||
// Add a query engine tool if we have a data source
|
// Add a query engine tool if we have a data source
|
||||||
// Delete this code if you don't have a data source
|
// Delete this code if you don't have a data source
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"llamaindex": "0.2.10"
|
"llamaindex": "0.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/cors": "^2.8.16",
|
"@types/cors": "^2.8.16",
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"class-variance-authority": "^0.7.0",
|
"class-variance-authority": "^0.7.0",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.3.1",
|
||||||
"llamaindex": "0.2.10",
|
"llamaindex": "0.3.1",
|
||||||
"lucide-react": "^0.294.0",
|
"lucide-react": "^0.294.0",
|
||||||
"next": "^14.0.3",
|
"next": "^14.0.3",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
|
|||||||
@@ -1,15 +1,4 @@
|
|||||||
// webpack config must be a function in NextJS that is used to patch the default webpack config provided by NextJS, see https://nextjs.org/docs/pages/api-reference/next-config-js/webpack
|
// webpack config must be a function in NextJS that is used to patch the default webpack config provided by NextJS, see https://nextjs.org/docs/pages/api-reference/next-config-js/webpack
|
||||||
export default function webpack(config) {
|
export default function webpack(config) {
|
||||||
config.resolve.fallback = {
|
|
||||||
aws4: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Following lines will fix issues with onnxruntime-node when using pnpm
|
|
||||||
// See: https://github.com/vercel/next.js/issues/43433
|
|
||||||
config.externals.push({
|
|
||||||
"onnxruntime-node": "commonjs onnxruntime-node",
|
|
||||||
sharp: "commonjs sharp",
|
|
||||||
});
|
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
export default function webpack(config, isServer) {
|
export default function webpack(config, isServer) {
|
||||||
config.resolve.fallback = {
|
|
||||||
aws4: false,
|
|
||||||
};
|
|
||||||
config.module.rules.push({
|
config.module.rules.push({
|
||||||
test: /\.node$/,
|
test: /\.node$/,
|
||||||
loader: "node-loader",
|
loader: "node-loader",
|
||||||
|
|||||||
Reference in New Issue
Block a user