Compare commits

..

3 Commits

Author SHA1 Message Date
github-actions[bot] be6fead71a Release 0.10.1 (#1858)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: himself65 <14026360+himself65@users.noreply.github.com>
2025-04-16 19:15:34 -07:00
Peter Goldstein 96dd79853a Add o3 and o4-mini models (#1857) 2025-04-16 13:28:39 -07:00
Fuma Nama f49366c9af make docs great again (#1855)
Co-authored-by: Marcus Schiesser <mail@marcusschiesser.de>
Co-authored-by: Alex Yang <himself65@outlook.com>
2025-04-16 11:19:25 -07:00
91 changed files with 4235 additions and 3419 deletions
+8
View File
@@ -1,5 +1,13 @@
# @llamaindex/doc
## 0.2.12
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
- llamaindex@0.10.1
## 0.2.11
### Patch Changes
+2
View File
@@ -0,0 +1,2 @@
// fallback for `fs` usage in `web-tree-sitter`
module.exports = {};
+6 -10
View File
@@ -1,5 +1,4 @@
import { createMDX } from "fumadocs-mdx/next";
import MonacoWebpackPlugin from "monaco-editor-webpack-plugin";
const withMDX = createMDX();
/** @type {import('next').NextConfig} */
@@ -16,7 +15,12 @@ const config = {
"twoslash",
"typescript",
],
webpack: (config, { isServer }) => {
turbopack: {
resolveAlias: {
fs: { browser: "./fallback.js" },
},
},
webpack: (config) => {
if (Array.isArray(config.target) && config.target.includes("web")) {
config.target = ["web", "es2020"];
}
@@ -28,14 +32,6 @@ const config = {
};
config.resolve.fallback ??= {};
config.resolve.fallback.fs = false;
if (!isServer) {
config.plugins.push(
new MonacoWebpackPlugin({
languages: ["typescript"],
filename: "static/[name].worker.js",
}),
);
}
config.resolve.alias["replicate"] = false;
return config;
},
+11 -9
View File
@@ -1,18 +1,19 @@
{
"name": "@llamaindex/doc",
"version": "0.2.11",
"version": "0.2.12",
"private": true,
"scripts": {
"postinstall": "fumadocs-mdx",
"prebuild": "pnpm run build:docs",
"build": "next build",
"dev": "next dev",
"dev": "next dev --turbo",
"start": "next start",
"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": {
"@huggingface/transformers": "^3.5.0",
"@icons-pack/react-simple-icons": "^10.1.0",
"@llama-flow/docs": "0.0.3",
"@llamaindex/chat-ui": "0.2.0",
@@ -23,6 +24,7 @@
"@llamaindex/readers": "workspace:*",
"@llamaindex/workflow": "workspace:*",
"@mdx-js/mdx": "^3.1.0",
"@monaco-editor/react": "^4.7.0",
"@number-flow/react": "^0.3.4",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-icons": "^1.3.2",
@@ -40,9 +42,9 @@
"fumadocs-core": "^15.2.7",
"fumadocs-docgen": "^2.0.0",
"fumadocs-mdx": "^11.6.0",
"fumadocs-openapi": "^6.3.0",
"fumadocs-openapi": "^8.0.1",
"fumadocs-twoslash": "^3.1.1",
"fumadocs-typescript": "^3.1.0",
"fumadocs-typescript": "^4.0.2",
"fumadocs-ui": "^15.2.7",
"hast-util-to-jsx-runtime": "^2.3.2",
"llamaindex": "workspace:*",
@@ -52,7 +54,6 @@
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-icons": "^5.3.0",
"react-monaco-editor": "^0.56.2",
"react-use-measure": "^2.1.1",
"rehype-katex": "^7.0.1",
"remark-math": "^6.0.0",
@@ -64,6 +65,8 @@
"tailwindcss-animate": "^1.0.7",
"tree-sitter": "^0.22.1",
"tree-sitter-typescript": "^0.23.2",
"ts-morph": "^25.0.1",
"twoslash": "^0.3.1",
"use-stick-to-bottom": "^1.0.42",
"web-tree-sitter": "^0.24.4",
"zod": "^3.23.8"
@@ -79,7 +82,6 @@
"cross-env": "^7.0.3",
"fast-glob": "^3.3.2",
"gray-matter": "^4.0.3",
"monaco-editor-webpack-plugin": "^7.1.0",
"postcss": "^8.5.3",
"raw-loader": "^4.0.2",
"remark": "^15.0.1",
@@ -88,9 +90,9 @@
"remark-stringify": "^11.0.0",
"tailwindcss": "^4.0.9",
"tsx": "^4.19.3",
"typedoc": "0.27.4",
"typedoc-plugin-markdown": "^4.3.1",
"typedoc-plugin-merge-modules": "^6.1.0",
"typedoc": "0.28.2",
"typedoc-plugin-markdown": "^4.6.2",
"typedoc-plugin-merge-modules": "^7.0.0",
"typescript": "^5.7.3"
}
}

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 236 KiB

Before

Width:  |  Height:  |  Size: 540 KiB

After

Width:  |  Height:  |  Size: 540 KiB

+6 -2
View File
@@ -1,9 +1,13 @@
import { generateFiles as openapiGenerateFiles } from "fumadocs-openapi";
import { generateFiles as typescriptGenerateFiles } from "fumadocs-typescript";
import {
createGenerator,
generateFiles as typescriptGenerateFiles,
} from "fumadocs-typescript";
import fs from "node:fs";
import * as path from "node:path";
import { rimrafSync } from "rimraf";
const generator = createGenerator();
const out = "./src/content/docs/cloud/api";
const apiRefOut = "./src/content/docs/api";
@@ -20,7 +24,7 @@ void openapiGenerateFiles({
groupBy: "tag",
});
void typescriptGenerateFiles({
void typescriptGenerateFiles(generator, {
input: ["./src/content/docs/api/**/*.mdx"],
output: (file) => path.resolve(path.dirname(file), path.basename(file)),
transformOutput,
+3
View File
@@ -8,6 +8,9 @@ import remarkMath from "remark-math";
export const docs = defineDocs({
dir: ["./src/content/docs", "./node_modules/@llama-flow/docs"],
docs: {
async: true,
},
});
export default defineConfig({
+49 -65
View File
@@ -10,16 +10,55 @@ import { MagicMove } from "@/components/magic-move";
import { NpmInstall } from "@/components/npm-install";
import { Supports } from "@/components/supports";
import { Button } from "@/components/ui/button";
import { Skeleton } from "@/components/ui/skeleton";
import { DOCUMENT_URL } from "@/lib/const";
import { SiStackblitz } from "@icons-pack/react-simple-icons";
import {
CodeBlock as FumaCodeBlock,
Pre,
} from "fumadocs-ui/components/codeblock";
import { Blocks, Bot, Footprints, Terminal } from "lucide-react";
import Link from "next/link";
import { Suspense } from "react";
const codes = [
`import { openai } from "@llamaindex/openai";
const llm = openai();
const response = await llm.complete({ prompt: "How are you?" });`,
`import { openai } from "@llamaindex/openai";
const llm = openai();
const response = await llm.chat({
messages: [{ content: "Tell me a joke.", role: "user" }],
});`,
`import { agent } from "llamaindex";
import { openai } from "@llamaindex/openai";
const analyseAgent = agent({
llm: openai({ model: "gpt-4o" }),
tools: [analyseTools],
systemPrompt,
});
const response = await analyseAgent.run(\`Analyse the given data:
\${data}\`);`,
`import { agent, multiAgent } from "llamaindex";
import { openai } from "@llamaindex/openai";
const analyseAgent = agent({
name: "AnalyseAgent",
llm: openai({ model: "gpt-4o" }),
tools: [analyseTools],
});
const reporterAgent = agent({
name: "ReporterAgent",
llm: openai({ model: "gpt-4o" }),
tools: [reporterTools],
canHandoffTo: [analyseAgent],
});
const agents = multiAgent({
agents: [analyseAgent, reporterAgent],
rootAgent: reporterAgent,
});
const response = await agents.run(\`Analyse the given data:
\${data}\`);`,
];
export default function HomePage() {
return (
@@ -62,65 +101,10 @@ export default function HomePage() {
heading="From the simplest to the most complex"
description="LlamaIndex.TS is designed to be simple to get started, but powerful enough to build complex, agentic AI applications using multi-agents."
>
<Suspense
fallback={
<FumaCodeBlock allowCopy={false}>
<Pre>
<div className="space-y-2">
<Skeleton className="h-4 w-[250px]" />
<Skeleton className="h-4 w-[200px]" />
</div>
</Pre>
</FumaCodeBlock>
}
>
<MagicMove
code={[
`import { openai } from "@llamaindex/openai";
const llm = openai();
const response = await llm.complete({ prompt: "How are you?" });`,
`import { openai } from "@llamaindex/openai";
const llm = openai();
const response = await llm.chat({
messages: [{ content: "Tell me a joke.", role: "user" }],
});`,
`import { agent } from "llamaindex";
import { openai } from "@llamaindex/openai";
const analyseAgent = agent({
llm: openai({ model: "gpt-4o" }),
tools: [analyseTools],
systemPrompt,
});
const response = await analyseAgent.run(\`Analyse the given data:
\${data}\`);`,
`import { agent, multiAgent } from "llamaindex";
import { openai } from "@llamaindex/openai";
const analyseAgent = agent({
name: "AnalyseAgent",
llm: openai({ model: "gpt-4o" }),
tools: [analyseTools],
});
const reporterAgent = agent({
name: "ReporterAgent",
llm: openai({ model: "gpt-4o" }),
tools: [reporterTools],
canHandoffTo: [analyseAgent],
});
const agents = multiAgent({
agents: [analyseAgent, reporterAgent],
rootAgent: reporterAgent,
});
const response = await agents.run(\`Analyse the given data:
\${data}\`);`,
]}
/>
</Suspense>
<MagicMove
placeholder={<CodeBlock lang="ts" code={codes[0]} />}
code={codes}
/>
</Feature>
<Feature
icon={Bot}
+9 -1
View File
@@ -1,4 +1,12 @@
import { source } from "@/lib/source";
import { structure } from "fumadocs-core/mdx-plugins";
import { createFromSource } from "fumadocs-core/search/server";
export const { GET } = createFromSource(source);
// TODO: migrate to another search service, I don't think Vercel can handle that many of documents.
export const { GET } = createFromSource(source, (page) => ({
id: page.url,
title: page.data.title,
description: page.data.description,
url: page.url,
structuredData: structure(page.data.content),
}));
+21 -7
View File
@@ -1,7 +1,13 @@
import { ChatDemoRSC } from "@/components/demo/chat/rsc/demo";
import * as demos from "@/components/demo/lazy";
import { createMetadata, metadataImage } from "@/lib/metadata";
import { openapi, source } from "@/lib/source";
import * as Icons from "@icons-pack/react-simple-icons";
import { APIPage } from "fumadocs-openapi/ui";
import { Popup, PopupContent, PopupTrigger } from "fumadocs-twoslash/ui";
import { createTypeTable } from "fumadocs-typescript/ui";
import { createGenerator } from "fumadocs-typescript";
import { AutoTypeTable } from "fumadocs-typescript/ui";
import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
import defaultMdxComponents from "fumadocs-ui/mdx";
import {
@@ -12,6 +18,8 @@ import {
} from "fumadocs-ui/page";
import { notFound } from "next/navigation";
const generator = createGenerator();
export const revalidate = false;
export default async function Page(props: {
@@ -21,14 +29,13 @@ export default async function Page(props: {
const page = source.getPage(params.slug);
if (!page) notFound();
const { AutoTypeTable } = createTypeTable();
const MDX = page.data.body;
const { body: MDX, toc, lastModified } = await page.data.load();
return (
<DocsPage
toc={page.data.toc}
toc={toc}
full={page.data.full}
lastUpdate={page.data.lastModified}
lastUpdate={lastModified}
editOnGithub={{
owner: "run-llama",
repo: "LlamaIndexTS",
@@ -41,14 +48,21 @@ export default async function Page(props: {
<DocsBody>
<MDX
components={{
...Icons,
...defaultMdxComponents,
APIPage: openapi.APIPage,
...demos,
ChatDemoRSC,
Accordion,
Accordions,
APIPage: (props) => <APIPage {...openapi.getAPIPageProps(props)} />,
Tab,
Tabs,
Popup,
PopupContent,
PopupTrigger,
AutoTypeTable,
AutoTypeTable: (props) => (
<AutoTypeTable generator={generator} {...props} />
),
}}
/>
</DocsBody>
@@ -1,24 +1,26 @@
"use client";
import { createContextState } from "foxact/context-state";
import { useIsClient } from "foxact/use-is-client";
import { CodeBlock, Pre } from "fumadocs-ui/components/codeblock";
import { lazy, Suspense, use, useMemo } from "react";
import { StickToBottom, useStickToBottomContext } from "use-stick-to-bottom";
import Parser from "web-tree-sitter";
import { Label } from "@/components/ui/label";
import { Skeleton } from "@/components/ui/skeleton";
import { Slider } from "@/components/ui/slider";
import { CodeSplitter } from "@llamaindex/node-parser/code";
import { Editor } from "@monaco-editor/react";
import { createContextState } from "foxact/context-state";
import { useIsClient } from "foxact/use-is-client";
import { useShiki } from "fumadocs-core/highlight/client";
import { CodeBlock, Pre } from "fumadocs-ui/components/codeblock";
import { Suspense, use, useMemo } from "react";
import { StickToBottom, useStickToBottomContext } from "use-stick-to-bottom";
let promise: Promise<CodeSplitter>;
if (typeof window !== "undefined") {
promise = Parser.init({
locateFile(scriptName: string) {
return "/" + scriptName;
},
}).then(async () => {
async function run() {
const { default: Parser } = await import("web-tree-sitter");
await Parser.init({
locateFile(scriptName: string) {
return "/" + scriptName;
},
});
const parser = new Parser();
const Lang = await Parser.Language.load("/tree-sitter-typescript.wasm");
parser.setLanguage(Lang);
@@ -26,7 +28,9 @@ if (typeof window !== "undefined") {
getParser: () => parser,
maxChars: 100,
});
});
}
promise = run();
}
const [SliderProvider, useSlider, useSetSlider] = createContextState(100);
@@ -48,8 +52,6 @@ const john: Person = {
console.log(greet(john));`);
const Editor = lazy(() => import("react-monaco-editor"));
export const IDE = () => {
const codeSplitter = use(promise);
const code = useCode();
@@ -73,21 +75,6 @@ export const IDE = () => {
/>
</div>
<Editor
editorWillMount={() => {}}
editorDidMount={() => {
window.MonacoEnvironment!.getWorkerUrl = (
_moduleId: string,
label: string,
) => {
if (label === "json") return "/_next/static/json.worker.js";
if (label === "css") return "/_next/static/css.worker.js";
if (label === "html") return "/_next/static/html.worker.js";
if (label === "typescript" || label === "javascript")
return "/_next/static/ts.worker.js";
return "/_next/static/editor.worker.js";
};
}}
editorWillUnmount={() => {}}
options={{
minimap: {
enabled: false,
@@ -97,7 +84,9 @@ export const IDE = () => {
height="100%"
width="100%"
language="typescript"
onChange={setCode}
onChange={(v) => {
if (v) setCode(v);
}}
value={code}
/>
</div>
+18
View File
@@ -0,0 +1,18 @@
"use client";
import dynamic from "next/dynamic";
// lazy load client components
export const ChatDemo = dynamic(() =>
import("@/components/demo/chat/api/demo").then((mod) => mod.ChatDemo),
);
export const CodeNodeParserDemo = dynamic(() =>
import("@/components/demo/code-node-parser").then(
(mod) => mod.CodeNodeParserDemo,
),
);
export const WorkflowStreamingDemo = dynamic(() =>
import("@/components/demo/workflow-streaming-ui").then(
(mod) => mod.WorkflowStreamingDemo,
),
);
+26 -21
View File
@@ -1,25 +1,27 @@
"use client";
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import { CodeBlock, Pre } from "fumadocs-ui/components/codeblock";
import { CodeBlock } from "fumadocs-ui/components/codeblock";
import { RotateCcw } from "lucide-react";
import { useTheme } from "next-themes";
import { use, useCallback, useEffect, useState } from "react";
import { getSingletonHighlighter } from "shiki";
import { type ReactNode, use, useCallback, useEffect, useState } from "react";
import { createJavaScriptRegexEngine, getSingletonHighlighter } from "shiki";
import { ShikiMagicMove } from "shiki-magic-move/react";
import { createOnigurumaEngine } from "shiki/engine/oniguruma";
const engine = createJavaScriptRegexEngine();
const highlighterPromise = getSingletonHighlighter({
engine: createOnigurumaEngine(() => import("shiki/wasm")),
engine,
themes: ["vesper", "github-light"],
langs: ["js", "ts", "tsx"],
});
export type MagicMoveProps = {
code: string[];
placeholder: ReactNode;
};
export function MagicMove(props: MagicMoveProps) {
const [mounted, setMounted] = useState(false);
const [move, setMove] = useState<number>(0);
const currentCode = props.code[move];
const highlighter = use(highlighterPromise);
@@ -38,24 +40,27 @@ export function MagicMove(props: MagicMoveProps) {
}
}, [animate, move, props.code]);
useEffect(() => {
setMounted(true);
}, []);
if (!mounted) return props.placeholder;
return (
<CodeBlock allowCopy={false}>
{highlighter && (
<Pre>
<ShikiMagicMove
lang="ts"
theme={resolvedTheme === "dark" ? "vesper" : "github-light"}
highlighter={highlighter}
code={currentCode}
options={{
duration: 800,
stagger: 0.3,
lineNumbers: false,
containerStyle: false,
}}
/>
</Pre>
)}
<ShikiMagicMove
className="shiki !block p-4 *:!inline"
lang="ts"
theme={resolvedTheme === "dark" ? "vesper" : "github-light"}
highlighter={highlighter}
code={currentCode}
options={{
duration: 800,
stagger: 0.3,
lineNumbers: false,
containerStyle: false,
}}
/>
<Button
className={cn(
"absolute bottom-2 right-2",
@@ -18,4 +18,4 @@ npm run dev
to start the development server. You can then visit [http://localhost:3000](http://localhost:3000) to see your app, which should look something like this:
![create-llama interface](./images/create_llama.png)
![create-llama interface](/images/create_llama.png)
@@ -3,13 +3,6 @@ title: With Cloudflare Worker
description: In this guide, you'll learn how to use LlamaIndex with CloudFlare Worker
---
import {
SiNodedotjs,
SiDeno,
SiBun,
SiCloudflareworkers,
} from "@icons-pack/react-simple-icons";
Before you start, make sure you have try LlamaIndex.TS in Node.js to make sure you understand the basics.
<Card
@@ -3,14 +3,6 @@ title: Installation
description: How to install llamaindex packages.
---
import {
SiNodedotjs,
SiTypescript,
SiNextdotjs,
SiCloudflareworkers,
SiVite
} from "@icons-pack/react-simple-icons";
To install llamaindex, run the following command:
```package-install
@@ -3,13 +3,6 @@ title: What is LlamaIndex.TS
description: LlamaIndex is the leading data framework for building LLM applications
---
import {
SiNodedotjs,
SiDeno,
SiBun,
SiCloudflareworkers,
} from "@icons-pack/react-simple-icons";
LlamaIndex is a framework for building context-augmented generative AI applications with LLMs including agents and workflows.
The TypeScript implementation is designed for JavaScript server side applications using <SiNodedotjs className="inline" color="#5FA04E" /> Node.js, <SiDeno className="inline" color="#70FFAF" /> Deno, <SiBun className="inline" /> Bun, <SiCloudflareworkers className="inline" color="#F38020" /> Cloudflare Workers, and more.
@@ -2,9 +2,6 @@
title: Workflows
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!@/examples/workflow/joke.ts";
A `Workflow` in LlamaIndexTS is an event-driven abstraction used to chain together several events. Workflows are made up of `steps`, with each step responsible for handling certain event types and emitting new events.
Workflows in LlamaIndexTS work by defining step functions that handle specific event types and emit new events.
@@ -22,7 +19,7 @@ npm i @llamaindex/workflow
As an illustrative example, let's consider a naive workflow where a joke is generated and then critiqued.
<DynamicCodeBlock lang="ts" code={CodeSource} />
<include cwd>../../examples/workflow/joke.ts</include>
There's a few moving pieces here, so let's go through this piece by piece.
@@ -3,10 +3,6 @@ title: Managed Index
description: Managed index using LlamaCloud
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!@/examples/cloud/chat.ts";
import CodeSource2 from "!raw-loader!@/examples/cloud/from-documents.ts";
LlamaCloud is a new generation of managed parsing, ingestion, and retrieval services, designed to bring production-grade context-augmentation to your LLM and RAG applications.
LlamaCloud supports
@@ -22,13 +18,13 @@ Visit [LlamaCloud](https://cloud.llamaindex.ai) to sign in and get an API key.
Here's an example of how to create a managed index by ingesting a couple of documents:
<DynamicCodeBlock lang="ts" code={CodeSource2} />
<include cwd>../../examples/cloud/chat.ts</include>
## Use a Managed Index
Here's an example of how to use a managed index together with a chat engine:
<DynamicCodeBlock lang="ts" code={CodeSource} />
<include cwd>../../examples/cloud/from-documents.ts</include>
## API Reference
@@ -2,7 +2,6 @@
title: Node Parsers / Text Splitters
description: Learn how to use Node Parsers and Text Splitters to extract data from documents.
---
import { CodeNodeParserDemo } from '@/components/demo/code-node-parser.tsx';
Node parsers are a simple abstraction that take a list of `Document` objects, 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/data).
@@ -150,8 +149,6 @@ Try it out ⬇️
<CodeNodeParserDemo/>
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
<Accordions>
<Accordion title="Use it in browser">
You might setup WASM files for `web-tree-sitter` and use it in the browser.
@@ -2,9 +2,6 @@
title: DiscordReader
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!@/examples/readers/src/discord";
DiscordReader is a simple data loader that reads all messages in a given Discord channel and returns them as Document objects.
It uses the [@discordjs/rest](https://github.com/discordjs/discord.js/tree/main/packages/rest) library to fetch the messages.
@@ -15,7 +12,7 @@ In your Discord Application, go to the `OAuth2` tab and generate an invite URL b
This will invite the bot with the necessary permissions to read messages.
Copy the URL in your browser and select the server you want your bot to join.
<DynamicCodeBlock lang="ts" code={CodeSource} />
<include cwd>../../examples/readers/src/discord.ts</include>
### Params
@@ -3,11 +3,6 @@ title: Loading Data
description: Loading data using Readers into Documents
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!@/examples/readers/src/simple-directory-reader";
import CodeSource2 from "!raw-loader!@/examples/readers/src/custom-simple-directory-reader";
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
Before you can start indexing your documents, you need to load them into memory.
A reader is a module that loads data from a file into a `Document` object.
@@ -55,7 +50,7 @@ LlamaIndex.TS supports easy loading of files from folders using the `SimpleDirec
It is a simple reader that reads all files from a directory and its subdirectories and delegates the actual reading to the reader specified in the `fileExtToReader` map.
<DynamicCodeBlock lang="ts" code={CodeSource} />
<include cwd>../../examples/readers/src/simple-directory-reader.ts</include>
Currently, the following readers are mapped to specific file types:
@@ -77,7 +72,7 @@ SimpleDirectoryReader supports up to 9 concurrent requests. Use the `numWorkers`
### Example
<DynamicCodeBlock lang="ts" code={CodeSource2} />
<include cwd>../../examples/readers/src/custom-simple-directory-reader.ts</include>
## Tips when using in non-Node.js environments
@@ -2,10 +2,6 @@
title: LlamaParse
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!@/examples/readers/src/llamaparse";
import CodeSource2 from "!raw-loader!@/examples/readers/src/simple-directory-reader-with-llamaparse.ts";
LlamaParse is an API created by LlamaIndex to efficiently parse files, e.g. it's great at converting PDF tables into markdown.
To use it, first login and get an API key from https://cloud.llamaindex.ai. Make sure to store the key as `apiKey` parameter or in the environment variable `LLAMA_CLOUD_API_KEY`.
@@ -17,7 +13,7 @@ Official documentation for LlamaParse can be found [here](https://docs.cloud.lla
You can then use the `LlamaParseReader` class to load local files and convert them into a parsed document that can be used by LlamaIndex.
See [reader.ts](https://github.com/run-llama/LlamaIndexTS/blob/main/packages/cloud/src/reader.ts) for a list of supported file types:
<DynamicCodeBlock lang="ts" code={CodeSource} />
<include cwd>../../examples/readers/src/llamaparse.ts</include>
### Params
@@ -60,7 +56,7 @@ They can be divided into two groups.
Below a full example of `LlamaParse` integrated in `SimpleDirectoryReader` with additional options.
<DynamicCodeBlock lang="ts" code={CodeSource2} />
<include cwd>../../examples/readers/src/simple-directory-reader-with-llamaparse.ts</include>
## API Reference
@@ -2,9 +2,6 @@
title: Groq
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!@/examples/groq.ts";
## Installation
```package-install
@@ -58,7 +55,7 @@ const results = await queryEngine.query({
## Full Example
<DynamicCodeBlock lang="ts" code={CodeSource} />
<include cwd>../../examples/groq.ts</include>
## API Reference
@@ -2,7 +2,6 @@
title: Using API Route
description: Chat interface for your LlamaIndexTS application using API Route
---
import { ChatDemo } from '../../../../../components/demo/chat/api/demo';
Using [chat-ui](https://github.com/run-llama/chat-ui), it's easy to add a chat interface to your LlamaIndexTS application.
You just need to create an API route that provides an `api/chat` endpoint and a chat component to consume the API.
@@ -2,7 +2,6 @@
title: Using Next.js RSC
description: Chat interface for your LlamaIndexTS application using Next.js RSC
---
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).
@@ -3,13 +3,6 @@ title: More
description: More
---
import {
SiGithub,
SiNpm,
SiX,
SiDiscord,
} from "@icons-pack/react-simple-icons";
## 🗺️ Ecosystem
To download or contribute, find LlamaIndex on:
@@ -8,7 +8,7 @@ In this guide we'll walk you through the process of building an Agent in JavaScr
In LlamaIndex, an agent is a semi-autonomous piece of software powered by an LLM that is given a task and executes a series of steps towards solving that task. It is given a set of tools, which can be anything from arbitrary functions up to full LlamaIndex query engines, and it selects the best available tool to complete each step. When each step is completed, the agent judges whether the task is now complete, in which case it returns a result to the user, or whether it needs to take another step, in which case it loops back to the start.
![agent flow](./images/agent_flow.png)
![agent flow](/images/agent_flow.png)
## Install LlamaIndex.TS
@@ -2,9 +2,6 @@
title: Basic Agent
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!@/examples/agent/openai";
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
@@ -27,7 +24,7 @@ Create the file `example.ts`. This code will:
- Give an example of the data structure we wish to generate
- Prompt the LLM with instructions and the example, plus a sample transcript
<DynamicCodeBlock lang="ts" code={CodeSource} />
<include cwd>../../examples/agent/openai.ts</include>
To run the code:
@@ -2,10 +2,6 @@
title: Retrieval Augmented Generation (RAG)
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!@/examples/vectorIndex";
import TSConfigSource from "!!raw-loader!@/examples/tsconfig.json";
One of the most common use-cases for LlamaIndex is Retrieval-Augmented Generation or RAG, in which your data is indexed and selectively retrieved to be given to an LLM as source material for responding to a query. You can learn more about the [concepts behind RAG](/docs/llamaindex/tutorials/rag/concepts).
## Set up the project
@@ -30,11 +26,11 @@ Create the file `example.ts`. This code will
- index it (which creates embeddings using OpenAI)
- create a query engine to answer questions about the data
<DynamicCodeBlock lang="ts" code={CodeSource} />
<include cwd>../../examples/vectorIndex.ts</include>
Create a `tsconfig.json` file in the same folder:
<DynamicCodeBlock lang="json" code={TSConfigSource} />
<include cwd>../../examples/tsconfig.json</include>
Now you can run the code with
@@ -2,9 +2,6 @@
title: Structured data extraction
---
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
import CodeSource from "!raw-loader!@/examples/jsonExtract";
Make sure you have installed LlamaIndex.TS and have an OpenAI key. If you haven't, check out the [installation](/docs/llamaindex/getting_started/installation) guide.
You can use [other LLMs](/docs/llamaindex/modules/models/llms) via their APIs; if you would prefer to use local models check out our [local LLM example](/docs/llamaindex/tutorials/local_llm).
@@ -26,7 +23,7 @@ Create the file `example.ts`. This code will:
- Give an example of the data structure we wish to generate
- Prompt the LLM with instructions and the example, plus a sample transcript
<DynamicCodeBlock lang="ts" code={CodeSource} />
<include cwd>../../examples/jsonExtract.ts</include>
To run the code:
@@ -164,8 +164,6 @@ This step means that it requires either `AEvent` or `BEvent`. It will return a `
You can still combine the logic with `context.requireEvent` to get the data from the event.
import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
<Accordions>
<Accordion title="Under the hood">
We use JavaScript Inheritance and the prototype chain to implement the `or` logic.
@@ -2,7 +2,6 @@
title: Streaming
description: Learn how to use the LlamaIndex workflow with streaming.
---
import { WorkflowStreamingDemo } from '../../../../../components/demo/workflow-streaming-ui';
`Workflow` API by default is designed for streaming data. In this guide, we will show you how to use the `Workflow` API with streaming data.
@@ -1,5 +1,11 @@
# @llamaindex/cloudflare-worker-agent-test
## 0.0.155
### Patch Changes
- llamaindex@0.10.1
## 0.0.154
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/cloudflare-worker-agent-test",
"version": "0.0.154",
"version": "0.0.155",
"type": "module",
"private": true,
"scripts": {
+6
View File
@@ -1,5 +1,11 @@
# @llamaindex/next-agent-test
## 0.1.155
### Patch Changes
- llamaindex@0.10.1
## 0.1.154
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/next-agent-test",
"version": "0.1.154",
"version": "0.1.155",
"private": true,
"scripts": {
"dev": "next dev",
@@ -1,5 +1,11 @@
# test-edge-runtime
## 0.1.154
### Patch Changes
- llamaindex@0.10.1
## 0.1.153
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/nextjs-edge-runtime-test",
"version": "0.1.153",
"version": "0.1.154",
"private": true,
"scripts": {
"dev": "next dev",
@@ -1,5 +1,12 @@
# @llamaindex/next-node-runtime
## 0.1.21
### Patch Changes
- llamaindex@0.10.1
- @llamaindex/huggingface@0.1.5
## 0.1.20
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/next-node-runtime-test",
"version": "0.1.20",
"version": "0.1.21",
"private": true,
"scripts": {
"dev": "next dev",
@@ -1,5 +1,11 @@
# vite-import-llamaindex
## 0.0.21
### Patch Changes
- llamaindex@0.10.1
## 0.0.20
### Patch Changes
@@ -1,7 +1,7 @@
{
"name": "vite-import-llamaindex",
"private": true,
"version": "0.0.20",
"version": "0.0.21",
"type": "module",
"scripts": {
"build": "vite build",
@@ -1,5 +1,11 @@
# @llamaindex/waku-query-engine-test
## 0.0.155
### Patch Changes
- llamaindex@0.10.1
## 0.0.154
### Patch Changes
+5 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/waku-query-engine-test",
"version": "0.0.154",
"version": "0.0.155",
"type": "module",
"private": true,
"scripts": {
@@ -14,13 +14,14 @@
"react": "19.0.0",
"react-dom": "19.0.0",
"react-server-dom-webpack": "19.0.0",
"waku": "0.21.20"
"waku": "0.22.2"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.4",
"@types/react": "19.0.10",
"@types/react-dom": "19.0.4",
"autoprefixer": "^10.4.20",
"tailwindcss": "^4.0.9",
"rollup": "4.38.0",
"tailwindcss": "^4.1.4",
"typescript": "5.7.3"
}
}
+10 -19
View File
@@ -21,19 +21,21 @@ test.beforeEach(() => {
callback.mock.resetCalls();
});
await test("clip embedding", async (t) => {
await test.skip("clip embedding", async (t) => {
const major = parseInt(process.versions.node.split(".")[0] ?? "0", 10);
if (major < 20) {
t.skip("Skip CLIP tests on Node.js < 20");
return;
}
const imageUrl = new URL(
"../../fixtures/img/llamaindex-white.png",
import.meta.url,
);
await t.test("should trigger load transformer event", async () => {
const nodes = [
new ImageNode({
image: new URL(
"../../fixtures/img/llamaindex-white.png",
import.meta.url,
),
image: imageUrl,
}),
];
assert.equal(callback.mock.callCount(), 0);
@@ -46,21 +48,14 @@ await test("clip embedding", async (t) => {
await t.test("init & get image embedding", async () => {
const clipEmbedding = new ClipEmbedding();
const imgUrl = new URL(
"../../fixtures/img/llamaindex-white.png",
import.meta.url,
);
const vec = await clipEmbedding.getImageEmbedding(imgUrl);
const vec = await clipEmbedding.getImageEmbedding(imageUrl);
assert.ok(vec);
});
await t.test("load image document", async () => {
const nodes = [
new ImageNode({
image: new URL(
"../../fixtures/img/llamaindex-white.png",
import.meta.url,
),
image: imageUrl,
}),
];
const clipEmbedding = new ClipEmbedding();
@@ -80,12 +75,8 @@ await test("clip embedding", async (t) => {
}),
);
const clipEmbedding = new ClipEmbedding();
const imgUrl = new URL(
"../../fixtures/img/llamaindex-white.png",
import.meta.url,
);
assert.equal(getter.mock.callCount(), 0);
const vec = await clipEmbedding.getImageEmbedding(imgUrl);
const vec = await clipEmbedding.getImageEmbedding(imageUrl);
assert.ok(vec);
assert.ok(getter.mock.callCount() > 0);
});
+1 -1
View File
@@ -10,7 +10,7 @@
},
"devDependencies": {
"@faker-js/faker": "^9.2.0",
"@huggingface/transformers": "^3.0.2",
"@huggingface/transformers": "^3.5.0",
"@llamaindex/anthropic": "workspace:*",
"@llamaindex/clip": "workspace:*",
"@llamaindex/core": "workspace:*",
+18
View File
@@ -1,5 +1,23 @@
# examples
## 0.3.8
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
- llamaindex@0.10.1
- @llamaindex/clip@0.0.51
- @llamaindex/deepinfra@0.0.51
- @llamaindex/deepseek@0.0.11
- @llamaindex/fireworks@0.0.11
- @llamaindex/groq@0.0.66
- @llamaindex/huggingface@0.1.5
- @llamaindex/jinaai@0.0.11
- @llamaindex/perplexity@0.0.8
- @llamaindex/together@0.0.11
- @llamaindex/vllm@0.0.37
## 0.3.7
### Patch Changes
+13 -13
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/examples",
"version": "0.3.7",
"version": "0.3.8",
"private": true,
"scripts": {
"lint": "eslint .",
@@ -15,16 +15,16 @@
"@llamaindex/astra": "^0.0.16",
"@llamaindex/azure": "^0.1.11",
"@llamaindex/chroma": "^0.0.16",
"@llamaindex/clip": "^0.0.50",
"@llamaindex/clip": "^0.0.51",
"@llamaindex/cloud": "^4.0.3",
"@llamaindex/cohere": "^0.0.16",
"@llamaindex/core": "^0.6.2",
"@llamaindex/deepinfra": "^0.0.50",
"@llamaindex/deepinfra": "^0.0.51",
"@llamaindex/env": "^0.1.29",
"@llamaindex/firestore": "^1.0.9",
"@llamaindex/google": "^0.2.3",
"@llamaindex/groq": "^0.0.65",
"@llamaindex/huggingface": "^0.1.4",
"@llamaindex/groq": "^0.0.66",
"@llamaindex/huggingface": "^0.1.5",
"@llamaindex/milvus": "^0.1.11",
"@llamaindex/mistral": "^0.1.2",
"@llamaindex/mixedbread": "^0.0.16",
@@ -32,7 +32,7 @@
"@llamaindex/elastic-search": "^0.1.2",
"@llamaindex/node-parser": "^2.0.2",
"@llamaindex/ollama": "^0.1.2",
"@llamaindex/openai": "^0.3.2",
"@llamaindex/openai": "^0.3.3",
"@llamaindex/pinecone": "^0.1.2",
"@llamaindex/portkey-ai": "^0.0.44",
"@llamaindex/postgres": "^0.0.45",
@@ -41,15 +41,15 @@
"@llamaindex/replicate": "^0.0.44",
"@llamaindex/upstash": "^0.0.16",
"@llamaindex/vercel": "^0.1.2",
"@llamaindex/vllm": "^0.0.36",
"@llamaindex/vllm": "^0.0.37",
"@llamaindex/voyage-ai": "^1.0.8",
"@llamaindex/weaviate": "^0.0.16",
"@llamaindex/workflow": "^1.0.3",
"@llamaindex/deepseek": "^0.0.10",
"@llamaindex/fireworks": "^0.0.10",
"@llamaindex/together": "^0.0.10",
"@llamaindex/jinaai": "^0.0.10",
"@llamaindex/perplexity": "^0.0.7",
"@llamaindex/deepseek": "^0.0.11",
"@llamaindex/fireworks": "^0.0.11",
"@llamaindex/together": "^0.0.11",
"@llamaindex/jinaai": "^0.0.11",
"@llamaindex/perplexity": "^0.0.8",
"@llamaindex/supabase": "^0.1.1",
"@llamaindex/tools": "^0.0.5",
"@notionhq/client": "^2.2.15",
@@ -60,7 +60,7 @@
"commander": "^12.1.0",
"dotenv": "^16.4.5",
"js-tiktoken": "^1.0.14",
"llamaindex": "^0.10.0",
"llamaindex": "^0.10.1",
"mongodb": "6.7.0",
"postgres": "^3.4.4",
"wikipedia": "^2.1.2",
+6
View File
@@ -1,5 +1,11 @@
# @llamaindex/autotool
## 7.0.1
### Patch Changes
- llamaindex@0.10.1
## 7.0.0
### Patch Changes
@@ -1,5 +1,12 @@
# @llamaindex/autotool-01-node-example
## 0.0.102
### Patch Changes
- llamaindex@0.10.1
- @llamaindex/autotool@7.0.1
## 0.0.101
### Patch Changes
@@ -13,5 +13,5 @@
"scripts": {
"start": "node --import tsx --import @llamaindex/autotool/node ./src/index.ts"
},
"version": "0.0.101"
"version": "0.0.102"
}
+1 -1
View File
@@ -6,7 +6,7 @@
"url": "git+https://github.com/run-llama/LlamaIndexTS.git",
"directory": "packages/autotool"
},
"version": "7.0.0",
"version": "7.0.1",
"description": "auto transpile your JS function to LLM Agent compatible",
"files": [
"dist",
+2 -2
View File
@@ -116,7 +116,7 @@
"test": "vitest"
},
"devDependencies": {
"@huggingface/transformers": "^3.0.2",
"@huggingface/transformers": "^3.5.0",
"@types/node": "^22.9.0",
"@types/readable-stream": "^4.0.15",
"vitest": "^2.1.5"
@@ -127,7 +127,7 @@
"js-tiktoken": "^1.0.12"
},
"peerDependencies": {
"@huggingface/transformers": "^3.0.2",
"@huggingface/transformers": "^3.5.0",
"gpt-tokenizer": "^2.5.0"
},
"peerDependenciesMeta": {
+6
View File
@@ -1,5 +1,11 @@
# @llamaindex/experimental
## 0.0.171
### Patch Changes
- llamaindex@0.10.1
## 0.0.170
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/experimental",
"description": "Experimental package for LlamaIndexTS",
"version": "0.0.170",
"version": "0.0.171",
"type": "module",
"types": "dist/type/index.d.ts",
"main": "dist/cjs/index.js",
+7
View File
@@ -1,5 +1,12 @@
# llamaindex
## 0.10.1
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.10.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "llamaindex",
"version": "0.10.0",
"version": "0.10.1",
"license": "MIT",
"type": "module",
"keywords": [
+7
View File
@@ -1,5 +1,12 @@
# @llamaindex/clip
## 0.0.51
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.0.50
### Patch Changes
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/clip",
"description": "Clip Embedding Adapter for LlamaIndex",
"version": "0.0.50",
"version": "0.0.51",
"type": "module",
"types": "dist/index.d.ts",
"main": "dist/index.cjs",
@@ -39,7 +39,7 @@
"dev": "bunchee --watch"
},
"dependencies": {
"@huggingface/transformers": "^3.0.2",
"@huggingface/transformers": "^3.5.0",
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"@llamaindex/openai": "workspace:*"
@@ -1,5 +1,12 @@
# @llamaindex/deepinfra
## 0.0.51
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.0.50
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/deepinfra",
"description": "Deepinfra Adapter for LlamaIndex",
"version": "0.0.50",
"version": "0.0.51",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
+7
View File
@@ -1,5 +1,12 @@
# @llamaindex/deepseek
## 0.0.11
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.0.10
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/deepseek",
"description": "DeepSeek Adapter for LlamaIndex",
"version": "0.0.10",
"version": "0.0.11",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
@@ -1,5 +1,12 @@
# @llamaindex/fireworks
## 0.0.11
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.0.10
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/fireworks",
"description": "Fireworks Adapter for LlamaIndex",
"version": "0.0.10",
"version": "0.0.11",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
+7
View File
@@ -1,5 +1,12 @@
# @llamaindex/groq
## 0.0.66
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.0.65
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/groq",
"description": "Groq Adapter for LlamaIndex",
"version": "0.0.65",
"version": "0.0.66",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
@@ -1,5 +1,12 @@
# @llamaindex/huggingface
## 0.1.5
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.1.4
### Patch Changes
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/huggingface",
"description": "Huggingface Adapter for LlamaIndex",
"version": "0.1.4",
"version": "0.1.5",
"type": "module",
"types": "dist/index.d.ts",
"main": "dist/index.cjs",
@@ -40,7 +40,7 @@
},
"dependencies": {
"@huggingface/inference": "^2.8.1",
"@huggingface/transformers": "^3.0.2",
"@huggingface/transformers": "^3.5.0",
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"@llamaindex/openai": "workspace:*"
@@ -1,4 +1,7 @@
import type { pipeline } from "@huggingface/transformers";
import type {
FeatureExtractionPipeline,
pipeline,
} from "@huggingface/transformers";
import { BaseEmbedding } from "@llamaindex/core/embeddings";
import { Settings } from "@llamaindex/core/global";
import {
@@ -35,9 +38,7 @@ export class HuggingFaceEmbedding extends BaseEmbedding {
modelType: string = HuggingFaceEmbeddingModelType.XENOVA_ALL_MINILM_L6_V2;
modelOptions: Parameters<typeof pipeline<"feature-extraction">>[2] = {};
private extractor: Awaited<
ReturnType<typeof pipeline<"feature-extraction">>
> | null = null;
private extractor: FeatureExtractionPipeline | null = null;
constructor(params: HuggingFaceEmbeddingParams = {}) {
super();
@@ -60,11 +61,11 @@ export class HuggingFaceEmbedding extends BaseEmbedding {
true,
);
});
this.extractor = await pipeline(
this.extractor = (await pipeline(
"feature-extraction",
this.modelType,
this.modelOptions,
);
)) as never;
}
return this.extractor;
}
+7
View File
@@ -1,5 +1,12 @@
# @llamaindex/jinaai
## 0.0.11
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.0.10
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/jinaai",
"description": "JinaAI Adapter for LlamaIndex",
"version": "0.0.10",
"version": "0.0.11",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
+6
View File
@@ -1,5 +1,11 @@
# @llamaindex/openai
## 0.3.3
### Patch Changes
- 96dd798: Add o3 and o4-mini models
## 0.3.2
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/openai",
"description": "OpenAI Adapter for LlamaIndex",
"version": "0.3.2",
"version": "0.3.3",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
+19
View File
@@ -59,6 +59,9 @@ export const GPT4_MODELS = {
"gpt-4.1": { contextWindow: 10 ** 6 },
"gpt-4.1-mini": { contextWindow: 10 ** 6 },
"gpt-4.1-nano": { contextWindow: 10 ** 6 },
"gpt-4.1-2025-04-14": { contextWindow: 10 ** 6 },
"gpt-4.1-mini-2025-04-14": { contextWindow: 10 ** 6 },
"gpt-4.1-nano-2025-04-14": { contextWindow: 10 ** 6 },
};
// NOTE we don't currently support gpt-3.5-turbo-instruct and don't plan to in the near future
@@ -100,6 +103,21 @@ export const O3_MODELS = {
"o3-mini-2025-01-31": {
contextWindow: 200000,
},
o3: {
contextWindow: 200000,
},
"o3-2025-04-16": {
contextWindow: 200000,
},
};
export const O4_MODELS = {
"o4-mini": {
contextWindow: 200000,
},
"o4-mini-2025-04-16": {
contextWindow: 200000,
},
};
/**
@@ -110,6 +128,7 @@ export const ALL_AVAILABLE_OPENAI_MODELS = {
...GPT35_MODELS,
...O1_MODELS,
...O3_MODELS,
...O4_MODELS,
} satisfies Record<ChatModel, { contextWindow: number }>;
export function isFunctionCallingModel(llm: LLM): llm is OpenAI {
@@ -1,5 +1,12 @@
# @llamaindex/perplexity
## 0.0.8
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.0.7
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/perplexity",
"description": "Perplexity Adapter for LlamaIndex",
"version": "0.0.7",
"version": "0.0.8",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
+7
View File
@@ -1,5 +1,12 @@
# @llamaindex/together
## 0.0.11
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.0.10
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/together",
"description": "Together Adapter for LlamaIndex",
"version": "0.0.10",
"version": "0.0.11",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
+7
View File
@@ -1,5 +1,12 @@
# @llamaindex/vllm
## 0.0.37
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
## 0.0.36
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/vllm",
"description": "vLLM Adapter for LlamaIndex",
"version": "0.0.36",
"version": "0.0.37",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
+6
View File
@@ -1,5 +1,11 @@
# @llamaindex/server
## 0.1.4
### Patch Changes
- llamaindex@0.10.1
## 0.1.3
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/server",
"description": "LlamaIndex Server",
"version": "0.1.3",
"version": "0.1.4",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
+3789 -3120
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -1,5 +1,13 @@
# @llamaindex/unit-test
## 0.1.21
### Patch Changes
- Updated dependencies [96dd798]
- @llamaindex/openai@0.3.3
- llamaindex@0.10.1
## 0.1.20
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/unit-test",
"private": true,
"version": "0.1.20",
"version": "0.1.21",
"type": "module",
"scripts": {
"test": "vitest run"