Compare commits

...

45 Commits

Author SHA1 Message Date
github-actions[bot] 9a27b6d94a Release 0.9.15 (#1807)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: marcusschiesser <17126+marcusschiesser@users.noreply.github.com>
2025-04-02 17:08:47 +07:00
Thuc Pham 8c02684f0f fix: handle error when streaming workflow (#1808) 2025-04-02 16:26:01 +07:00
ANKIT VARSHNEY 9c63f3f94e feat: openai responses api (#1801) 2025-04-02 16:21:43 +07:00
Thuc Pham c515a324f6 feat: return raw output for agent toolcall result (#1806) 2025-04-01 22:20:06 +07:00
github-actions[bot] c70d7b9930 Release 0.9.14 (#1799)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: marcusschiesser <17126+marcusschiesser@users.noreply.github.com>
2025-04-01 12:59:10 +02:00
Marcus Schiesser 1b6f368a3f feat: Support loading from URLs for all readers extending FileReader (#1805) 2025-04-01 17:39:59 +07:00
Thuc Pham 9d951b288f feat: support llamacloud in @llamaindex/server (#1796) 2025-04-01 17:39:39 +07:00
dependabot[bot] 5fe16697a2 chore(deps-dev): bump vite from 5.4.15 to 5.4.16 (#1804)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-01 16:49:36 +07:00
Marcus Schiesser 189d8a83ac chore: use node 20 for examples (#1803) 2025-03-31 17:21:19 +07:00
ANKIT VARSHNEY 648cfb5cb5 feat: supbase vector store (#1790) 2025-03-29 15:14:28 +07:00
Marcus Schiesser eaf326ee90 fix: passing right llm setting from SimpleChatEngine to ChatMemoryBuffer (#1798) 2025-03-28 18:20:52 +07:00
github-actions[bot] fc1bedf438 Release (#1794)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-28 15:22:44 +07:00
Thuc Pham 164cf7a6df fix: custom next server start fail (#1795) 2025-03-28 15:09:57 +07:00
Zhanghao e98033e2cc docs: correct the number of indexes (#1793) 2025-03-27 16:33:52 +02:00
dependabot[bot] c0ffc7b434 chore(deps-dev): bump vite from 5.4.14 to 5.4.15 (#1787)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-26 20:43:49 +07:00
github-actions[bot] 9cf88e9f3f Release 0.9.13 (#1783)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-26 10:31:29 +02:00
Thuc Pham 75d6e29187 feat: response source nodes in query tool output (#1784) 2025-03-26 15:24:53 +07:00
Parham Saidi 132517877e fix: stringify all tool results for anthropic on bedrock (#1786) 2025-03-25 21:16:44 +07:00
Thuc Pham 299008b34f feat: copy create-llama to @llamaindex/servers (#1780) 2025-03-25 11:55:44 +02:00
Thuc Pham 482ed67690 fix: document deployment fail due to static generation timed out (#1779) 2025-03-24 11:12:09 +02:00
github-actions[bot] 9aeec9089b Release 0.9.12 (#1744)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: marcusschiesser <17126+marcusschiesser@users.noreply.github.com>
2025-03-24 14:34:45 +07:00
Daniel Bank f1db9b3d48 feat: vercel tool response fields options (#1765) 2025-03-24 14:25:26 +07:00
ANKIT VARSHNEY 25093531cf feat: elastic search vector store (#1777) 2025-03-24 14:18:42 +07:00
Thuc Pham f8a86e4eff feat: @llamaindex/server (#1759) 2025-03-21 19:14:19 +07:00
ANKIT VARSHNEY 04f8c96caa feat: add support for mongodb document store (#1771) 2025-03-21 16:16:49 +07:00
Jorge Luis Middleton 43053f9e16 Update qdrant.mdx documentation (#1770) 2025-03-21 10:06:25 +02:00
Parham Saidi 93bc0ffd21 fix: context engine additional options not being passed (#1772) 2025-03-21 01:49:43 +07:00
Huu Le 58a9446220 Fix wrong multi-agent setup (#1767) 2025-03-20 14:55:25 +03:00
Parham Saidi da06e4550b fix: include inline data check for GoogleStudio (#1769) 2025-03-20 14:50:47 +03:00
Parham Saidi 3fd4cc383e feat: google multimodal output using their new gen ai library (#1762) 2025-03-19 21:43:39 +02:00
ANKIT VARSHNEY 2b39ceffa6 docs: doc for structured output (#1761) 2025-03-19 14:15:11 +07:00
Thuc Pham 77e24cec65 fix: crypto is not defined when running on node18 (#1763) 2025-03-19 08:38:16 +02:00
ANKIT VARSHNEY 2a0a899d66 chore: added saftey setting as parameter for gemini (#1760) 2025-03-18 23:05:47 +07:00
ANKIT VARSHNEY 050cd53450 fix: delete by id in pinecone vector store (#1758) 2025-03-18 23:03:42 +07:00
George He 5189b446f4 fix: add retry handling logic to parser reader and fix lint issues (#1757)
Co-authored-by: Alex Yang <himself65@outlook.com>
2025-03-17 14:50:38 -07:00
Thuc Pham c7ff3233fe feat: @llamaindex/tools (#1755) 2025-03-17 21:20:24 +07:00
Jack Qian 21bebfcaa6 docs: add missing links (#1754) 2025-03-16 13:32:19 +07:00
ANKIT VARSHNEY 91a18e7057 feat: add support for structured output with zod schema. (#1749) 2025-03-16 11:58:28 +08:00
ANKIT VARSHNEY d1c1f99e06 feat: function calling support in mistral provider (#1756) 2025-03-15 12:18:36 +07:00
Marcus Schiesser 8be84aeb5e chore: add gemini streaming example (#782) 2025-03-14 09:25:09 +07:00
Thuc Pham 5b7b314b25 fix: unhandled server error when accessing not found pages (#1753) 2025-03-13 18:31:55 +07:00
Marcus Schiesser 4a51c9b48e docs: add link checker and fix links (#1750) 2025-03-13 15:46:05 +07:00
Alex Yang bf56fc08ad chore(cloud): update openapi.json (#1746) 2025-03-12 15:19:40 +00:00
Marcus Schiesser fa40b36516 docs: cleanup (#1745) 2025-03-12 17:54:20 +07:00
yangqiao da8068e9e0 fix: Add fromConnectionString method for Azure vCore storages (#1743)
Co-authored-by: yangqiao <yangqiao@microsoft.com>
2025-03-12 15:58:30 +07:00
388 changed files with 16278 additions and 1692 deletions
+70
View File
@@ -1,5 +1,75 @@
# @llamaindex/doc
## 0.2.4
### Patch Changes
- 9c63f3f: Add support for openai responses api
- Updated dependencies [9c63f3f]
- Updated dependencies [c515a32]
- @llamaindex/openai@0.3.0
- @llamaindex/core@0.6.2
- @llamaindex/workflow@1.0.2
- llamaindex@0.9.15
- @llamaindex/cloud@4.0.2
- @llamaindex/node-parser@2.0.2
- @llamaindex/readers@3.0.2
## 0.2.3
### Patch Changes
- 648cfb5: Add support for supabase vector store
Added doc for the supbase vector store
- Updated dependencies [1b6f368]
- Updated dependencies [eaf326e]
- Updated dependencies [9d951b2]
- @llamaindex/core@0.6.1
- llamaindex@0.9.14
- @llamaindex/cloud@4.0.1
- @llamaindex/node-parser@2.0.1
- @llamaindex/openai@0.2.1
- @llamaindex/readers@3.0.1
- @llamaindex/workflow@1.0.1
## 0.2.2
### Patch Changes
- e98033e: docs: correct the number of indexes
## 0.2.1
### Patch Changes
- Updated dependencies [75d6e29]
- llamaindex@0.9.13
## 0.2.0
### Minor Changes
- f1db9b3: Adding an options parameter to vercel tool to tailor responses
### Patch Changes
- 21bebfc: Expose more content to fix the issue with unavailable documentation links, and adjust the documentation based on the latest code.
- 2b39cef: Added documentation for structured output in openai and ollama
- Updated dependencies [21bebfc]
- Updated dependencies [93bc0ff]
- Updated dependencies [91a18e7]
- Updated dependencies [bf56fc0]
- Updated dependencies [f8a86e4]
- Updated dependencies [5189b44]
- Updated dependencies [58a9446]
- @llamaindex/readers@3.0.0
- @llamaindex/core@0.6.0
- @llamaindex/openai@0.2.0
- @llamaindex/cloud@4.0.0
- @llamaindex/workflow@1.0.0
- llamaindex@0.9.12
- @llamaindex/node-parser@2.0.0
## 0.1.11
### Patch Changes
+2
View File
@@ -4,6 +4,8 @@ const withMDX = createMDX();
/** @type {import('next').NextConfig} */
const config = {
// default timeout for static generation is 60s, but we need to increase it to 10 minutes due to the large number of document pages
staticPageGenerationTimeout: 600,
reactStrictMode: true,
eslint: {
ignoreDuringBuilds: true,
+4 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/doc",
"version": "0.1.11",
"version": "0.2.4",
"private": true,
"scripts": {
"postinstall": "fumadocs-mdx",
@@ -8,8 +8,9 @@
"build": "next build",
"dev": "next dev",
"start": "next start",
"postbuild": "tsx scripts/post-build.mts",
"build:docs": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" typedoc && tsx scripts/generate-docs.mts"
"postbuild": "tsx scripts/post-build.mts && tsx scripts/validate-links.mts",
"build:docs": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" typedoc && tsx scripts/generate-docs.mts",
"validate-links": "tsx scripts/validate-links.mts"
},
"dependencies": {
"@icons-pack/react-simple-icons": "^10.1.0",
+249
View File
@@ -0,0 +1,249 @@
import glob from "fast-glob";
import fs from "fs";
import matter from "gray-matter";
import path from "path";
const CONTENT_DIR = path.join(process.cwd(), "src/content/docs");
const BUILD_DIR = path.join(process.cwd(), ".next");
// Regular expression to find internal links
// This captures Markdown links [text](/docs/path) and href attributes href="/docs/path"
const INTERNAL_LINK_REGEX = /(?:(?:\]\(|\bhref=["'])\/docs\/([^")]+))/g;
// Regular expression to find relative links
// This captures relative links like [text](./path) or ![alt](../images/image.png)
const RELATIVE_LINK_REGEX = /(?:\]\()(?:\s*)(?:\.\.?)\//g;
interface LinkValidationResult {
file: string;
invalidLinks: Array<{ link: string; line: number }>;
}
interface RelativeLinkResult {
file: string;
relativeLinks: Array<{ line: number; lineContent: string }>;
}
/**
* Get all valid documentation routes from the content directory
*/
async function getValidRoutes(): Promise<Set<string>> {
const mdxFiles = await glob("**/*.mdx", { cwd: CONTENT_DIR });
const routes = new Set<string>();
// Add each MDX file as a valid route
for (const file of mdxFiles) {
// Remove .mdx extension and normalize to route format
let route = file.replace(/\.mdx$/, "");
// Handle index files
if (route.endsWith("/index")) {
route = route.replace(/\/index$/, "");
} else if (route === "index") {
route = "";
}
routes.add(route);
}
return routes;
}
/**
* Extract internal links from a MDX file
*/
function extractLinksFromFile(
filePath: string,
): Array<{ link: string; line: number }> {
const content = fs.readFileSync(filePath, "utf-8");
const { content: mdxContent } = matter(content);
const lines = mdxContent.split("\n");
const links: Array<{ link: string; line: number }> = [];
lines.forEach((line, lineNumber) => {
let match;
while ((match = INTERNAL_LINK_REGEX.exec(line)) !== null) {
if (match[1]) {
links.push({
link: match[1],
line: lineNumber + 1, // 1-based line numbers
});
}
}
});
return links;
}
/**
* Check if a link is an image link
*/
function isImageLink(link: string): boolean {
// Check for image extensions
const imageExtensions = [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp"];
const hasImageExtension = imageExtensions.some((ext) =>
link.toLowerCase().endsWith(ext),
);
// Check for markdown image syntax: ![alt](./path)
const isMarkdownImage = link.trim().startsWith("!");
return hasImageExtension || isMarkdownImage;
}
/**
* Extract relative links from a MDX file
*/
function findRelativeLinksInFile(
filePath: string,
): Array<{ line: number; lineContent: string }> {
const content = fs.readFileSync(filePath, "utf-8");
const { content: mdxContent } = matter(content);
const lines = mdxContent.split("\n");
const relativeLinks: Array<{ line: number; lineContent: string }> = [];
lines.forEach((line, lineNumber) => {
// Check for relative links
if (RELATIVE_LINK_REGEX.test(line)) {
// Reset the regex lastIndex to start from the beginning of the line
RELATIVE_LINK_REGEX.lastIndex = 0;
// Skip image links
if (!isImageLink(line)) {
relativeLinks.push({
line: lineNumber + 1, // 1-based line numbers
lineContent: line.trim(),
});
}
}
});
return relativeLinks;
}
/**
* Validate internal links in all MDX files
*/
/**
* Find relative links in all MDX files
*/
async function findRelativeLinks(): Promise<RelativeLinkResult[]> {
const mdxFiles = await glob("**/*.mdx", { cwd: CONTENT_DIR });
const results: RelativeLinkResult[] = [];
for (const file of mdxFiles) {
const filePath = path.join(CONTENT_DIR, file);
const relativeLinks = findRelativeLinksInFile(filePath);
if (relativeLinks.length > 0) {
results.push({
file,
relativeLinks,
});
}
}
return results;
}
async function validateLinks(): Promise<LinkValidationResult[]> {
const mdxFiles = await glob("**/*.mdx", { cwd: CONTENT_DIR });
const validRoutes = await getValidRoutes();
const results: LinkValidationResult[] = [];
for (const file of mdxFiles) {
const filePath = path.join(CONTENT_DIR, file);
const links = extractLinksFromFile(filePath);
const invalidLinks = links.filter(({ link }) => {
// Check if the link exists in valid routes
// First normalize the link (remove any query string or hash)
const baseLink = link.split("?")[0].split("#")[0];
// Remove the trailing slash if present.
// This works with links like "api/interfaces/MetadataFilter#operator" and "api/interfaces/MetadataFilter/#operator".
const normalizedLink = baseLink.endsWith("/")
? baseLink.slice(0, -1)
: baseLink;
// Remove llamaindex/ prefix if it exists as it's the root of the docs
let routePath = normalizedLink;
if (routePath.startsWith("llamaindex/")) {
routePath = routePath.substring("llamaindex/".length);
}
return !validRoutes.has(normalizedLink) && !validRoutes.has(routePath);
});
if (invalidLinks.length > 0) {
results.push({
file,
invalidLinks,
});
}
}
return results;
}
/**
* Main function to validate links and report errors
*/
async function main() {
console.log("🔍 Validating links in documentation...");
try {
// Check for invalid internal links
const validationResults: LinkValidationResult[] = await validateLinks();
// Check for relative links
const relativeLinksResults = await findRelativeLinks();
let hasErrors = false;
// Report invalid internal links
if (validationResults.length > 0) {
console.error("❌ Found invalid internal links:");
hasErrors = true;
for (const result of validationResults) {
console.error(`\nFile: ${result.file}`);
for (const { link, line } of result.invalidLinks) {
console.error(` - Line ${line}: /docs/${link}`);
}
}
}
// Report relative links
if (relativeLinksResults.length > 0) {
console.error("\n❌ Found relative links (use absolute paths instead):");
hasErrors = true;
for (const result of relativeLinksResults) {
console.error(`\nFile: ${result.file}`);
for (const { line, lineContent } of result.relativeLinks) {
console.error(` - Line ${line}: ${lineContent}`);
}
}
}
if (hasErrors) {
// Exit with error code to fail the build
process.exit(1);
} else {
console.log("✅ All links are valid!");
}
} catch (error) {
console.error("Error validating links:", error);
process.exit(1);
}
}
main().catch((error) => {
console.error("Unhandled error:", error);
process.exit(1);
});
+1 -2
View File
@@ -11,8 +11,6 @@ import {
} from "fumadocs-ui/page";
import { notFound } from "next/navigation";
const { AutoTypeTable } = createTypeTable();
export const revalidate = false;
export default async function Page(props: {
@@ -22,6 +20,7 @@ export default async function Page(props: {
const page = source.getPage(params.slug);
if (!page) notFound();
const { AutoTypeTable } = createTypeTable();
const MDX = page.data.body;
return (
@@ -1,12 +0,0 @@
---
title: Agents
---
A built-in agent that can take decisions and reasoning based on the tools provided to it.
## OpenAI Agent
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!../../../../../../../examples/agent/openai";
<DynamicCodeBlock lang="ts" code={CodeSource} />
@@ -1,28 +0,0 @@
---
title: Gemini Agent
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSourceGemini from "!raw-loader!../../../../../../../examples/gemini/agent.ts";
## Installation
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Tabs groupId="install" items={["npm", "yarn", "pnpm"]} persist>
```shell tab="npm"
npm install llamaindex @llamaindex/google
```
```shell tab="yarn"
yarn add llamaindex @llamaindex/google
```
```shell tab="pnpm"
pnpm add llamaindex @llamaindex/google
```
</Tabs>
## Source
<DynamicCodeBlock lang="ts" code={CodeSourceGemini} />
@@ -1,10 +0,0 @@
---
title: Chat Engine
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!../../../../../../../examples/chatEngine";
Chat Engine is a class that allows you to create a chatbot from a retriever. It is a wrapper around a retriever that allows you to chat with it in a conversational manner.
<DynamicCodeBlock lang="ts" code={CodeSource} />
@@ -1,59 +0,0 @@
---
title: Context-Aware Agent
---
The Context-Aware Agent enhances the capabilities of standard LLM agents by incorporating relevant context from a retriever for each query. This allows the agent to provide more informed and specific responses based on the available information.
## Usage
Here's a simple example of how to use the Context-Aware Agent:
```typescript
import {
Document,
VectorStoreIndex,
} from "llamaindex";
import { OpenAI, OpenAIContextAwareAgent } from "@llamaindex/openai";
async function createContextAwareAgent() {
// Create and index some documents
const documents = [
new Document({
text: "LlamaIndex is a data framework for LLM applications.",
id_: "doc1",
}),
new Document({
text: "The Eiffel Tower is located in Paris, France.",
id_: "doc2",
}),
];
const index = await VectorStoreIndex.fromDocuments(documents);
const retriever = index.asRetriever({ similarityTopK: 1 });
// Create the Context-Aware Agent
const agent = new OpenAIContextAwareAgent({
llm: new OpenAI({ model: "gpt-3.5-turbo" }),
contextRetriever: retriever,
});
// Use the agent to answer queries
const response = await agent.chat({
message: "What is LlamaIndex used for?",
});
console.log("Agent Response:", response.response);
}
createContextAwareAgent().catch(console.error);
```
In this example, the Context-Aware Agent uses the retriever to fetch relevant context for each query, allowing it to provide more accurate and informed responses based on the indexed documents.
## Key Components
- `contextRetriever`: A retriever (e.g., from a VectorStoreIndex) that fetches relevant documents or passages for each query.
## Available Context-Aware Agents
- `OpenAIContextAwareAgent`: A context-aware agent using OpenAI's models.
@@ -1,15 +0,0 @@
{
"title": "Examples",
"pages": [
"more_examples",
"chat_engine",
"vector_index",
"summary_index",
"save_load_index",
"context_aware_agent",
"agent",
"agent_gemini",
"local_llm",
"other_llms"
]
}
@@ -1,66 +0,0 @@
---
title: Using other LLM APIs
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!../../../../../../../examples/mistral";
By default LlamaIndex.TS uses OpenAI's LLMs and embedding models, but we support [lots of other LLMs](../modules/llms) including models from Mistral (Mistral, Mixtral), Anthropic (Claude) and Google (Gemini).
If you don't want to use an API at all you can [run a local model](./local_llm).
This example runs you through the process of setting up a Mistral model:
## Installation
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Tabs groupId="install" items={["npm", "yarn", "pnpm"]} persist>
```shell tab="npm"
npm install llamaindex @llamaindex/mistral
```
```shell tab="yarn"
yarn add llamaindex @llamaindex/mistral
```
```shell tab="pnpm"
pnpm add llamaindex @llamaindex/mistral
```
</Tabs>
## Using another LLM
You can specify what LLM LlamaIndex.TS will use on the `Settings` object, like this:
```typescript
import { MistralAI } from "@llamaindex/mistral";
import { Settings } from "llamaindex";
Settings.llm = new MistralAI({
model: "mistral-tiny",
apiKey: "<YOUR_API_KEY>",
});
```
You can see examples of other APIs we support by checking out "Available LLMs" in the sidebar of our [LLMs section](../modules/llms).
## Using another embedding model
A frequent gotcha when trying to use a different API as your LLM is that LlamaIndex will also by default index and embed your data using OpenAI's embeddings. To completely switch away from OpenAI you will need to set your embedding model as well, for example:
```typescript
import { MistralAIEmbedding } from "@llamaindex/mistral";
import { Settings } from "llamaindex";
Settings.embedModel = new MistralAIEmbedding();
```
We support [many different embeddings](../modules/embeddings).
## Full example
This example uses Mistral's `mistral-tiny` model as the LLM and Mistral for embeddings as well.
<DynamicCodeBlock lang="ts" code={CodeSource} />
@@ -1,8 +0,0 @@
---
title: Save/Load an Index
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!../../../../../../../examples/storageContext";
<DynamicCodeBlock lang="ts" code={CodeSource} />
@@ -1,8 +0,0 @@
---
title: Summary Index
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!../../../../../../../examples/summaryIndex";
<DynamicCodeBlock lang="ts" code={CodeSource} />
@@ -1,8 +0,0 @@
---
title: Vector Index
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!../../../../../../../examples/vectorIndex";
<DynamicCodeBlock lang="ts" code={CodeSource} />
@@ -1,11 +1,7 @@
---
title: Chatbot tutorial
title: Create-Llama
---
Once you've mastered basic [retrieval-augment generation](retrieval_augmented_generation) you may want to create an interface to chat with your data. You can do this step-by-step, but we recommend getting started quickly using `create-llama`.
## Using create-llama
`create-llama` is a powerful but easy to use command-line tool that generates a working, full-stack web application that allows you to chat with your data. You can learn more about it on [the `create-llama` README page](https://www.npmjs.com/package/create-llama).
Run it once and it will ask you a series of questions about the kind of application you want to generate. Then you can customize your application to suit your use-case. To get started, run:
@@ -1,10 +1,10 @@
---
title: See all examples
title: Code examples
---
Our GitHub repository has a wealth of examples to explore and try out. You can check out our [examples folder](https://github.com/run-llama/LlamaIndexTS/tree/main/examples) to see them all at once, or browse the pages in this section for some selected highlights.
## Check out all examples
## Use examples locally
It may be useful to check out all the examples at once so you can try them out locally. To do this into a folder called `my-new-project`, run these commands:
@@ -19,3 +19,14 @@ Then you can run any example in the folder with `tsx`, e.g.:
```bash npm2yarn
npx tsx ./vectorIndex.ts
```
## Try examples online
You can also try the examples online using StackBlitz:
<iframe
className="w-full h-[440px]"
aria-label="LlamaIndex.TS Examples"
aria-description="This is a list of examples for LlamaIndex.TS."
src="https://stackblitz.com/github/run-llama/LlamaIndexTS/tree/main/examples?file=README.md"
/>
@@ -14,7 +14,7 @@ Before you start, make sure you have try LlamaIndex.TS in Node.js to make sure y
<Card
title="Getting Started with LlamaIndex.TS in Node.js"
href="/docs/llamaindex/getting_started/setup/node"
href="/docs/llamaindex/getting_started/frameworks/node"
/>
Also, you need have the basic understanding of <a href='https://developers.cloudflare.com/workers/'><SiCloudflareworkers className="inline mr-2" color="#F38020" />Cloudflare Worker</a>.
@@ -1,5 +1,5 @@
---
title: Choose Framework
title: Frameworks
description: We support multiple JS runtime and frameworks, bundlers.
---
import {
@@ -15,28 +15,28 @@ import {
<>
<SiNodedotjs className="inline" color="#5FA04E" /> Node.js
</>
} href="/docs/llamaindex/getting_started/setup/node" />
} href="/docs/llamaindex/getting_started/frameworks/node" />
<Card title={
<>
<SiTypescript className="inline" color="#3178C6" /> TypeScript
</>
} href="/docs/llamaindex/getting_started/setup/typescript" />
} href="/docs/llamaindex/getting_started/frameworks/typescript" />
<Card title={
<>
<SiVite className='inline' color='#646CFF' /> Vite
</>
} href="/docs/llamaindex/getting_started/setup/vite" />
} href="/docs/llamaindex/getting_started/frameworks/vite" />
<Card
title={
<>
<SiNextdotjs className='inline' /> Next.js (React Server Component)
</>
}
href="/docs/llamaindex/getting_started/setup/next"
href="/docs/llamaindex/getting_started/frameworks/next"
/>
<Card title={
<>
<SiCloudflareworkers className='inline' color='#F38020' /> Cloudflare Workers
</>
} href="/docs/llamaindex/getting_started/setup/cloudflare" />
} href="/docs/llamaindex/getting_started/frameworks/cloudflare" />
</Cards>
@@ -0,0 +1,6 @@
{
"title": "Framework",
"description": "The setup guide",
"defaultOpen": true,
"pages": ["node", "typescript", "next", "vite", "cloudflare"]
}
@@ -7,7 +7,7 @@ Before you start, make sure you have try LlamaIndex.TS in Node.js to make sure y
<Card
title="Getting Started with LlamaIndex.TS in Node.js"
href="/docs/llamaindex/getting_started/setup/node"
href="/docs/llamaindex/getting_started/frameworks/node"
/>
## Differences between Node.js and Next.js
@@ -35,7 +35,7 @@ If you see any dependency issues, you are welcome to open an issue on the GitHub
## Edge Runtime
[Vercel Edge Runtime](https://edge-runtime.vercel.app/) is a subset of Node.js APIs. Similar to [Cloudflare Workers](./cloudflare#difference-between-nodejs-and-cloudflare-worker),
[Vercel Edge Runtime](https://edge-runtime.vercel.app/) is a subset of Node.js APIs. Similar to [Cloudflare Workers](/docs/llamaindex/getting_started/frameworks/cloudflare#difference-between-nodejs-and-cloudflare-worker),
it is a serverless platform that runs your code on the edge.
Not all features of Node.js are supported in Vercel Edge Runtime, so does LlamaIndex.TS, we are working on more compatibility with all JavaScript runtimes.
@@ -42,11 +42,11 @@ By the default, we are using `js-tiktoken` for tokenization. You can install `gp
```
</Tabs>
> Note: This only works for Node.js
**Note**: This only works for Node.js
## TypeScript support
<Card
title="Getting Started with LlamaIndex.TS in TypeScript"
href="/docs/llamaindex/getting_started/setup/typescript"
href="/docs/llamaindex/getting_started/frameworks/typescript"
/>
@@ -7,7 +7,7 @@ Before you start, make sure you have try LlamaIndex.TS in Node.js to make sure y
<Card
title="Getting Started with LlamaIndex.TS in Node.js"
href="/docs/llamaindex/getting_started/setup/node"
href="/docs/llamaindex/getting_started/frameworks/node"
/>
Also, make sure you have a basic understanding of [Vite](https://vitejs.dev/).
@@ -37,20 +37,20 @@ In most cases, you'll also need an LLM package to use LlamaIndex. For example, t
```
</Tabs>
Go to [Using other LLM APIs](/docs/llamaindex/examples/other_llms) to find out how to use other LLMs.
Go to [LLM APIs](/docs/llamaindex/modules/llms) to find out how to use other LLMs.
## What's next?
<Cards>
<Card
title="I want to try LlamaIndex.TS"
description="Learn how to use LlamaIndex.TS with different JS runtime and frameworks."
href="/docs/llamaindex/getting_started/setup"
title="Learn LlamaIndex.TS"
description="Learn how to use LlamaIndex.TS by starting with one of our tutorials."
href="/docs/llamaindex/tutorials/rag"
/>
<Card
title="Show me code examples"
description="Explore code examples using LlamaIndex.TS."
href="https://stackblitz.com/github/run-llama/LlamaIndexTS/tree/main/examples?file=README.md"
href="/docs/llamaindex/getting_started/examples"
/>
</Cards>
@@ -1,4 +1,4 @@
{
"title": "Getting Started",
"pages": ["index", "setup", "starter_tutorial", "environments", "concepts"]
"pages": ["index", "create_llama", "examples", "frameworks"]
}
@@ -1,6 +0,0 @@
{
"title": "Setup",
"description": "The setup guide",
"defaultOpen": true,
"pages": ["index", "next", "node", "typescript", "vite", "cloudflare"]
}
@@ -1,9 +0,0 @@
{
"title": "Starter Tutorials",
"pages": [
"retrieval_augmented_generation",
"chatbot",
"structured_data_extraction",
"agent"
]
}
@@ -1,16 +0,0 @@
---
title: Cost Analysis
---
This page shows how to track LLM cost using APIs.
## Callback Manager
The callback manager is a class that manages the callback functions.
You can register `llm-start`, `llm-end`, and `llm-stream` callbacks to the callback manager for tracking the cost.
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!../../../../../../../examples/recipes/cost-analysis";
<DynamicCodeBlock lang="ts" code={CodeSource} />
@@ -1,5 +0,0 @@
{
"title": "Guide",
"description": "See our guide",
"pages": ["loading", "workflow", "chat", "agents", "cost-analysis"]
}
@@ -16,9 +16,13 @@ The TypeScript implementation is designed for JavaScript server side application
LlamaIndex.TS provides tools for beginners, advanced users, and everyone in between.
Try it out with a starter example using StackBlitz:
<iframe
className="w-full h-[440px]"
aria-label="LlamaIndex.TS Starter"
aria-description="This is a starter example for LlamaIndex.TS, it shows the basic usage of the library."
src="https://stackblitz.com/github/run-llama/LlamaIndexTS/tree/main/examples?embed=1&file=starter.ts"
/>
You'll need an OpenAI API key to run this example. You can retrieve it from [OpenAI](https://platform.openai.com/api-keys).
@@ -84,6 +84,7 @@ const queryTool = llamaindex({
model: openai("gpt-4"),
index,
description: "Search through the documents",
options: { fields: ["sourceNodes", "messages"]}
});
// Use the tool with Vercel's AI SDK
@@ -4,13 +4,11 @@
"root": true,
"pages": [
"---Guide---",
"what-is-llamaindex",
"index",
"getting_started",
"migration",
"guide",
"examples",
"tutorials",
"modules",
"integration"
"integration",
"migration"
]
}
@@ -75,7 +75,7 @@ Now:
import { SimpleDirectoryReader } from "@llamaindex/readers/directory";
```
For more details about available data loaders and their usage, check the [Loading Data](/docs/llamaindex/guide/loading).
For more details about available data loaders and their usage, check the [Loading Data](/docs/llamaindex/modules/loading).
### 4. Prefer using `llamaindex` instead of `@llamaindex/core`
@@ -2,6 +2,8 @@
title: Agents
---
**Note**: Agents are deprecated, use [Agent Workflows](/docs/llamaindex/modules/agent_workflow) instead.
An “agent” is an automated reasoning and decision engine. It takes in a user input/query and can make internal decisions for executing that query in order to return the correct result. The key agent components can include, but are not limited to:
- Breaking down a complex question into smaller ones
@@ -19,11 +21,6 @@ LlamaIndex.TS comes with a few built-in agents, but you can also create your own
- ReACT Agent
- Meta3.1 504B via Bedrock (in `@llamaIndex/community`)
## Examples
- [OpenAI Agent](/docs/llamaindex/examples/agent)
- [Gemini Agent](/docs/llamaindex/examples/agent_gemini)
## Api References
- [OpenAIAgent](/docs/api/classes/OpenAIAgent)
@@ -1,5 +1,5 @@
{
"title": "Migration",
"description": "Migration between different versions",
"pages": ["0.8-to-0.9"]
"pages": ["0.8-to-0.9", "deprecated"]
}
@@ -1,9 +1,9 @@
---
title: Agent Workflow
title: Agent Workflows
---
Agent Workflows are a powerful system that enables you to create and orchestrate one or multiple agents with tools to perform specific tasks. It's built on top of the base `Workflow` system and provides a streamlined interface for agent interactions.
Agent Workflows are a powerful system that enables you to create and orchestrate one or multiple agents with tools to perform specific tasks. It's built on top of the base [`Workflow`](/docs/llamaindex/modules/workflows) system and provides a streamlined interface for agent interactions.
## Usage
@@ -6,7 +6,7 @@ import { ChatDemoRSC } from '../../../../../components/demo/chat/rsc/demo';
Using [chat-ui](https://github.com/run-llama/chat-ui), it's easy to add a chat interface to your LlamaIndexTS application using [Next.js RSC](https://nextjs.org/docs/app/building-your-application/rendering/server-components) and [Vercel AI RSC](https://sdk.vercel.ai/docs/ai-sdk-rsc/overview).
With RSC, the chat messages are not returned as JSON from the server (like when using an [API route](./chat)), instead the chat message components are rendered on the server side.
With RSC, the chat messages are not returned as JSON from the server (like when using an [API route](/docs/llamaindex/modules/chat/chat)), instead the chat message components are rendered on the server side.
This is for example useful for rendering a whole chat history on the server before sending it to the client. [Check here](https://sdk.vercel.ai/docs/getting-started/navigating-the-library#when-to-use-ai-sdk-rsc), for a discussion of when to use use RSC.
For implementing a chat interface with RSC, you need to create an AI action and then connect the chat interface to use it.
@@ -2,7 +2,7 @@
title: Index
---
An index is the basic container and organization for your data. LlamaIndex.TS supports two indexes:
An index is the basic container and organization for your data. LlamaIndex.TS supports three indexes:
- `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
@@ -35,7 +35,7 @@ Currently, the following readers are mapped to specific file types:
- [TextFileReader](/docs/api/classes/TextFileReader): `.txt`
- [PDFReader](/docs/api/classes/PDFReader): `.pdf`
- [PapaCSVReader](/docs/api/classes/PapaCSVReader): `.csv`
- [CSVReader](/docs/api/classes/CSVReader): `.csv`
- [MarkdownReader](/docs/api/classes/MarkdownReader): `.md`
- [DocxReader](/docs/api/classes/DocxReader): `.docx`
- [HTMLReader](/docs/api/classes/HTMLReader): `.htm`, `.html`
@@ -6,11 +6,11 @@ Chat stores manage chat history by storing sequences of messages in a structured
## Available Chat Stores
- [SimpleChatStore](/docs/api/classes/SimpleChatStore): A simple in-memory chat store with support for [persisting](/docs/llamaindex/modules/data_stores/#local-storage) data to disk.
- [SimpleChatStore](/docs/api/classes/SimpleChatStore): A simple in-memory chat store with support for [persisting](/docs/llamaindex/modules/data_stores#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](/docs/api/interfaces/BaseChatStore)
- [BaseChatStore](/docs/api/classes/BaseChatStore)
@@ -2,12 +2,12 @@
title: Document Stores
---
Document stores contain ingested document chunks, i.e. [Node](/docs/llamaindex/modules/documents_and_nodes/index)s.
Document stores contain ingested document chunks, i.e. [Node](/docs/llamaindex/modules/documents_and_nodes)s.
## Available Document Stores
- [SimpleDocumentStore](/docs/api/classes/SimpleDocumentStore): A simple in-memory document store with support for [persisting](/docs/llamaindex/modules/data_stores/#local-storage) data to disk.
- [PostgresDocumentStore](/docs/api/classes/PostgresDocumentStore): A PostgreSQL document store, see [PostgreSQL Storage](/docs/llamaindex/modules/data_stores/#postgresql-storage).
- [SimpleDocumentStore](/docs/api/classes/SimpleDocumentStore): A simple in-memory document store with support for [persisting](/docs/llamaindex/modules/data_stores#local-storage) data to disk.
- [PostgresDocumentStore](/docs/api/classes/PostgresDocumentStore): A PostgreSQL document store, see [PostgreSQL Storage](/docs/llamaindex/modules/data_stores#postgresql-storage).
Check the [LlamaIndexTS Github](https://github.com/run-llama/LlamaIndexTS) for the most up to date overview of integrations.
@@ -6,8 +6,8 @@ Index stores are underlying storage components that contain metadata(i.e. inform
## Available Index Stores
- [SimpleIndexStore](/docs/api/classes/SimpleIndexStore): A simple in-memory index store with support for [persisting](/docs/llamaindex/modules/data_stores/#local-storage) data to disk.
- [PostgresIndexStore](/docs/api/classes/PostgresIndexStore): A PostgreSQL index store, , see [PostgreSQL Storage](/docs/llamaindex/modules/data_stores/#postgresql-storage).
- [SimpleIndexStore](/docs/api/classes/SimpleIndexStore): A simple in-memory index store with support for [persisting](/docs/llamaindex/modules/data_stores#local-storage) data to disk.
- [PostgresIndexStore](/docs/api/classes/PostgresIndexStore): A PostgreSQL index store, , see [PostgreSQL Storage](/docs/llamaindex/modules/data_stores#postgresql-storage).
Check the [LlamaIndexTS Github](https://github.com/run-llama/LlamaIndexTS) for the most up to date overview of integrations.
@@ -2,12 +2,12 @@
title: Key-Value Stores
---
Key-Value Stores represent underlying storage components used in [Document Stores](/docs/llamaindex/modules/data_stores/doc_stores/index) and [Index Stores](/docs/llamaindex/modules/data_stores/index_stores/index)
Key-Value Stores represent underlying storage components used in [Document Stores](/docs/llamaindex/modules/data_stores/doc_stores) and [Index Stores](/docs/llamaindex/modules/data_stores/index_stores)
## Available Key-Value Stores
- [SimpleKVStore](/docs/api/classes/SimpleKVStore): A simple Key-Value store with support of [persisting](/docs/llamaindex/modules/data_stores/#local-storage) data to disk.
- [PostgresKVStore](/docs/api/classes/PostgresKVStore): A PostgreSQL Key-Value store, see [PostgreSQL Storage](/docs/llamaindex/modules/data_stores/#postgresql-storage).
- [SimpleKVStore](/docs/api/classes/SimpleKVStore): A simple Key-Value store with support of [persisting](/docs/llamaindex/modules/data_stores#local-storage) data to disk.
- [PostgresKVStore](/docs/api/classes/PostgresKVStore): A PostgreSQL Key-Value store, see [PostgreSQL Storage](/docs/llamaindex/modules/data_stores#postgresql-storage).
Check the [LlamaIndexTS Github](https://github.com/run-llama/LlamaIndexTS) for the most up to date overview of integrations.
@@ -8,7 +8,7 @@ Vector stores save embedding vectors of your ingested document chunks.
Available Vector Stores are shown on the sidebar to the left. Additionally the following integrations exist without separate documentation:
- [SimpleVectorStore](/docs/api/classes/SimpleVectorStore): A simple in-memory vector store with optional [persistance](/docs/llamaindex/modules/data_stores/#local-storage) to disk.
- [SimpleVectorStore](/docs/api/classes/SimpleVectorStore): A simple in-memory vector store with optional [persistance](/docs/llamaindex/modules/data_stores#local-storage) to disk.
- [AstraDBVectorStore](/docs/api/classes/AstraDBVectorStore): A cloud-native, scalable Database-as-a-Service built on Apache Cassandra, see [datastax.com](https://www.datastax.com/products/datastax-astra)
- [ChromaVectorStore](/docs/api/classes/ChromaVectorStore): An open-source vector database, focused on ease of use and performance, see [trychroma.com](https://www.trychroma.com/)
- [MilvusVectorStore](/docs/api/classes/MilvusVectorStore): An open-source, high-performance, highly scalable vector database, see [milvus.io](https://milvus.io/)
@@ -19,6 +19,3 @@ Available Vector Stores are shown on the sidebar to the left. Additionally the f
Check the [LlamaIndexTS Github](https://github.com/run-llama/LlamaIndexTS) for the most up to date overview of integrations.
## API Reference
- [BaseVectorStore](/docs/api/classes/BaseVectorStore)
@@ -56,10 +56,10 @@ const vectorStore = new QdrantVectorStore({
```ts
const document = new Document({ text: essay, id_: path });
const index = await VectorStoreIndex.fromDocuments([document], {
vectorStore,
});
const storageContext = await storageContextFromDefaults({ vectorStore });
const index = await VectorStoreIndex.fromDocuments([document], {
storageContext,
});
```
## Query the index
@@ -91,11 +91,11 @@ async function main() {
});
const document = new Document({ text: essay, id_: path });
const storageContext = await storageContextFromDefaults({ vectorStore });
const index = await VectorStoreIndex.fromDocuments([document], {
vectorStore,
storageContext,
});
const queryEngine = index.asQueryEngine();
const response = await queryEngine.query({
@@ -0,0 +1,166 @@
---
title: Supabase Vector Store
---
[supabase.com](https://supabase.com/)
To use this vector store, you need a Supabase project. You can create one at [supabase.com](https://supabase.com/).
## Installation
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Tabs groupId="install" items={["npm", "yarn", "pnpm"]} persist>
```shell tab="npm"
npm install llamaindex @llamaindex/supabase
```
```shell tab="yarn"
yarn add llamaindex @llamaindex/supabase
```
```shell tab="pnpm"
pnpm add llamaindex @llamaindex/supabase
```
</Tabs>
## Database Setup
Before using the vector store, you need to:
1. Enable the `pgvector` extension
2. Create a table for storing vectors
3. Create a vector similarity search function
```sql
create table documents (
id uuid primary key,
content text,
metadata jsonb,
embedding vector(1536)
);
```
-- Create a function for similarity search
```sql
create function match_documents (
query_embedding vector(1536),
match_count int
) returns table (
id uuid,
content text,
metadata jsonb,
embedding vector(1536),
similarity float
)
language plpgsql
as $$
begin
return query
select
id,
content,
metadata,
embedding,
1 - (embedding <=> query_embedding) as similarity
from documents
order by embedding <=> query_embedding
limit match_count;
end;
$$;
```
## Importing the modules
```ts
import { Document, VectorStoreIndex } from "llamaindex";
import { SupabaseVectorStore } from "@llamaindex/supabase";
```
## Setup Supabase
```ts
const vectorStore = new SupabaseVectorStore({
supabaseUrl: process.env.SUPABASE_URL,
supabaseKey: process.env.SUPABASE_KEY,
table: "documents",
});
```
## Setup the index
```ts
const documents = [
new Document({
text: "Sample document text",
metadata: { source: "example" }
})
];
const storageContext = await storageContextFromDefaults({ vectorStore });
const index = await VectorStoreIndex.fromDocuments(documents, {
storageContext,
});
```
## Query the index
```ts
const queryEngine = index.asQueryEngine();
const response = await queryEngine.query({
query: "What is in the document?",
});
// Output response
console.log(response.toString());
```
## Full code
```ts
import { Document, VectorStoreIndex, storageContextFromDefaults } from "llamaindex";
import { SupabaseVectorStore } from "@llamaindex/supabase";
async function main() {
// Initialize the vector store
const vectorStore = new SupabaseVectorStore({
supabaseUrl: process.env.SUPABASE_URL,
supabaseKey: process.env.SUPABASE_KEY,
table: "documents",
});
// Create sample documents
const documents = [
new Document({
text: "Vector search enables semantic similarity search",
metadata: {
source: "research_paper",
author: "Jane Smith",
},
}),
];
// Create storage context
const storageContext = await storageContextFromDefaults({ vectorStore });
// Create and store embeddings
const index = await VectorStoreIndex.fromDocuments(documents, {
storageContext,
});
// Query the index
const queryEngine = index.asQueryEngine();
const response = await queryEngine.query({
query: "What is vector search?",
});
// Output response
console.log(response.toString());
}
main().catch(console.error);
```
## API Reference
- [SupabaseVectorStore](/docs/api/classes/SupabaseVectorStore)
@@ -4,7 +4,7 @@ title: Embedding
The embedding model in LlamaIndex is responsible for creating numerical representations of text. By default, LlamaIndex will use the `text-embedding-ada-002` model from OpenAI.
This can be explicitly updated through `Settings`
This can be explicitly updated through `Settings.embedModel`.
## Installation
@@ -35,7 +35,7 @@ Settings.embedModel = new OpenAIEmbedding({
## Local Embedding
For local embeddings, you can use the [HuggingFace](/docs/llamaindex/modules/embeddings/available_embeddings/huggingface) embedding model.
For local embeddings, you can use the [HuggingFace](/docs/llamaindex/modules/embeddings/huggingface) embedding model.
## Local Ollama Embeddings With Remote Host
@@ -74,4 +74,4 @@ the response is not correct with a score of 2.5
## API Reference
- [CorrectnessEvaluator](/docs/api/classes/CorrectnessEvaluator)
- [CorrectnessEvaluator](/docs/api/classes/CorrectnessEvaluator)
@@ -8,7 +8,7 @@ Currently, the following components are Transformation objects:
- [SentenceSplitter](/docs/api/classes/SentenceSplitter)
- [MetadataExtractor](/docs/llamaindex/modules/documents_and_nodes/metadata_extraction)
- [Embeddings](/docs/llamaindex/modules/embeddings/index)
- [Embeddings](/docs/llamaindex/modules/embeddings)
## Usage Pattern
@@ -1,110 +0,0 @@
---
title: OpenAI
---
## Installation
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Tabs groupId="install" items={["npm", "yarn", "pnpm"]} persist>
```shell tab="npm"
npm install llamaindex @llamaindex/openai
```
```shell tab="yarn"
yarn add llamaindex @llamaindex/openai
```
```shell tab="pnpm"
pnpm add llamaindex @llamaindex/openai
```
</Tabs>
```ts
import { OpenAI } from "@llamaindex/openai";
import { Settings } from "llamaindex";
Settings.llm = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0, apiKey: <YOUR_API_KEY> });
```
You can setup the apiKey on the environment variables, like:
```bash
export OPENAI_API_KEY="<YOUR_API_KEY>"
```
You can optionally set a custom base URL, like:
```bash
export OPENAI_BASE_URL="https://api.scaleway.ai/v1"
```
or
```ts
Settings.llm = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0, apiKey: <YOUR_API_KEY>, baseURL: "https://api.scaleway.ai/v1" });
```
## Load and index documents
For this example, we will use a single document. In a real-world scenario, you would have multiple documents to index.
```ts
import { Document, VectorStoreIndex } from "llamaindex";
const document = new Document({ text: essay, id_: "essay" });
const index = await VectorStoreIndex.fromDocuments([document]);
```
## Query
```ts
const queryEngine = index.asQueryEngine();
const query = "What is the meaning of life?";
const results = await queryEngine.query({
query,
});
```
## Full Example
```ts
import { OpenAI } from "@llamaindex/openai";
import { Document, Settings, VectorStoreIndex } from "llamaindex";
// Use the OpenAI LLM
Settings.llm = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0 });
async function main() {
const document = new Document({ text: essay, id_: "essay" });
// Load and index documents
const index = await VectorStoreIndex.fromDocuments([document]);
// get retriever
const retriever = index.asRetriever();
// Create a query engine
const queryEngine = index.asQueryEngine({
retriever,
});
const query = "What is the meaning of life?";
// Query
const response = await queryEngine.query({
query,
});
// Log the response
console.log(response.response);
}
```
## API Reference
- [OpenAI](/docs/api/classes/OpenAI)
@@ -3,7 +3,7 @@ title: Groq
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!../../../../../../../../../examples/groq.ts";
import CodeSource from "!raw-loader!../../../../../../../../examples/groq.ts";
## Installation
@@ -45,7 +45,7 @@ export AZURE_OPENAI_DEPLOYMENT="gpt-4" # or some other deployment name
## Local LLM
For local LLMs, currently we recommend the use of [Ollama](/docs/llamaindex/modules/llms/available_llms/ollama) LLM.
For local LLMs, currently we recommend the use of [Ollama](/docs/llamaindex/modules/llms/ollama) LLM.
## Available LLMs
@@ -55,6 +55,35 @@ const results = await queryEngine.query({
});
```
## Using JSON Response Format
You can configure Ollama to return responses in JSON format:
```ts
import { Ollama } from "@llamaindex/llms/ollama";
import { z } from "zod";
// Simple JSON format
const llm = new Ollama({
model: "llama2",
temperature: 0,
responseFormat: { type: "json_object" }
});
// Using Zod schema for validation
const responseSchema = z.object({
summary: z.string(),
topics: z.array(z.string()),
sentiment: z.enum(["positive", "negative", "neutral"])
});
const llm = new Ollama({
model: "llama2",
temperature: 0,
responseFormat: responseSchema
});
```
## Full Example
```ts
@@ -0,0 +1,393 @@
---
title: OpenAI
---
## Installation
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Tabs groupId="install" items={["npm", "yarn", "pnpm"]} persist>
```shell tab="npm"
npm install llamaindex @llamaindex/openai
```
```shell tab="yarn"
yarn add llamaindex @llamaindex/openai
```
```shell tab="pnpm"
pnpm add llamaindex @llamaindex/openai
```
</Tabs>
```ts
import { OpenAI } from "@llamaindex/openai";
import { Settings } from "llamaindex";
Settings.llm = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0, apiKey: <YOUR_API_KEY> });
```
You can setup the apiKey on the environment variables, like:
```bash
export OPENAI_API_KEY="<YOUR_API_KEY>"
```
You can optionally set a custom base URL, like:
```bash
export OPENAI_BASE_URL="https://api.scaleway.ai/v1"
```
or
```ts
Settings.llm = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0, apiKey: <YOUR_API_KEY>, baseURL: "https://api.scaleway.ai/v1" });
```
## Using OpenAI Responses API
The OpenAI Responses API provides enhanced functionality for handling complex interactions, including built-in tools, annotations, and streaming responses. Here's how to use it:
### Basic Setup
```ts
import { openaiResponses } from "@llamaindex/openai";
const llm = openaiResponses({
model: "gpt-4o",
temperature: 0.1,
maxOutputTokens: 1000
});
```
### Message Content Types
The API supports different types of message content, including text and images:
```ts
const response = await llm.chat({
messages: [
{
role: "user",
content: [
{
type: "input_text",
text: "What's in this image?"
},
{
type: "input_image",
image_url: "https://example.com/image.jpg",
detail: "auto" // Optional: can be "auto", "low", or "high"
}
]
}
]
});
```
### Advanced Features
#### Built-in Tools
```ts
const llm = openaiResponses({
model: "gpt-4o",
builtInTools: [
{
type: "function",
name: "search_files",
description: "Search through available files"
}
],
strict: true // Enable strict mode for tool calls
});
```
#### Response Tracking and Storage
```ts
const llm = openaiResponses({
trackPreviousResponses: true, // Enable response tracking
store: true, // Store responses for future reference
user: "user-123", // Associate responses with a user
callMetadata: { // Add custom metadata
sessionId: "session-123",
context: "customer-support"
}
});
```
#### Streaming Responses
```ts
const response = await llm.chat({
messages: [
{
role: "user",
content: "Generate a long response"
}
],
stream: true // Enable streaming
});
for await (const chunk of response) {
console.log(chunk.delta); // Process each chunk of the response
}
```
### Configuration Options
The OpenAI Responses API supports various configuration options:
```ts
const llm = openaiResponses({
// Model and basic settings
model: "gpt-4o",
temperature: 0.1,
topP: 1,
maxOutputTokens: 1000,
// API configuration
apiKey: "your-api-key",
baseURL: "custom-endpoint",
maxRetries: 10,
timeout: 60000,
// Response handling
trackPreviousResponses: false,
store: false,
strict: false,
// Additional options
instructions: "Custom instructions for the model",
truncation: "auto", // Can be "auto", "disabled", or null
include: ["citations", "reasoning"] // Specify what to include in responses
});
```
### Response Structure
The API returns responses with rich metadata and optional annotations:
```ts
interface ResponseStructure {
message: {
content: string;
role: "assistant";
options: {
built_in_tool_calls: Array<ToolCall>;
annotations?: Array<Citation | URLCitation | FilePath>;
refusal?: string;
reasoning?: ReasoningItem;
usage?: ResponseUsage;
toolCall?: Array<PartialToolCall>;
}
}
}
```
### Best Practices
1. Use `trackPreviousResponses` when you need conversation continuity
2. Enable `strict` mode when using tools to ensure accurate function calls
3. Set appropriate `maxOutputTokens` to control response length
4. Use `annotations` to track citations and references in responses
5. Implement error handling for potential API failures and retries
## Using JSON Response Format
You can configure OpenAI to return responses in JSON format:
```ts
Settings.llm = new OpenAI({
model: "gpt-4o",
temperature: 0,
responseFormat: { type: "json_object" }
});
// You can also use a Zod schema to validate the response structure
import { z } from "zod";
const responseSchema = z.object({
summary: z.string(),
topics: z.array(z.string()),
sentiment: z.enum(["positive", "negative", "neutral"])
});
Settings.llm = new OpenAI({
model: "gpt-4o",
temperature: 0,
responseFormat: responseSchema
});
```
## Response Formats
The OpenAI LLM supports different response formats to structure the output in specific ways. There are two main approaches to formatting responses:
### 1. JSON Object Format
The simplest way to get structured JSON responses is using the `json_object` response format:
```ts
Settings.llm = new OpenAI({
model: "gpt-4o",
temperature: 0,
responseFormat: { type: "json_object" }
});
const response = await llm.chat({
messages: [
{
role: "system",
content: "You are a helpful assistant that outputs JSON."
},
{
role: "user",
content: "Summarize this meeting transcript"
}
]
});
// Response will be valid JSON
console.log(response.message.content);
```
### 2. Schema Validation with Zod
For more robust type safety and validation, you can use Zod schemas to define the expected response structure:
```ts
import { z } from "zod";
// Define the response schema
const meetingSchema = z.object({
summary: z.string(),
participants: z.array(z.string()),
actionItems: z.array(z.string()),
nextSteps: z.string()
});
// Configure the LLM with the schema
Settings.llm = new OpenAI({
model: "gpt-4o",
temperature: 0,
responseFormat: meetingSchema
});
const response = await llm.chat({
messages: [
{
role: "user",
content: "Summarize this meeting transcript"
}
]
});
// Response will be typed and validated according to the schema
const result = response.message.content;
console.log(result.summary);
console.log(result.actionItems);
```
### Response Format Options
The response format can be configured in two ways:
1. At LLM initialization:
```ts
const llm = new OpenAI({
model: "gpt-4o",
responseFormat: { type: "json_object" } // or a Zod schema
});
```
2. Per request:
```ts
const response = await llm.chat({
messages: [...],
responseFormat: { type: "json_object" } // or a Zod schema
});
```
The response format options are:
- `{ type: "json_object" }` - Returns responses as JSON objects
- `zodSchema` - A Zod schema that defines and validates the response structure
### Best Practices
1. Use JSON object format for simple structured responses
2. Use Zod schemas when you need:
- Type safety
- Response validation
- Complex nested structures
- Specific field constraints
3. Set a low temperature (e.g. 0) when using structured outputs for more reliable formatting
4. Include clear instructions in system or user messages about the expected response format
5. Handle potential parsing errors when working with JSON responses
## Load and index documents
For this example, we will use a single document. In a real-world scenario, you would have multiple documents to index.
```ts
import { Document, VectorStoreIndex } from "llamaindex";
const document = new Document({ text: essay, id_: "essay" });
const index = await VectorStoreIndex.fromDocuments([document]);
```
## Query
```ts
const queryEngine = index.asQueryEngine();
const query = "What is the meaning of life?";
const results = await queryEngine.query({
query,
});
```
## Full Example
```ts
import { OpenAI } from "@llamaindex/openai";
import { Document, Settings, VectorStoreIndex } from "llamaindex";
// Use the OpenAI LLM
Settings.llm = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0 });
async function main() {
const document = new Document({ text: essay, id_: "essay" });
// Load and index documents
const index = await VectorStoreIndex.fromDocuments([document]);
// get retriever
const retriever = index.asRetriever();
// Create a query engine
const queryEngine = index.asQueryEngine({
retriever,
});
const query = "What is the meaning of life?";
// Query
const response = await queryEngine.query({
query,
});
// Log the response
console.log(response.response);
}
```
## API Reference
- [OpenAI](/docs/api/classes/OpenAI)
@@ -1,8 +1,26 @@
---
title: Perplexity LLM
---
## Usage
## Installation
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Tabs groupId="install" items={["npm", "yarn", "pnpm"]} persist>
```shell tab="npm"
npm install @llamaindex/perplexity
```
```shell tab="yarn"
yarn add @llamaindex/perplexity
```
```shell tab="pnpm"
pnpm add @llamaindex/perplexity
```
</Tabs>
## Usage
```ts
import { Settings } from "llamaindex";
@@ -8,15 +8,15 @@ import { Tab, Tabs } from "fumadocs-ui/components/tabs";
<Tabs groupId="install" items={["npm", "yarn", "pnpm"]} persist>
```shell tab="npm"
npm install llamaindex
npm install @llamaindex/together
```
```shell tab="yarn"
yarn add llamaindex
yarn add @llamaindex/together
```
```shell tab="pnpm"
pnpm add llamaindex
pnpm add @llamaindex/together
```
</Tabs>
@@ -5,7 +5,7 @@ description: Learn how to use Node Parsers and Text Splitters to extract data fr
import { CodeNodeParserDemo } from '../../../../../components/demo/code-node-parser.tsx';
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
Node parsers are a simple abstraction that take a list of documents, and chunk them into `Node` objects, such that each node is a specific chunk of the parent document. When a document is broken into nodes, all of it's attributes are inherited to the children nodes (i.e. `metadata`, text and metadata templates, etc.). You can read more about `Node` and `Document` properties [here](./).
Node parsers are a simple abstraction that take a list of documents, and chunk them into `Node` objects, such that each node is a specific chunk of the parent document. When a document is broken into nodes, all of it's attributes are inherited to the children nodes (i.e. `metadata`, text and metadata templates, etc.). You can read more about `Node` and `Document` properties [here](/docs/llamaindex/modules/loading).
## NodeParser
@@ -28,14 +28,21 @@ Answer:`;
### 1. Customizing the default prompt on initialization
The first method is to create a new instance of `ResponseSynthesizer` (or the module you would like to update the prompt) and pass the custom prompt to the `responseBuilder` parameter. Then, pass the instance to the `asQueryEngine` method of the index.
The first method is to create a new instance of a Response Synthesizer (or the module you would like to update the prompt) by using the getResponseSynthesizer function. Instead of passing the custom prompt to the deprecated responseBuilder parameter, call getResponseSynthesizer with the mode as the first argument and supply the new prompt via the options parameter.
```ts
// Create an instance of response synthesizer
// Create an instance of Response Synthesizer
// Deprecated usage:
const responseSynthesizer = new ResponseSynthesizer({
responseBuilder: new CompactAndRefine(undefined, newTextQaPrompt),
});
// Current usage:
const responseSynthesizer = getResponseSynthesizer('compact', {
textQATemplate: newTextQaPrompt
})
// Create index
const index = await VectorStoreIndex.fromDocuments([document]);
@@ -75,5 +82,5 @@ const response = await queryEngine.query({
## API Reference
- [ResponseSynthesizer](/docs/api/classes/ResponseSynthesizer)
- [Response Synthesizer](/docs/llamaindex/modules/response_synthesizer)
- [CompactAndRefine](/docs/api/classes/CompactAndRefine)
@@ -1,5 +1,5 @@
---
title: ResponseSynthesizer
title: Response Synthesizer
---
The ResponseSynthesizer is responsible for sending the query, nodes, and prompt templates to the LLM to generate a response. There are a few key modes for generating a response:
@@ -12,15 +12,17 @@ The ResponseSynthesizer is responsible for sending the query, nodes, and prompt
multiple compact prompts. The same as `refine`, but should result in less LLM calls.
- `TreeSummarize`: Given a set of text chunks and the query, recursively construct a tree
and return the root node as the response. Good for summarization purposes.
- `SimpleResponseBuilder`: Given a set of text chunks and the query, apply the query to each text
chunk while accumulating the responses into an array. Returns a concatenated string of all
responses. Good for when you need to run the same query separately against each text
chunk.
- `MultiModal`: Combines textual inputs with additional modality-specific metadata to generate an integrated response.
It leverages a text QA template to build a prompt that incorporates various input types and produces either streaming or complete responses.
This approach is ideal for use cases where enriching the answer with multi-modal context (such as images, audio, or other data)
can enhance the output quality.
```typescript
import { NodeWithScore, TextNode, ResponseSynthesizer } from "llamaindex";
import { NodeWithScore, TextNode, getResponseSynthesizer, responseModeSchema } from "llamaindex";
const responseSynthesizer = new ResponseSynthesizer();
// you can also use responseModeSchema.Enum.refine, responseModeSchema.Enum.tree_summarize, responseModeSchema.Enum.multi_modal
// or you can use the CompactAndRefine, Refine, TreeSummarize, or MultiModal classes directly
const responseSynthesizer = getResponseSynthesizer(responseModeSchema.Enum.compact);
const nodesWithScore: NodeWithScore[] = [
{
@@ -55,8 +57,9 @@ for await (const chunk of stream) {
## API Reference
- [ResponseSynthesizer](/docs/api/classes/ResponseSynthesizer)
- [getResponseSynthesizer](/docs/api/functions/getResponseSynthesizer)
- [responseModeSchema](/docs/api/variables/responseModeSchema)
- [Refine](/docs/api/classes/Refine)
- [CompactAndRefine](/docs/api/classes/CompactAndRefine)
- [TreeSummarize](/docs/api/classes/TreeSummarize)
- [SimpleResponseBuilder](/docs/api/classes/SimpleResponseBuilder)
- [MultiModal](/docs/api/classes/MultiModal)
@@ -7,9 +7,59 @@ A tool can be called to perform custom actions, or retrieve extra information ba
A result from a tool call can be used by subsequent steps in a workflow, or to compute a final answer.
For example, a "weather tool" could fetch some live weather information from a geographical location.
## Tool Function
The `tool` function is a utility provided to define a tool that can be used by an agent. It takes a function and a configuration object as arguments. The configuration object includes the tool's name, description, and parameters.
### Parameters with Zod
The `parameters` field in the tool configuration is defined using `zod`, a TypeScript-first schema declaration and validation library. `zod` allows you to specify the expected structure and types of the input parameters, ensuring that the data passed to the tool is valid.
Example:
```ts
import { agent, tool } from "llamaindex";
import { z } from "zod";
// first arg is LLM input, second is bound arg
const queryKnowledgeBase = async ({ question }, { userToken }) => {
const response = await fetch(`https://knowledge-base.com?token=${userToken}&query=${question}`);
// ...
};
// define tool with zod validation
const kbTool = tool(queryKnowledgeBase, {
name: 'queryKnowledgeBase',
description: 'Query knowledge base',
parameters: z.object({
question: z.string({
description: 'The user question',
}),
}),
});
```
In this example, `z.object` is used to define a schema for the `parameters` where `question` is expected to be a string. This ensures that any input to the tool adheres to the specified structure, providing a layer of type safety and validation.
## Built-in tools
You can import built-in tools from the `@llamaindex/tools` package.
```ts
import { agent } from "llamaindex";
import { wiki } from "@llamaindex/tools";
const researchAgent = agent({
name: "WikiAgent",
description: "Gathering information from the internet",
systemPrompt: `You are a research agent. Your role is to gather information from the internet using the provided tools.`,
tools: [wiki()],
});
```
## Function tool
Function tools are implemented with the `FunctionTool` class.
You can still use the `FunctionTool` class to define a tool.
A `FunctionTool` is constructed from a function with signature
```ts
(input: T, additionalArg?: AdditionalToolArgument) => R
@@ -1,5 +1,5 @@
---
title: Agent tutorial
title: 1. Setup
---
In this guide we'll walk you through the process of building an Agent in JavaScript using the LlamaIndex.TS library, starting from nothing and adding complexity in stages.
@@ -1,5 +1,5 @@
---
title: Create a basic agent
title: 2. Create a basic agent
---
We want to use `await` so we're going to wrap all of our code in a `main` function, like this:
@@ -1,5 +1,5 @@
---
title: Using a local model via Ollama
title: 3. Using a local model via Ollama
---
If you're happy using OpenAI, you can skip this section, but many people are interested in using models they run themselves. The easiest way to do this is via the great work of our friends at [Ollama](https://ollama.com/), who provide a simple to use client that will download, install and run a [growing range of models](https://ollama.com/library) for you.
@@ -1,5 +1,5 @@
---
title: Adding Retrieval-Augmented Generation (RAG)
title: 4. Adding Retrieval-Augmented Generation (RAG)
---
While an agent that can perform math is nifty (LLMs are usually not very good at math), LLM-based applications are always more interesting when they work with large amounts of data. In this case, we're going to use a 200-page PDF of the proposed budget of the city of San Francisco for fiscal years 2024-2024 and 2024-2025. It's a great example because it's extremely wordy and full of tables of figures, which present a challenge for humans and LLMs alike.
@@ -87,32 +87,9 @@ By default LlamaIndex will retrieve just the 2 most relevant chunks of text. Thi
retriever.similarityTopK = 10;
```
### Approach 1: Create a Context-Aware Agent
### Use index.queryTool
With the retriever ready, you can create a **context-aware agent**.
```javascript
const agent = new OpenAIContextAwareAgent({
contextRetriever: retriever,
});
// Example query to the context-aware agent
let response = await agent.chat({
message: `What's the budget of San Francisco in 2023-2024?`,
});
console.log(response);
```
**Expected Output:**
```md
The total budget for the City and County of San Francisco for the fiscal year 2023-2024 is $14.6 billion. This represents a $611.8 million, or 4.4 percent, increase over the previous fiscal year's budget. The budget covers various expenditures across different departments and services, including significant allocations to public works, transportation, commerce, public protection, and health services.
```
### Approach 2: Using QueryEngineTool (Alternative Approach)
If you prefer more flexibility and don't mind additional complexity, you can create a `QueryEngineTool`. This approach allows you to define the query logic, providing a more tailored way to interact with the data, but note that it introduces a delay due to the extra tool call.
`index.queryTool` creates a `QueryEngineTool` that can be used be an agent to query data from the index.
```javascript
const tools = [
@@ -125,9 +102,9 @@ const tools = [
];
// Create an agent using the tools array
const myAgent = agent({ tools });
const ragAgent = agent({ tools });
let toolResponse = await myAgent.run("What's the budget of San Francisco in 2023-2024?");
let toolResponse = await ragAgent.run("What's the budget of San Francisco in 2023-2024?");
console.log(toolResponse);
```
@@ -155,10 +132,4 @@ console.log(toolResponse);
Once again we see a `toolResult`. You can see the query the LLM decided to send to the query engine ("total budget"), and the output the engine returned. In `response.message` you see that the LLM has returned the output from the tool almost verbatim, although it trimmed out the bit about 2024-2025 since we didn't ask about that year.
### Comparison of Approaches
The `OpenAIContextAwareAgent` approach simplifies the setup by allowing you to directly link the retriever to the agent, making it straightforward to access relevant context for your queries. This is ideal for situations where you want easy integration with existing data sources, like a context chat engine.
On the other hand, using the `QueryEngineTool` offers more flexibility and power. This method allows for customization in how queries are constructed and executed, enabling you to query data from various storages and process them in different ways. However, this added flexibility comes with increased complexity and response time due to the separate tool call and queryEngine generating tool output by LLM that is then passed to the agent.
So now we have an agent that can index complicated documents and answer questions about them. Let's [combine our math agent and our RAG agent](5_rag_and_tools)!
@@ -1,5 +1,5 @@
---
title: A RAG agent that does math
title: 5. A RAG agent that does math
---
In [our third iteration of the agent](https://github.com/run-llama/ts-agents/blob/main/3_rag_and_tools/agent.ts) we've combined the two previous agents, so we've defined both `sumNumbers` and a `QueryEngineTool` and created an array of two tools. The tools support both Zod and JSON Schema for parameter definition:
@@ -1,5 +1,5 @@
---
title: Adding LlamaParse
title: 6. Adding LlamaParse
---
Complicated PDFs can be very tricky for LLMs to understand. To help with this, LlamaIndex provides LlamaParse, a hosted service that parses complex documents including PDFs. To use it, get a `LLAMA_CLOUD_API_KEY` by [signing up for LlamaCloud](https://cloud.llamaindex.ai/) (it's free for up to 1000 pages/day) and adding it to your `.env` file just as you did for your OpenAI key:
@@ -1,5 +1,5 @@
---
title: Adding persistent vector storage
title: 7. Adding persistent vector storage
---
In the previous examples, we've been loading our data into memory each time we run the agent. This is fine for small datasets, but for larger datasets you'll want to store your embeddings in a database. LlamaIndex.TS provides a `VectorStore` class that can store your embeddings in a variety of databases. We're going to use [Qdrant](https://qdrant.tech/), a popular vector store, for this example.

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 236 KiB

@@ -1,5 +1,5 @@
{
"title": "Agents",
"title": "Agent with RAG",
"pages": [
"1_setup",
"2_create_agent",
@@ -1,11 +1,11 @@
---
title: Agent tutorial
title: Basic Agent
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!../../../../../../../../examples/agent/openai";
import CodeSource from "!raw-loader!../../../../../../../examples/agent/openai";
We have a comprehensive, step-by-step [guide to building agents in LlamaIndex.TS](../../guides/agents/setup) that we recommend to learn what agents are and how to build them for production. But building a basic agent is simple:
We have a comprehensive, step-by-step [guide to building agents in LlamaIndex.TS](/docs/llamaindex/tutorials/agents/1_setup) that we recommend to learn what agents are and how to build them for production. But building a basic agent is simple:
## Set up
@@ -4,7 +4,7 @@ title: Local LLMs
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
LlamaIndex.TS supports OpenAI and [other remote LLM APIs](other_llms). You can also run a local LLM on your machine!
LlamaIndex.TS supports OpenAI and [other remote LLM APIs](/docs/llamaindex/modules/llms). You can also run a local LLM on your machine!
## Using a local model via Ollama
@@ -45,7 +45,10 @@ To switch the LLM in your code, you first need to make sure to install the packa
Then, to tell LlamaIndex to use a local LLM, use the `Settings` object:
```javascript
Settings.llm = new Ollama({
import { Settings } from "llamaindex";
import { ollama } from "@llamaindex/ollama";
Settings.llm = ollama({
model: "mixtral:8x7b",
});
```
@@ -0,0 +1,12 @@
{
"title": "Tutorials",
"pages": [
"basic_agent",
"rag",
"agents",
"workflow",
"local_llm",
"chatbot",
"structured_data_extraction"
]
}

Some files were not shown because too many files have changed in this diff Show More