Skip to content
Snippets Groups Projects
Unverified Commit 84c28f95 authored by Fabian Wimmer's avatar Fabian Wimmer Committed by GitHub
Browse files

docs: restructure, add API references (#1196)

parent 7af57982
Branches
Tags
No related merge requests found
Showing
with 109 additions and 15 deletions
label: "Agents" label: "Agents"
position: 3 position: 10
--- ---
sidebar_position: 4 sidebar_position: 13
--- ---
# ChatEngine # ChatEngine
......
--- ---
sidebar_position: 4 sidebar_position: 12
--- ---
# Index # Index
...@@ -8,6 +8,7 @@ An index is the basic container and organization for your data. LlamaIndex.TS su ...@@ -8,6 +8,7 @@ An index is the basic container and organization for your data. LlamaIndex.TS su
- `VectorStoreIndex` - will send the top-k `Node`s to the LLM when generating a response. The default top-k is 2. - `VectorStoreIndex` - will send the top-k `Node`s to the LLM when generating a response. The default top-k is 2.
- `SummaryIndex` - will send every `Node` in the index to the LLM in order to generate a response - `SummaryIndex` - will send every `Node` in the index to the LLM in order to generate a response
- `KeywordTableIndex` extracts and provides keywords from `Node`s to the LLM
```typescript ```typescript
import { Document, VectorStoreIndex } from "llamaindex"; import { Document, VectorStoreIndex } from "llamaindex";
......
...@@ -6,6 +6,19 @@ import CodeSource2 from "!raw-loader!../../../../../examples/readers/src/custom- ...@@ -6,6 +6,19 @@ import CodeSource2 from "!raw-loader!../../../../../examples/readers/src/custom-
Before you can start indexing your documents, you need to load them into memory. Before you can start indexing your documents, you need to load them into memory.
All "basic" data loaders can be seen below, mapped to their respective filetypes in `SimpleDirectoryReader`. More loaders are shown in the sidebar on the left.
Additionally the following loaders exist without separate documentation:
- `AssemblyAIReader` transcribes audio using [AssemblyAI](https://www.assemblyai.com/).
- [AudioTranscriptReader](../../api/classes/AudioTranscriptReader.md): loads entire transcript as a single document.
- [AudioTranscriptParagraphsReader](../../api/classes/AudioTranscriptParagraphsReader.md): creates a document per paragraph.
- [AudioTranscriptSentencesReader](../../api/classes/AudioTranscriptSentencesReader.md): creates a document per sentence.
- [AudioSubtitlesReader](../../api/classes/AudioTranscriptParagraphsReader.md): creates a document containing the subtitles of a transcript.
- [NotionReader](../../api/classes/NotionReader.md) loads [Notion](https://www.notion.so/) pages.
- [SimpleMongoReader](../../api/classes/SimpleMongoReader) loads data from a [MongoDB](https://www.mongodb.com/).
Check the [LlamaIndexTS Github](https://github.com/run-llama/LlamaIndexTS) for the most up to date overview of integrations.
## SimpleDirectoryReader ## SimpleDirectoryReader
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/run-llama/LlamaIndexTS/tree/main/examples/readers?file=src/simple-directory-reader.ts&title=Simple%20Directory%20Reader) [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/run-llama/LlamaIndexTS/tree/main/examples/readers?file=src/simple-directory-reader.ts&title=Simple%20Directory%20Reader)
......
label: "Data Stores"
position: 2
label: "Chat Stores"
# Chat Stores
Chat stores manage chat history by storing sequences of messages in a structured way, ensuring the order of messages is maintained for accurate conversation flow.
## Available Chat Stores
- [SimpleChatStore](../../../api/classes/SimpleChatStore.md): A simple in-memory chat store with support for [persisting](../index.md#local-storage) data to disk.
Check the [LlamaIndexTS Github](https://github.com/run-llama/LlamaIndexTS) for the most up to date overview of integrations.
## API Reference
- [BaseChatStore](../../../api/interfaces/BaseChatStore.md)
label: "Document Stores"
position: 2
# Document Stores
Document stores contain ingested document chunks, i.e. [Node](../../documents_and_nodes/index.md)s.
## Available Document Stores
- [SimpleDocumentStore](../../../api/classes/SimpleDocumentStore.md): A simple in-memory document store with support for [persisting](../index.md#local-storage) data to disk.
- [PostgresDocumentStore](../../../api/classes/PostgresDocumentStore.md): A PostgreSQL document store, see [PostgreSQL Storage](../index.md#postgresql-storage).
Check the [LlamaIndexTS Github](https://github.com/run-llama/LlamaIndexTS) for the most up to date overview of integrations.
## API Reference
- [BaseDocumentStore](../../../api/classes/BaseDocumentStore.md)
---
sidebar_position: 7
---
# Storage # Storage
Storage in LlamaIndex.TS works automatically once you've configured a Storage in LlamaIndex.TS works automatically once you've configured a
...@@ -57,4 +53,4 @@ const index = await VectorStoreIndex.fromDocuments([document], { ...@@ -57,4 +53,4 @@ const index = await VectorStoreIndex.fromDocuments([document], {
## API Reference ## API Reference
- [StorageContext](../api/interfaces/StorageContext.md) - [StorageContext](../../api/interfaces/StorageContext.md)
label: "Index Stores"
position: 3
# Index Stores
Index stores are underlying storage components that contain metadata(i.e. information created when indexing) about the [index](../../data_index.md) itself.
## Available Index Stores
- [SimpleIndexStore](../../../api/classes/SimpleIndexStore.md): A simple in-memory index store with support for [persisting](../index.md#local-storage) data to disk.
- [PostgresIndexStore](../../../api/classes/PostgresIndexStore.md): A PostgreSQL index store, , see [PostgreSQL Storage](../index.md#postgresql-storage).
Check the [LlamaIndexTS Github](https://github.com/run-llama/LlamaIndexTS) for the most up to date overview of integrations.
## API Reference
- [BaseIndexStore](../../../api/classes/BaseIndexStore.md)
label: "Key-Value Stores"
position: 4
# Key-Value Stores
Key-Value Stores represent underlying storage components used in [Document Stores](../doc_stores/index.md) and [Index Stores](../index_stores/index.md)
## Available Key-Value Stores
- [SimpleKVStore](../../../api/classes/SimpleKVStore.md): A simple Key-Value store with support of [persisting](../index.md#local-storage) data to disk.
- [PostgresKVStore](../../../api/classes/PostgresKVStore.md): A PostgreSQL Key-Value store, see [PostgreSQL Storage](../index.md#postgresql-storage).
Check the [LlamaIndexTS Github](https://github.com/run-llama/LlamaIndexTS) for the most up to date overview of integrations.
## API Reference
- [BaseKVStore](../../../api/classes/BaseKVStore.md)
# Vector Stores
Vector stores save embedding vectors of your ingested document chunks.
## Available Vector Stores
Available Vector Stores are shown on the sidebar to the left. Additionally the following integrations exist without separate documentation:
- [SimpleVectorStore](../../../api/classes/SimpleVectorStore.md): A simple in-memory vector store with optional [persistance](../index.md#local-storage) to disk.
- [AstraDBVectorStore](../../../api/classes/AstraDBVectorStore.md): A cloud-native, scalable Database-as-a-Service built on Apache Cassandra, see [datastax.com](https://www.datastax.com/products/datastax-astra)
- [ChromaVectorStore](../../../api/classes/ChromaVectorStore.md): An open-source vector database, focused on ease of use and performance, see [trychroma.com](https://www.trychroma.com/)
- [MilvusVectorStore](../../../api/classes/MilvusVectorStore.md): An open-source, high-performance, highly scalable vector database, see [milvus.io](https://milvus.io/)
- [MongoDBAtlasVectorSearch](../../../api/classes/MongoDBAtlasVectorSearch.md): A cloud-based vector search solution for MongoDB, see [mongodb.com](https://www.mongodb.com/products/platform/atlas-vector-search)
- [PGVectorStore](../../../api/classes/PGVectorStore.md): An open-source vector store built on PostgreSQL, see [pgvector Github](https://github.com/pgvector/pgvector)
- [PineconeVectorStore](../../../api/classes/PineconeVectorStore.md): A managed, cloud-native vector database, see [pinecone.io](https://www.pinecone.io/)
- [WeaviateVectorStore](../../../api/classes/WeaviateVectorStore.md): An open-source, ai-native vector database, see [weaviate.io](https://weaviate.io/)
Check the [LlamaIndexTS Github](https://github.com/run-llama/LlamaIndexTS) for the most up to date overview of integrations.
## API Reference
- [VectorStoreBase](../../../api/classes/VectorStoreBase.md)
# Qdrant Vector Store # Qdrant Vector Store
[qdrant.tech](https://qdrant.tech/)
To run this example, you need to have a Qdrant instance running. You can run it with Docker: To run this example, you need to have a Qdrant instance running. You can run it with Docker:
```bash ```bash
...@@ -87,4 +89,4 @@ main().catch(console.error); ...@@ -87,4 +89,4 @@ main().catch(console.error);
## API Reference ## API Reference
- [QdrantVectorStore](../../api/classes/QdrantVectorStore.md) - [QdrantVectorStore](../../../api/classes/QdrantVectorStore.md)
---
sidebar_position: 1
---
# Documents and Nodes # Documents and Nodes
`Document`s and `Node`s are the basic building blocks of any index. While the API for these objects is similar, `Document` objects represent entire files, while `Node`s are smaller pieces of that original document, that are suitable for an LLM and Q&A. `Document`s and `Node`s are the basic building blocks of any index. While the API for these objects is similar, `Document` objects represent entire files, while `Node`s are smaller pieces of that original document, that are suitable for an LLM and Q&A.
......
label: "Embeddings" label: "Embeddings"
position: 3 position: 6
...@@ -7,7 +7,7 @@ To find out more about the latest features, updates, and available models, visit ...@@ -7,7 +7,7 @@ To find out more about the latest features, updates, and available models, visit
## Table of Contents ## Table of Contents
1. [Setup](#setup) 1. [Setup](#setup)
2. [Usage with LlamaIndex](#integration-with-llamaindex) 2. [Usage with LlamaIndex](#usage-with-llamaindex)
3. [Embeddings with Custom Parameters](#embeddings-with-custom-parameters) 3. [Embeddings with Custom Parameters](#embeddings-with-custom-parameters)
## Setup ## Setup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment