mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-16 07:14:29 -04:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e4ae6e9076 | |||
| f93efa2ea1 | |||
| 7d79365262 | |||
| 555692207e | |||
| fcc06b227a | |||
| 08a39790e4 | |||
| a8270082a0 |
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: "Planets in the Solar System"
|
||||
author: "Your Name"
|
||||
date: "January 10, 2024"
|
||||
---
|
||||
|
||||
# Introduction
|
||||
|
||||
Our Solar System comprises several diverse and fascinating planets. Let's explore them below.
|
||||
|
||||
## Sun
|
||||
|
||||
The Sun is the central star of the solar system, holding all planets and other objects in space through gravitational force.
|
||||
|
||||
## Mercury
|
||||
|
||||
Mercury is the closest planet to the Sun and also the smallest in the solar system.
|
||||
|
||||
## Venus
|
||||
|
||||
Venus is a planet similar in size and structure to Earth but has a thick atmosphere and high temperatures.
|
||||
|
||||
## Earth
|
||||
|
||||
Earth is the only known planet with life. It has water and an atmosphere that supports living organisms.
|
||||
|
||||
## Mars
|
||||
|
||||
Mars is known for its red appearance. Research indicates the possibility of water in liquid and ice forms.
|
||||
|
||||
## Jupiter
|
||||
|
||||
Jupiter is the largest planet in the solar system and has a complex system of natural satellites and a prominent ring system.
|
||||
|
||||
## Saturn
|
||||
|
||||
Saturn is famous for its beautiful atmospheric rings and has multiple ring systems.
|
||||
|
||||
## Uranus
|
||||
|
||||
Uranus rotates on its side, creating a unique appearance in the solar system.
|
||||
|
||||
## Neptune
|
||||
|
||||
Neptune, the last large planet in the solar system, has an atmosphere rich in methane gas.
|
||||
|
||||
# Conclusion
|
||||
|
||||
The planets in the solar system form a complex and diverse system. Each planet has unique and interesting characteristics, making the solar system an attractive subject for research and exploration.
|
||||
Binary file not shown.
@@ -0,0 +1,61 @@
|
||||
## Reader Examples
|
||||
|
||||
These examples show how to use a specific reader class by loading a document and running a test query.
|
||||
|
||||
1. Make sure you are in `examples` directory
|
||||
|
||||
```bash
|
||||
cd ./examples
|
||||
```
|
||||
|
||||
2. Prepare `OPENAI_API_KEY` environment variable:
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY=your_openai_api_key
|
||||
```
|
||||
|
||||
3. Run the following command to load documents and test query:
|
||||
|
||||
- MarkdownReader Example
|
||||
|
||||
```bash
|
||||
npx ts-node readers/load-md.ts
|
||||
```
|
||||
|
||||
- DocxReader Example
|
||||
|
||||
```bash
|
||||
npx ts-node readers/load-docx.ts
|
||||
```
|
||||
|
||||
- PdfReader Example
|
||||
|
||||
```bash
|
||||
npx ts-node readers/load-pdf.ts
|
||||
```
|
||||
|
||||
- HtmlReader Example
|
||||
|
||||
```bash
|
||||
npx ts-node readers/load-html.ts
|
||||
```
|
||||
|
||||
- CsvReader Example
|
||||
|
||||
```bash
|
||||
npx ts-node readers/load-csv.ts
|
||||
```
|
||||
|
||||
- NotionReader Example
|
||||
|
||||
```bash
|
||||
export NOTION_TOKEN=your_notion_token
|
||||
npx ts-node readers/load-notion.ts
|
||||
```
|
||||
|
||||
- AssemblyAI Example
|
||||
|
||||
```bash
|
||||
export ASSEMBLYAI_API_KEY=your_assemblyai_api_key
|
||||
npx ts-node readers/load-assemblyai.ts
|
||||
```
|
||||
@@ -0,0 +1,22 @@
|
||||
import { DocxReader, VectorStoreIndex } from "llamaindex";
|
||||
|
||||
const FILE_PATH = "./data/stars.docx";
|
||||
const SAMPLE_QUERY = "Information about Zodiac";
|
||||
|
||||
async function main() {
|
||||
// Load docx file
|
||||
console.log("Loading data...");
|
||||
const reader = new DocxReader();
|
||||
const documents = await reader.loadData(FILE_PATH);
|
||||
|
||||
// Create embeddings
|
||||
console.log("Creating embeddings...");
|
||||
const index = await VectorStoreIndex.fromDocuments(documents);
|
||||
|
||||
// Test query
|
||||
const queryEngine = index.asQueryEngine();
|
||||
const response = await queryEngine.query(SAMPLE_QUERY);
|
||||
console.log(`Test query > ${SAMPLE_QUERY}:\n`, response.toString());
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -0,0 +1,22 @@
|
||||
import { MarkdownReader, VectorStoreIndex } from "llamaindex";
|
||||
|
||||
const FILE_PATH = "./data/planets.md";
|
||||
const SAMPLE_QUERY = "List all planets";
|
||||
|
||||
async function main() {
|
||||
// Load markdown file
|
||||
console.log("Loading data...");
|
||||
const reader = new MarkdownReader();
|
||||
const documents = await reader.loadData(FILE_PATH);
|
||||
|
||||
// Create embeddings
|
||||
console.log("Creating embeddings...");
|
||||
const index = await VectorStoreIndex.fromDocuments(documents);
|
||||
|
||||
// Test query
|
||||
const queryEngine = index.asQueryEngine();
|
||||
const response = await queryEngine.query(SAMPLE_QUERY);
|
||||
console.log(`Test query > ${SAMPLE_QUERY}:\n`, response.toString());
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -1,5 +1,11 @@
|
||||
# llamaindex
|
||||
|
||||
## 0.0.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix performance issue parsing nodes: use regex to split texts
|
||||
|
||||
## 0.0.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "llamaindex",
|
||||
"version": "0.0.42",
|
||||
"version": "0.0.43",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "^0.9.1",
|
||||
@@ -10,7 +10,6 @@
|
||||
"@pinecone-database/pinecone": "^1.1.2",
|
||||
"@xenova/transformers": "^2.10.0",
|
||||
"assemblyai": "^4.0.0",
|
||||
"compromise": "^14.10.1",
|
||||
"file-type": "^18.7.0",
|
||||
"js-tiktoken": "^1.0.8",
|
||||
"lodash": "^4.17.21",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import nlp from "compromise";
|
||||
import { EOL } from "node:os";
|
||||
// GitHub translated
|
||||
import { globalsHelper } from "./GlobalsHelper";
|
||||
@@ -19,11 +18,17 @@ class TextSplit {
|
||||
|
||||
type SplitRep = { text: string; numTokens: number };
|
||||
|
||||
const defaultregex = /[.?!][\])'"`’”]*(?:\s|$)/g;
|
||||
export const defaultSentenceTokenizer = (text: string): string[] => {
|
||||
return nlp(text)
|
||||
.sentences()
|
||||
.json()
|
||||
.map((sentence: any) => sentence.text);
|
||||
const slist = [];
|
||||
const iter = text.matchAll(defaultregex);
|
||||
let lastIdx = 0;
|
||||
for (const match of iter) {
|
||||
slist.push(text.slice(lastIdx, match.index! + 1));
|
||||
lastIdx = match.index! + 1;
|
||||
}
|
||||
slist.push(text.slice(lastIdx));
|
||||
return slist.filter((s) => s.length > 0);
|
||||
};
|
||||
|
||||
// Refs: https://github.com/fxsjy/jieba/issues/575#issuecomment-359637511
|
||||
|
||||
@@ -21,6 +21,7 @@ export * from "./nodeParsers";
|
||||
export * from "./postprocessors";
|
||||
export * from "./readers/AssemblyAI";
|
||||
export * from "./readers/CSVReader";
|
||||
export * from "./readers/DocxReader";
|
||||
export * from "./readers/HTMLReader";
|
||||
export * from "./readers/MarkdownReader";
|
||||
export * from "./readers/NotionReader";
|
||||
|
||||
@@ -7,7 +7,9 @@ describe("SentenceSplitter", () => {
|
||||
});
|
||||
|
||||
test("splits paragraphs w/o effective chunk size", () => {
|
||||
const sentenceSplitter = new SentenceSplitter({});
|
||||
const sentenceSplitter = new SentenceSplitter({
|
||||
paragraphSeparator: "\n\n\n",
|
||||
});
|
||||
// generate the same line as above but correct syntax errors
|
||||
let splits = sentenceSplitter.getParagraphSplits(
|
||||
"This is a paragraph.\n\n\nThis is another paragraph.",
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import { DocxReader } from "../../readers/DocxReader";
|
||||
|
||||
describe("DocxReader", () => {
|
||||
let docxReader: DocxReader;
|
||||
|
||||
beforeEach(() => {
|
||||
docxReader = new DocxReader();
|
||||
});
|
||||
|
||||
describe("loadData", () => {
|
||||
it("should load data from a docx file, return an array of documents and contain text", async () => {
|
||||
const filePath = "../../examples/data/stars.docx";
|
||||
const docs = await docxReader.loadData(filePath);
|
||||
const docContent = docs.map((doc) => doc.text).join("");
|
||||
|
||||
expect(docs).toBeInstanceOf(Array);
|
||||
expect(docContent).toContain("Venturing into the zodiac");
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,20 @@
|
||||
import { MarkdownReader } from "../../readers/MarkdownReader";
|
||||
|
||||
describe("MarkdownReader", () => {
|
||||
let markdownReader: MarkdownReader;
|
||||
|
||||
beforeEach(() => {
|
||||
markdownReader = new MarkdownReader();
|
||||
});
|
||||
|
||||
describe("loadData", () => {
|
||||
it("should load data from a markdown file, return an array of documents and contain text", async () => {
|
||||
const filePath = "../../examples/data/planets.md";
|
||||
const docs = await markdownReader.loadData(filePath);
|
||||
const docContent = docs.map((doc) => doc.text).join("");
|
||||
|
||||
expect(docs).toBeInstanceOf(Array);
|
||||
expect(docContent).toContain("Solar System");
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
DATA_DIR = "data" # directory containing the documents to index
|
||||
CHUNK_SIZE = 1024
|
||||
CHUNK_OVERLAP = 20
|
||||
PGVECTOR_SCHEMA = "public"
|
||||
PGVECTOR_TABLE = "llamaindex_embedding"
|
||||
@@ -0,0 +1,14 @@
|
||||
from llama_index import ServiceContext
|
||||
|
||||
from app.context import create_base_context
|
||||
from app.engine.constants import CHUNK_SIZE, CHUNK_OVERLAP
|
||||
|
||||
|
||||
def create_service_context():
|
||||
base = create_base_context()
|
||||
return ServiceContext.from_defaults(
|
||||
llm=base.llm,
|
||||
embed_model=base.embed_model,
|
||||
chunk_size=CHUNK_SIZE,
|
||||
chunk_overlap=CHUNK_OVERLAP,
|
||||
)
|
||||
@@ -0,0 +1,38 @@
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
import logging
|
||||
|
||||
from app.engine.constants import DATA_DIR
|
||||
from app.engine.context import create_service_context
|
||||
from app.engine.utils import init_pg_vector_store_from_env
|
||||
|
||||
from llama_index import (
|
||||
SimpleDirectoryReader,
|
||||
VectorStoreIndex,
|
||||
StorageContext,
|
||||
)
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
def generate_datasource(service_context):
|
||||
logger.info("Creating new index")
|
||||
# load the documents and create the index
|
||||
documents = SimpleDirectoryReader(DATA_DIR).load_data()
|
||||
store = init_pg_vector_store_from_env()
|
||||
storage_context = StorageContext.from_defaults(vector_store=store)
|
||||
VectorStoreIndex.from_documents(
|
||||
documents,
|
||||
service_context=service_context,
|
||||
storage_context=storage_context,
|
||||
show_progress=True, # this will show you a progress bar as the embeddings are created
|
||||
)
|
||||
logger.info(
|
||||
f"Successfully created embeddings in the PG vector store, schema={store.schema_name} table={store.table_name}"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
generate_datasource(create_service_context())
|
||||
@@ -0,0 +1,16 @@
|
||||
import logging
|
||||
from llama_index import (
|
||||
VectorStoreIndex,
|
||||
)
|
||||
from app.engine.context import create_service_context
|
||||
from app.engine.utils import init_pg_vector_store_from_env
|
||||
|
||||
|
||||
def get_chat_engine():
|
||||
service_context = create_service_context()
|
||||
logger = logging.getLogger("uvicorn")
|
||||
logger.info("Connecting to index from PGVector...")
|
||||
store = init_pg_vector_store_from_env()
|
||||
index = VectorStoreIndex.from_vector_store(store, service_context)
|
||||
logger.info("Finished connecting to index from PGVector.")
|
||||
return index.as_chat_engine(similarity_top_k=5)
|
||||
@@ -0,0 +1,23 @@
|
||||
import os
|
||||
from llama_index.vector_stores import PGVectorStore
|
||||
from urllib.parse import urlparse
|
||||
from app.engine.constants import PGVECTOR_SCHEMA, PGVECTOR_TABLE
|
||||
|
||||
|
||||
def init_pg_vector_store_from_env():
|
||||
original_conn_string = os.environ.get("PG_CONNECTION_STRING")
|
||||
if original_conn_string is None:
|
||||
raise ValueError("PG_CONNECTION_STRING environment variable is not set.")
|
||||
|
||||
# The PGVectorStore requires both two connection strings, one for psycopg2 and one for asyncpg
|
||||
# Update the configured scheme with the psycopg2 and asyncpg schemes
|
||||
original_scheme = urlparse(original_conn_string).scheme + "://"
|
||||
conn_string = original_conn_string.replace(original_scheme, "postgresql+psycopg2://")
|
||||
async_conn_string = original_conn_string.replace(original_scheme, "postgresql+asyncpg://")
|
||||
|
||||
return PGVectorStore(
|
||||
connection_string=conn_string,
|
||||
async_connection_string=async_conn_string,
|
||||
schema_name=PGVECTOR_SCHEMA,
|
||||
table_name=PGVECTOR_TABLE
|
||||
)
|
||||
@@ -7,7 +7,8 @@ import { InstallTemplateArgs, TemplateVectorDB } from "./types";
|
||||
|
||||
interface Dependency {
|
||||
name: string;
|
||||
version: string;
|
||||
version?: string;
|
||||
extras?: string[];
|
||||
}
|
||||
|
||||
const getAdditionalDependencies = (vectorDb?: TemplateVectorDB) => {
|
||||
@@ -21,12 +22,43 @@ const getAdditionalDependencies = (vectorDb?: TemplateVectorDB) => {
|
||||
});
|
||||
break;
|
||||
}
|
||||
case "pg": {
|
||||
dependencies.push({
|
||||
name: "llama-index",
|
||||
extras: ["postgres"],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return dependencies;
|
||||
};
|
||||
|
||||
const addDependencies = async (
|
||||
const mergePoetryDependencies = (
|
||||
dependencies: Dependency[],
|
||||
existingDependencies: any,
|
||||
) => {
|
||||
for (const dependency of dependencies) {
|
||||
let value = existingDependencies[dependency.name] ?? {};
|
||||
|
||||
// default string value is equal to attribute "version"
|
||||
if (typeof value === "string") {
|
||||
value = { version: value };
|
||||
}
|
||||
|
||||
value.version = dependency.version ?? value.version;
|
||||
value.extras = dependency.extras ?? value.extras;
|
||||
|
||||
if (value.version === undefined) {
|
||||
throw new Error(
|
||||
`Dependency "${dependency.name}" is missing attribute "version"!`,
|
||||
);
|
||||
}
|
||||
|
||||
existingDependencies[dependency.name] = value;
|
||||
}
|
||||
};
|
||||
|
||||
export const addDependencies = async (
|
||||
projectDir: string,
|
||||
dependencies: Dependency[],
|
||||
) => {
|
||||
@@ -42,9 +74,7 @@ const addDependencies = async (
|
||||
// Modify toml dependencies
|
||||
const tool = fileParsed.tool as any;
|
||||
const existingDependencies = tool.poetry.dependencies as any;
|
||||
for (const dependency of dependencies) {
|
||||
existingDependencies[dependency.name] = dependency.version;
|
||||
}
|
||||
mergePoetryDependencies(dependencies, existingDependencies);
|
||||
|
||||
// Write toml file
|
||||
const newFileContent = stringify(fileParsed);
|
||||
|
||||
@@ -50,7 +50,7 @@ async def chat(
|
||||
]
|
||||
|
||||
# query chat engine
|
||||
response = chat_engine.chat(lastMessage.content, messages)
|
||||
response = await chat_engine.achat(lastMessage.content, messages)
|
||||
return _Result(
|
||||
result=_Message(role=MessageRole.ASSISTANT, content=response.response)
|
||||
)
|
||||
|
||||
@@ -49,11 +49,11 @@ async def chat(
|
||||
]
|
||||
|
||||
# query chat engine
|
||||
response = chat_engine.stream_chat(lastMessage.content, messages)
|
||||
response = await chat_engine.astream_chat(lastMessage.content, messages)
|
||||
|
||||
# stream response
|
||||
async def event_generator():
|
||||
for token in response.response_gen:
|
||||
async for token in response.async_response_gen():
|
||||
# If client closes connection, stop sending events
|
||||
if await request.is_disconnected():
|
||||
break
|
||||
|
||||
Generated
+55
-42
@@ -17,7 +17,7 @@ importers:
|
||||
version: 2.27.1
|
||||
'@turbo/gen':
|
||||
specifier: ^1.11.2
|
||||
version: 1.11.2(@types/node@20.10.6)(typescript@5.3.3)
|
||||
version: 1.11.2(@types/node@18.19.2)(typescript@5.3.3)
|
||||
'@types/jest':
|
||||
specifier: ^29.5.11
|
||||
version: 29.5.11
|
||||
@@ -32,7 +32,7 @@ importers:
|
||||
version: 8.0.3
|
||||
jest:
|
||||
specifier: ^29.7.0
|
||||
version: 29.7.0(@types/node@20.10.6)
|
||||
version: 29.7.0(@types/node@18.19.2)
|
||||
lint-staged:
|
||||
specifier: ^15.2.0
|
||||
version: 15.2.0
|
||||
@@ -158,9 +158,6 @@ importers:
|
||||
assemblyai:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
compromise:
|
||||
specifier: ^14.10.1
|
||||
version: 14.10.1
|
||||
file-type:
|
||||
specifier: ^18.7.0
|
||||
version: 18.7.0
|
||||
@@ -4315,7 +4312,7 @@ packages:
|
||||
resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==}
|
||||
dev: true
|
||||
|
||||
/@turbo/gen@1.11.2(@types/node@20.10.6)(typescript@5.3.3):
|
||||
/@turbo/gen@1.11.2(@types/node@18.19.2)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-zV4vwedEujiAcACPnFXnKat8IqDo0EVJpMbS3W5CiokUBv35vw5PjldjqKcdh0GIiUTlriWGwRU6FZ8pzBg+kg==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
@@ -4327,7 +4324,7 @@ packages:
|
||||
minimatch: 9.0.3
|
||||
node-plop: 0.26.3
|
||||
proxy-agent: 6.3.1
|
||||
ts-node: 10.9.2(@types/node@20.10.6)(typescript@5.3.3)
|
||||
ts-node: 10.9.2(@types/node@18.19.2)(typescript@5.3.3)
|
||||
update-check: 1.5.4
|
||||
validate-npm-package-name: 5.0.0
|
||||
transitivePeerDependencies:
|
||||
@@ -6491,7 +6488,6 @@ packages:
|
||||
|
||||
/commander@2.20.0:
|
||||
resolution: {integrity: sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==}
|
||||
dev: true
|
||||
|
||||
/commander@2.20.3:
|
||||
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
|
||||
@@ -6546,15 +6542,6 @@ packages:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/compromise@14.10.1:
|
||||
resolution: {integrity: sha512-GX91lZfJsma34HHifGlmnoWdu45PreuRFjrccCSAZq+r7Jb0wdKxKZWhyi8OSPvZ0+xk7LclDakUnd/Np57ZRQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dependencies:
|
||||
efrt: 2.7.0
|
||||
grad-school: 0.0.5
|
||||
suffix-thumb: 5.0.2
|
||||
dev: false
|
||||
|
||||
/concat-map@0.0.1:
|
||||
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
|
||||
|
||||
@@ -6760,7 +6747,7 @@ packages:
|
||||
sha.js: 2.4.11
|
||||
dev: true
|
||||
|
||||
/create-jest@29.7.0(@types/node@20.10.6):
|
||||
/create-jest@29.7.0(@types/node@18.19.2):
|
||||
resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
hasBin: true
|
||||
@@ -6769,7 +6756,7 @@ packages:
|
||||
chalk: 4.1.2
|
||||
exit: 0.1.2
|
||||
graceful-fs: 4.2.11
|
||||
jest-config: 29.7.0(@types/node@20.10.6)
|
||||
jest-config: 29.7.0(@types/node@18.19.2)
|
||||
jest-util: 29.7.0
|
||||
prompts: 2.4.2
|
||||
transitivePeerDependencies:
|
||||
@@ -7553,11 +7540,6 @@ packages:
|
||||
resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
|
||||
dev: false
|
||||
|
||||
/efrt@2.7.0:
|
||||
resolution: {integrity: sha512-/RInbCy1d4P6Zdfa+TMVsf/ufZVotat5hCw3QXmWtjU+3pFEOvOQ7ibo3aIxyCJw2leIeAMjmPj+1SLJiCpdrQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dev: false
|
||||
|
||||
/electron-to-chromium@1.4.530:
|
||||
resolution: {integrity: sha512-rsJ9O8SCI4etS8TBsXuRfHa2eZReJhnGf5MHZd3Vo05PukWHKXhk3VQGbHHnDLa8nZz9woPCpLCMQpLGgkGNRA==}
|
||||
dev: false
|
||||
@@ -9113,11 +9095,6 @@ packages:
|
||||
/graceful-fs@4.2.11:
|
||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||
|
||||
/grad-school@0.0.5:
|
||||
resolution: {integrity: sha512-rXunEHF9M9EkMydTBux7+IryYXEZinRk6g8OBOGDBzo/qWJjhTxy86i5q7lQYpCLHN8Sqv1XX3OIOc7ka2gtvQ==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
dev: false
|
||||
|
||||
/gradient-string@2.0.2:
|
||||
resolution: {integrity: sha512-rEDCuqUQ4tbD78TpzsMtt5OIf0cBCSDWSJtUDaF6JsAh+k0v9r++NzxNEG87oDZx9ZwGhD8DaezR2L/yrw0Jdw==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -10251,7 +10228,7 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/jest-cli@29.7.0(@types/node@20.10.6):
|
||||
/jest-cli@29.7.0(@types/node@18.19.2):
|
||||
resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
hasBin: true
|
||||
@@ -10265,10 +10242,10 @@ packages:
|
||||
'@jest/test-result': 29.7.0
|
||||
'@jest/types': 29.6.3
|
||||
chalk: 4.1.2
|
||||
create-jest: 29.7.0(@types/node@20.10.6)
|
||||
create-jest: 29.7.0(@types/node@18.19.2)
|
||||
exit: 0.1.2
|
||||
import-local: 3.1.0
|
||||
jest-config: 29.7.0(@types/node@20.10.6)
|
||||
jest-config: 29.7.0(@types/node@18.19.2)
|
||||
jest-util: 29.7.0
|
||||
jest-validate: 29.7.0
|
||||
yargs: 17.7.2
|
||||
@@ -10279,6 +10256,46 @@ packages:
|
||||
- ts-node
|
||||
dev: true
|
||||
|
||||
/jest-config@29.7.0(@types/node@18.19.2):
|
||||
resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
peerDependencies:
|
||||
'@types/node': '*'
|
||||
ts-node: '>=9.0.0'
|
||||
peerDependenciesMeta:
|
||||
'@types/node':
|
||||
optional: true
|
||||
ts-node:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@babel/core': 7.23.7
|
||||
'@jest/test-sequencer': 29.7.0
|
||||
'@jest/types': 29.6.3
|
||||
'@types/node': 18.19.2
|
||||
babel-jest: 29.7.0(@babel/core@7.23.7)
|
||||
chalk: 4.1.2
|
||||
ci-info: 3.9.0
|
||||
deepmerge: 4.3.1
|
||||
glob: 7.2.3
|
||||
graceful-fs: 4.2.11
|
||||
jest-circus: 29.7.0
|
||||
jest-environment-node: 29.7.0
|
||||
jest-get-type: 29.6.3
|
||||
jest-regex-util: 29.6.3
|
||||
jest-resolve: 29.7.0
|
||||
jest-runner: 29.7.0
|
||||
jest-util: 29.7.0
|
||||
jest-validate: 29.7.0
|
||||
micromatch: 4.0.5
|
||||
parse-json: 5.2.0
|
||||
pretty-format: 29.7.0
|
||||
slash: 3.0.0
|
||||
strip-json-comments: 3.1.1
|
||||
transitivePeerDependencies:
|
||||
- babel-plugin-macros
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/jest-config@29.7.0(@types/node@20.10.6):
|
||||
resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
@@ -10608,7 +10625,7 @@ packages:
|
||||
merge-stream: 2.0.0
|
||||
supports-color: 8.1.1
|
||||
|
||||
/jest@29.7.0(@types/node@20.10.6):
|
||||
/jest@29.7.0(@types/node@18.19.2):
|
||||
resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==}
|
||||
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
|
||||
hasBin: true
|
||||
@@ -10621,7 +10638,7 @@ packages:
|
||||
'@jest/core': 29.7.0
|
||||
'@jest/types': 29.6.3
|
||||
import-local: 3.1.0
|
||||
jest-cli: 29.7.0(@types/node@20.10.6)
|
||||
jest-cli: 29.7.0(@types/node@18.19.2)
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- babel-plugin-macros
|
||||
@@ -14886,10 +14903,6 @@ packages:
|
||||
ts-interface-checker: 0.1.13
|
||||
dev: true
|
||||
|
||||
/suffix-thumb@5.0.2:
|
||||
resolution: {integrity: sha512-I5PWXAFKx3FYnI9a+dQMWNqTxoRt6vdBdb0O+BJ1sxXCWtSoQCusc13E58f+9p4MYx/qCnEMkD5jac6K2j3dgA==}
|
||||
dev: false
|
||||
|
||||
/supports-color@5.5.0:
|
||||
resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -15101,7 +15114,7 @@ packages:
|
||||
dependencies:
|
||||
'@jridgewell/source-map': 0.3.5
|
||||
acorn: 8.11.3
|
||||
commander: 2.20.3
|
||||
commander: 2.20.0
|
||||
source-map-support: 0.5.21
|
||||
dev: false
|
||||
|
||||
@@ -15300,7 +15313,7 @@ packages:
|
||||
'@babel/core': 7.23.7
|
||||
bs-logger: 0.2.6
|
||||
fast-json-stable-stringify: 2.1.0
|
||||
jest: 29.7.0(@types/node@20.10.6)
|
||||
jest: 29.7.0(@types/node@18.19.2)
|
||||
jest-util: 29.7.0
|
||||
json5: 2.2.3
|
||||
lodash.memoize: 4.1.2
|
||||
@@ -15341,7 +15354,7 @@ packages:
|
||||
yn: 3.1.1
|
||||
dev: true
|
||||
|
||||
/ts-node@10.9.2(@types/node@20.10.6)(typescript@5.3.3):
|
||||
/ts-node@10.9.2(@types/node@18.19.2)(typescript@5.3.3):
|
||||
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -15360,7 +15373,7 @@ packages:
|
||||
'@tsconfig/node12': 1.0.11
|
||||
'@tsconfig/node14': 1.0.3
|
||||
'@tsconfig/node16': 1.0.4
|
||||
'@types/node': 20.10.6
|
||||
'@types/node': 18.19.2
|
||||
acorn: 8.11.3
|
||||
acorn-walk: 8.3.1
|
||||
arg: 4.1.3
|
||||
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
# Sweep AI turns bug fixes & feature requests into code changes (https://sweep.dev)
|
||||
# For details on our config file, check out our docs at https://docs.sweep.dev
|
||||
|
||||
# If you use this be sure to frequently sync your default branch(main, master) to dev.
|
||||
branch: "main"
|
||||
# If you want to enable GitHub Actions for Sweep, set this to true.
|
||||
gha_enabled: False
|
||||
# This is the description of your project. It will be used by sweep when creating PRs. You can tell Sweep what's unique about your project, what frameworks you use, or anything else you want.
|
||||
# Here's an example: sweepai/sweep is a python project. The main api endpoints are in sweepai/api.py. Write code that adheres to PEP8.
|
||||
description: "LlamaIndexTS is a data framework in TypeScript for your LLM applications"
|
||||
|
||||
sandbox:
|
||||
install:
|
||||
- npm install -g pnpm
|
||||
- pnpm i
|
||||
- pnpm add --save-dev prettier -w
|
||||
check:
|
||||
- pnpx prettier --write {file_path}
|
||||
- pnpm eslint --fix {file_path}
|
||||
- pnpx ts-node --type-check {file_path}
|
||||
- pnpm test
|
||||
# Default Values: https://github.com/sweepai/sweep/blob/main/sweep.yaml
|
||||
Reference in New Issue
Block a user