Compare commits

...

7 Commits

Author SHA1 Message Date
github-actions[bot] 9c1c5b4d50 Release 0.9.2 (#1673)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-21 10:57:11 +07:00
Thuc Pham c902fcbc33 chore: bump llamacloud openapi (#1674) 2025-02-20 17:47:41 +07:00
Thuc Pham 88d776f392 fix: enhance error message in llamacloud (#1672) 2025-02-20 16:33:34 +07:00
github-actions[bot] 6fcc6bcb84 Release @llamaindex/anthropic@0.1.2 (#1671)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-20 12:56:33 +07:00
Thuc Pham be74207945 fix: dont add empty text block to tool call (#1670) 2025-02-20 12:47:43 +07:00
Alex Yang 6be223dfad chore: bump version (#1668) 2025-02-19 19:28:12 +08:00
Alex Yang 4cbfdb5f5c ci: only run in pull request (#1669) 2025-02-19 19:11:53 +08:00
39 changed files with 5185 additions and 2339 deletions
+3 -1
View File
@@ -119,6 +119,7 @@ jobs:
size-limit:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
name: Size Limit
steps:
- uses: actions/checkout@v4
@@ -132,12 +133,13 @@ jobs:
run: pnpm install
- name: Build llamaindex
run: pnpm run build
- uses: andresz1/size-limit-action@v1
- uses: andresz1/size-limit-action@94bc357df29c36c8f8d50ea497c3e225c3c95d1d
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: e2e/examples/vite-import-llamaindex
skip_step: "install"
build_script: build
package_manager: pnpm
typecheck-examples:
runs-on: ubuntu-latest
+9
View File
@@ -1,5 +1,14 @@
# @llamaindex/doc
## 0.1.2
### Patch Changes
- Updated dependencies [c902fcb]
- Updated dependencies [88d776f]
- @llamaindex/cloud@3.0.2
- llamaindex@0.9.2
## 0.1.1
### Patch Changes
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/doc",
"version": "0.1.1",
"version": "0.1.2",
"private": true,
"scripts": {
"build": "pnpm run build:docs && next build",
@@ -44,10 +44,10 @@
"hast-util-to-jsx-runtime": "^2.3.2",
"llamaindex": "workspace:*",
"lucide-react": "^0.460.0",
"next": "15.0.3",
"next": "15.1.7",
"next-themes": "^0.4.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-icons": "^5.3.0",
"react-monaco-editor": "^0.56.2",
"react-text-transition": "^3.1.0",
@@ -1,5 +1,12 @@
# @llamaindex/cloudflare-worker-agent-test
## 0.0.136
### Patch Changes
- Updated dependencies [88d776f]
- llamaindex@0.9.2
## 0.0.135
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/cloudflare-worker-agent-test",
"version": "0.0.135",
"version": "0.0.136",
"type": "module",
"private": true,
"scripts": {
@@ -1,5 +1,12 @@
# @llamaindex/llama-parse-browser-test
## 0.0.47
### Patch Changes
- Updated dependencies [c902fcb]
- @llamaindex/cloud@3.0.2
## 0.0.46
### Patch Changes
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/llama-parse-browser-test",
"private": true,
"version": "0.0.46",
"version": "0.0.47",
"type": "module",
"scripts": {
"dev": "vite",
+7
View File
@@ -1,5 +1,12 @@
# @llamaindex/next-agent-test
## 0.1.136
### Patch Changes
- Updated dependencies [88d776f]
- llamaindex@0.9.2
## 0.1.135
### Patch Changes
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/next-agent-test",
"version": "0.1.135",
"version": "0.1.136",
"private": true,
"scripts": {
"dev": "next dev",
@@ -10,9 +10,9 @@
"dependencies": {
"ai": "^4.0.0",
"llamaindex": "workspace:*",
"next": "15.0.3",
"react": "18.3.1",
"react-dom": "18.3.1"
"next": "15.1.7",
"react": "19.0.0",
"react-dom": "19.0.0"
},
"devDependencies": {
"@types/node": "^22.9.0",
@@ -1,5 +1,12 @@
# test-edge-runtime
## 0.1.135
### Patch Changes
- Updated dependencies [88d776f]
- llamaindex@0.9.2
## 0.1.134
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/nextjs-edge-runtime-test",
"version": "0.1.134",
"version": "0.1.135",
"private": true,
"scripts": {
"dev": "next dev",
@@ -9,7 +9,7 @@
},
"dependencies": {
"llamaindex": "workspace:*",
"next": "15.0.3",
"next": "15.1.7",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
@@ -1,5 +1,12 @@
# @llamaindex/next-node-runtime
## 0.1.2
### Patch Changes
- Updated dependencies [88d776f]
- llamaindex@0.9.2
## 0.1.1
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/next-node-runtime-test",
"version": "0.1.1",
"version": "0.1.2",
"private": true,
"scripts": {
"dev": "next dev",
@@ -11,9 +11,9 @@
"llamaindex": "workspace:*",
"@llamaindex/huggingface": "workspace:*",
"@llamaindex/readers": "workspace:*",
"next": "15.0.3",
"react": "18.3.1",
"react-dom": "18.3.1"
"next": "15.1.7",
"react": "19.0.0",
"react-dom": "19.0.0"
},
"devDependencies": {
"@types/node": "^22.9.0",
@@ -1,5 +1,12 @@
# vite-import-llamaindex
## 0.0.2
### Patch Changes
- Updated dependencies [88d776f]
- llamaindex@0.9.2
## 0.0.1
### Patch Changes
@@ -1,7 +1,7 @@
{
"name": "vite-import-llamaindex",
"private": true,
"version": "0.0.1",
"version": "0.0.2",
"type": "module",
"scripts": {
"build": "vite build",
@@ -5,3 +5,4 @@ dist
.cache
.DS_Store
*.pem
/src/pages.gen.ts
@@ -1,5 +1,12 @@
# @llamaindex/waku-query-engine-test
## 0.0.136
### Patch Changes
- Updated dependencies [88d776f]
- llamaindex@0.9.2
## 0.0.135
### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/waku-query-engine-test",
"version": "0.0.135",
"version": "0.0.136",
"type": "module",
"private": true,
"scripts": {
@@ -11,10 +11,10 @@
"dependencies": {
"@llamaindex/env": "workspace:*",
"llamaindex": "workspace:*",
"react": "19.0.0-rc-5c56b873-20241107",
"react-dom": "19.0.0-rc-5c56b873-20241107",
"react-server-dom-webpack": "19.0.0-rc-5c56b873-20241107",
"waku": "0.21.6"
"react": "19.0.0",
"react-dom": "19.0.0",
"react-server-dom-webpack": "19.0.0",
"waku": "0.21.20"
},
"devDependencies": {
"@types/react": "18.3.12",
+7
View File
@@ -1,5 +1,12 @@
# @llamaindex/autotool
## 6.0.2
### Patch Changes
- Updated dependencies [88d776f]
- llamaindex@0.9.2
## 6.0.1
### Patch Changes
@@ -1,5 +1,13 @@
# @llamaindex/autotool-01-node-example
## 0.0.83
### Patch Changes
- Updated dependencies [88d776f]
- llamaindex@0.9.2
- @llamaindex/autotool@6.0.2
## 0.0.82
### Patch Changes
@@ -13,5 +13,5 @@
"scripts": {
"start": "node --import tsx --import @llamaindex/autotool/node ./src/index.ts"
},
"version": "0.0.82"
"version": "0.0.83"
}
@@ -1,5 +1,13 @@
# @llamaindex/autotool-02-next-example
## 0.1.127
### Patch Changes
- Updated dependencies [88d776f]
- llamaindex@0.9.2
- @llamaindex/autotool@6.0.2
## 0.1.126
### Patch Changes
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/autotool-02-next-example",
"private": true,
"version": "0.1.126",
"version": "0.1.127",
"scripts": {
"dev": "next dev",
"build": "next build",
@@ -15,7 +15,7 @@
"dotenv": "^16.3.1",
"llamaindex": "workspace:*",
"lucide-react": "^0.460.0",
"next": "15.0.3",
"next": "15.1.7",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-markdown": "^9.0.1",
+2 -2
View File
@@ -6,7 +6,7 @@
"url": "git+https://github.com/run-llama/LlamaIndexTS.git",
"directory": "packages/autotool"
},
"version": "6.0.1",
"version": "6.0.2",
"description": "auto transpile your JS function to LLM Agent compatible",
"files": [
"dist",
@@ -77,7 +77,7 @@
"@types/node": "^22.9.0",
"bunchee": "6.3.4",
"llamaindex": "workspace:*",
"next": "15.0.3",
"next": "15.1.7",
"rollup": "^4.28.1",
"tsx": "^4.19.0",
"typescript": "^5.7.2",
+6
View File
@@ -1,5 +1,11 @@
# @llamaindex/cloud
## 3.0.2
### Patch Changes
- c902fcb: chore: bump llamacloud openapi
## 3.0.1
### Patch Changes
+4290 -1580
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/cloud",
"version": "3.0.1",
"version": "3.0.2",
"type": "module",
"license": "MIT",
"scripts": {
+44
View File
@@ -4,6 +4,7 @@ import { fs, getEnv, path } from "@llamaindex/env";
import {
type Body_upload_file_api_v1_parsing_upload_post,
type ParserLanguages,
type ParsingMode,
getJobApiV1ParsingJobJobIdGet,
getJobImageResultApiV1ParsingJobJobIdResultImageNameGet,
getJobJsonResultApiV1ParsingJobJobIdResultJsonGet,
@@ -127,6 +128,26 @@ export class LlamaParseReader extends FileReader {
readonly #client: Client;
output_tables_as_HTML: boolean = false;
input_s3_region?: string | undefined;
output_s3_region?: string | undefined;
preserve_layout_alignment_across_pages?: boolean | undefined;
spreadsheet_extract_sub_tables?: boolean | undefined;
formatting_instruction?: string | undefined;
parse_mode?: ParsingMode | undefined;
system_prompt?: string | undefined;
system_prompt_append?: string | undefined;
user_prompt?: string | undefined;
job_timeout_in_seconds?: number | undefined;
job_timeout_extra_time_per_page_in_seconds?: number | undefined;
strict_mode_image_extraction?: boolean | undefined;
strict_mode_image_ocr?: boolean | undefined;
strict_mode_reconstruction?: boolean | undefined;
strict_mode_buggy_font?: boolean | undefined;
ignore_document_elements_for_layout_detection?: boolean | undefined;
complemental_formatting_instruction?: string | undefined;
content_guideline_instruction?: string | undefined;
constructor(
params: Partial<Omit<LlamaParseReader, "language" | "apiKey">> & {
language?: ParserLanguages | ParserLanguages[] | undefined;
@@ -252,6 +273,29 @@ export class LlamaParseReader extends FileReader {
structured_output_json_schema_name:
this.structured_output_json_schema_name,
extract_layout: this.extract_layout,
output_tables_as_HTML: this.output_tables_as_HTML,
input_s3_region: this.input_s3_region,
output_s3_region: this.output_s3_region,
preserve_layout_alignment_across_pages:
this.preserve_layout_alignment_across_pages,
spreadsheet_extract_sub_tables: this.spreadsheet_extract_sub_tables,
formatting_instruction: this.formatting_instruction,
parse_mode: this.parse_mode,
system_prompt: this.system_prompt,
system_prompt_append: this.system_prompt_append,
user_prompt: this.user_prompt,
job_timeout_in_seconds: this.job_timeout_in_seconds,
job_timeout_extra_time_per_page_in_seconds:
this.job_timeout_extra_time_per_page_in_seconds,
strict_mode_image_extraction: this.strict_mode_image_extraction,
strict_mode_image_ocr: this.strict_mode_image_ocr,
strict_mode_reconstruction: this.strict_mode_reconstruction,
strict_mode_buggy_font: this.strict_mode_buggy_font,
ignore_document_elements_for_layout_detection:
this.ignore_document_elements_for_layout_detection,
complemental_formatting_instruction:
this.complemental_formatting_instruction,
content_guideline_instruction: this.content_guideline_instruction,
} satisfies {
[Key in keyof Body_upload_file_api_v1_parsing_upload_post]-?:
| Body_upload_file_api_v1_parsing_upload_post[Key]
+7
View File
@@ -1,5 +1,12 @@
# @llamaindex/experimental
## 0.0.152
### Patch Changes
- Updated dependencies [88d776f]
- llamaindex@0.9.2
## 0.0.151
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/experimental",
"description": "Experimental package for LlamaIndexTS",
"version": "0.0.151",
"version": "0.0.152",
"type": "module",
"types": "dist/type/index.d.ts",
"main": "dist/cjs/index.js",
+8
View File
@@ -1,5 +1,13 @@
# llamaindex
## 0.9.2
### Patch Changes
- 88d776f: fix: enhance error message in llamacloud
- Updated dependencies [c902fcb]
- @llamaindex/cloud@3.0.2
## 0.9.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "llamaindex",
"version": "0.9.1",
"version": "0.9.2",
"license": "MIT",
"type": "module",
"keywords": [
+5
View File
@@ -31,6 +31,11 @@ export function initService({ apiKey, baseUrl }: ClientParams = {}) {
request.headers.set("Authorization", `Bearer ${token}`);
return request;
});
client.interceptors.error.use((error) => {
throw new Error(
`LlamaCloud API request failed. Error details: ${JSON.stringify(error)}`,
);
});
if (!token) {
throw new Error(
"API Key is required for LlamaCloudIndex. Please pass the apiKey parameter",
@@ -1,5 +1,11 @@
# @llamaindex/anthropic
## 0.1.2
### Patch Changes
- be74207: fix: dont add empty text block to tool call
## 0.1.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/anthropic",
"description": "Anthropic Adapter for LlamaIndex",
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
+23 -17
View File
@@ -207,23 +207,26 @@ export class Anthropic extends ToolCallLLM<
}
if ("toolCall" in options) {
const formattedMessage: MessageParam = {
role: "assistant",
content: [
{
type: "text" as const,
text: extractText(message.content),
},
...options.toolCall.map((tool) => ({
type: "tool_use" as const,
id: tool.id,
name: tool.name,
input: this.parseToolInput(tool.input),
})),
],
};
const text = extractText(message.content);
return formattedMessage;
const content: MessageParam["content"] = [];
if (text && text.trim().length > 0) {
// don't add empty text blocks
content.push({
type: "text" as const,
text: text,
});
}
content.push(
...options.toolCall.map((tool) => ({
type: "tool_use" as const,
id: tool.id,
name: tool.name,
input: this.parseToolInput(tool.input),
})),
);
return { role: "assistant", content } satisfies MessageParam;
}
// Handle tool results
@@ -442,7 +445,10 @@ export class Anthropic extends ToolCallLLM<
raw: response,
message: {
content: response.content
.filter((content): content is TextBlock => content.type === "text")
.filter(
(content): content is TextBlock =>
content.type === "text" && content.text?.trim().length > 0,
)
.map((content) => ({
type: "text" as const,
text: content.text,
+670 -709
View File
File diff suppressed because it is too large Load Diff
+9
View File
@@ -1,5 +1,14 @@
# @llamaindex/unit-test
## 0.1.2
### Patch Changes
- Updated dependencies [c902fcb]
- Updated dependencies [88d776f]
- @llamaindex/cloud@3.0.2
- llamaindex@0.9.2
## 0.1.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/unit-test",
"private": true,
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"scripts": {
"test": "vitest run"