Compare commits

..

3 Commits

Author SHA1 Message Date
Adrian Lyjak 71f30242eb include total 2025-07-12 01:34:11 -04:00
Adrian Lyjak f6447bbb49 fix docs build for agent data 2025-07-11 23:17:35 -04:00
Adrian Lyjak 9b0477f268 Adjust agent data types
- Updates ExtractedData to match python type declarations
- Updates client interface to more closely align python implementation
- Updates some incorrect types
- Removes agent-data/extract API. That isn't an existing thing
- Move to beta namespace to reflect instability
2025-07-11 21:19:13 +00:00
49 changed files with 10633 additions and 564 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@llamaindex/cloud": patch
---
Bug fixes for new beta agent-data cloud API
+5
View File
@@ -0,0 +1,5 @@
---
"@llamaindex/deepseek": patch
---
feat: add supportToolCall getter to DeepSeekLLM class
-16
View File
@@ -1,21 +1,5 @@
# @llamaindex/doc
## 0.2.38
### Patch Changes
- Updated dependencies [d2be868]
- @llamaindex/cloud@4.0.22
- llamaindex@0.11.17
## 0.2.37
### Patch Changes
- Updated dependencies [579ca0c]
- @llamaindex/cloud@4.0.21
- llamaindex@0.11.16
## 0.2.36
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/doc",
"version": "0.2.38",
"version": "0.2.36",
"private": true,
"scripts": {
"postinstall": "fumadocs-mdx",
@@ -21,7 +21,7 @@ Where as the `llamaindex` package is working with Next.js, some provider package
Make sure to use `withLlamaIndex` to make sure that LlamaIndex.TS works well with Next.js.
```js
```javascript
// next.config.mjs / next.config.ts
import withLlamaIndex from "llamaindex/next";
@@ -15,7 +15,7 @@ npm i @langtrase/typescript-sdk
## Initialize
```js
```javascript
import * as Langtrace from "@langtrase/typescript-sdk";
Langtrace.init({ api_key: "<YOUR_API_KEY>" });
```
@@ -12,7 +12,7 @@ LLM applications. It connects to [all major observability platforms](https://www
npm i @traceloop/node-server-sdk
```
```js
```javascript
import * as traceloop from "@traceloop/node-server-sdk";
traceloop.initialize({
@@ -175,7 +175,7 @@ Try it out ⬇️
And also update the `next.config.js` to make `@llamaindex/env` work properly.
```js
```javascript
const config = {
webpack: (config) => {
if (Array.isArray(config.target) && config.target.includes('web')) {
+1
View File
@@ -6,6 +6,7 @@
],
"exclude": [
"../../packages/autotool/**/src/index.ts",
"../../packages/cloud/src/beta/**",
"**/node_modules/**",
"**/dist/**",
"**/test/**",
@@ -1,17 +1,5 @@
# @llamaindex/cloudflare-worker-agent-test
## 0.0.178
### Patch Changes
- llamaindex@0.11.17
## 0.0.177
### Patch Changes
- llamaindex@0.11.16
## 0.0.176
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/cloudflare-worker-agent-test",
"version": "0.0.178",
"version": "0.0.176",
"type": "module",
"private": true,
"scripts": {
@@ -1,19 +1,5 @@
# @llamaindex/llama-parse-browser-test
## 0.0.77
### Patch Changes
- Updated dependencies [d2be868]
- @llamaindex/cloud@4.0.22
## 0.0.76
### Patch Changes
- Updated dependencies [579ca0c]
- @llamaindex/cloud@4.0.21
## 0.0.75
### Patch Changes
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/llama-parse-browser-test",
"private": true,
"version": "0.0.77",
"version": "0.0.75",
"type": "module",
"scripts": {
"dev": "vite",
-12
View File
@@ -1,17 +1,5 @@
# @llamaindex/next-agent-test
## 0.1.178
### Patch Changes
- llamaindex@0.11.17
## 0.1.177
### Patch Changes
- llamaindex@0.11.16
## 0.1.176
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/next-agent-test",
"version": "0.1.178",
"version": "0.1.176",
"private": true,
"scripts": {
"dev": "next dev",
@@ -1,17 +1,5 @@
# test-edge-runtime
## 0.1.177
### Patch Changes
- llamaindex@0.11.17
## 0.1.176
### Patch Changes
- llamaindex@0.11.16
## 0.1.175
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/nextjs-edge-runtime-test",
"version": "0.1.177",
"version": "0.1.175",
"private": true,
"scripts": {
"dev": "next dev",
@@ -1,17 +1,5 @@
# @llamaindex/next-node-runtime
## 0.1.46
### Patch Changes
- llamaindex@0.11.17
## 0.1.45
### Patch Changes
- llamaindex@0.11.16
## 0.1.44
### Patch Changes
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/next-node-runtime-test",
"version": "0.1.46",
"version": "0.1.44",
"private": true,
"scripts": {
"dev": "next dev",
@@ -1,17 +1,5 @@
# vite-import-llamaindex
## 0.0.44
### Patch Changes
- llamaindex@0.11.17
## 0.0.43
### Patch Changes
- llamaindex@0.11.16
## 0.0.42
### Patch Changes
@@ -1,7 +1,7 @@
{
"name": "vite-import-llamaindex",
"private": true,
"version": "0.0.44",
"version": "0.0.42",
"type": "module",
"scripts": {
"build": "vite build",
@@ -1,17 +1,5 @@
# @llamaindex/waku-query-engine-test
## 0.0.178
### Patch Changes
- llamaindex@0.11.17
## 0.0.177
### Patch Changes
- llamaindex@0.11.16
## 0.0.176
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/waku-query-engine-test",
"version": "0.0.178",
"version": "0.0.176",
"type": "module",
"private": true,
"scripts": {
-7
View File
@@ -1,12 +1,5 @@
# examples
## 0.3.29
### Patch Changes
- Updated dependencies [af3f866]
- @llamaindex/deepseek@0.0.25
## 0.3.28
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/examples",
"version": "0.3.29",
"version": "0.3.28",
"private": true,
"scripts": {
"lint": "eslint .",
@@ -22,7 +22,7 @@
"@llamaindex/cohere": "^0.0.28",
"@llamaindex/core": "^0.6.14",
"@llamaindex/deepinfra": "^0.0.64",
"@llamaindex/deepseek": "^0.0.25",
"@llamaindex/deepseek": "^0.0.24",
"@llamaindex/discord": "^0.1.13",
"@llamaindex/elastic-search": "^0.1.14",
"@llamaindex/env": "^0.1.30",
+10114
View File
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -17,8 +17,7 @@
"release-snapshot": "pnpm run build && changeset publish --tag snapshot",
"new-version": "changeset version && pnpm format:write && pnpm run build",
"new-snapshot": "pnpm run build && changeset version --snapshot",
"lint-staged": "lint-staged",
"preinstall": "npx only-allow pnpm"
"lint-staged": "lint-staged"
},
"devDependencies": {
"@changesets/cli": "^2.27.5",
-12
View File
@@ -1,17 +1,5 @@
# @llamaindex/autotool
## 8.0.17
### Patch Changes
- llamaindex@0.11.17
## 8.0.16
### Patch Changes
- llamaindex@0.11.16
## 8.0.15
### Patch Changes
@@ -1,19 +1,5 @@
# @llamaindex/autotool-01-node-example
## 0.0.125
### Patch Changes
- llamaindex@0.11.17
- @llamaindex/autotool@8.0.17
## 0.0.124
### Patch Changes
- llamaindex@0.11.16
- @llamaindex/autotool@8.0.16
## 0.0.123
### Patch Changes
@@ -13,5 +13,5 @@
"scripts": {
"start": "node --import tsx --import @llamaindex/autotool/node ./src/index.ts"
},
"version": "0.0.125"
"version": "0.0.123"
}
+1 -1
View File
@@ -6,7 +6,7 @@
"url": "git+https://github.com/run-llama/LlamaIndexTS.git",
"directory": "packages/autotool"
},
"version": "8.0.17",
"version": "8.0.15",
"description": "auto transpile your JS function to LLM Agent compatible",
"files": [
"dist",
-12
View File
@@ -1,17 +1,5 @@
# @llamaindex/cloud
## 4.0.22
### Patch Changes
- d2be868: Bug fixes for new beta agent-data cloud API
## 4.0.21
### Patch Changes
- 579ca0c: chore: bump sdk version
## 4.0.20
### Patch Changes
+183 -262
View File
@@ -2519,7 +2519,7 @@
"get": {
"tags": ["Organizations"],
"summary": "Get Organization Usage",
"description": "Get usage for a specific organization.",
"description": "Get usage for a project",
"operationId": "get_organization_usage_api_v1_organizations__organization_id__usage_get",
"security": [
{
@@ -2535,8 +2535,15 @@
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Organization Id"
}
},
@@ -11643,7 +11650,7 @@
},
"/api/v1/projects/{project_id}/agents": {
"get": {
"tags": ["Agent Deployments"],
"tags": ["Llama Apps"],
"summary": "List Deployments",
"description": "List all deployments for a project.",
"operationId": "list_deployments_api_v1_projects__project_id__agents_get",
@@ -11709,7 +11716,7 @@
},
"/api/v1/projects/{project_id}/agents:sync": {
"post": {
"tags": ["Agent Deployments"],
"tags": ["Llama Apps"],
"summary": "Sync Deployments",
"description": "Sync deployments for a project.",
"operationId": "sync_deployments_api_v1_projects__project_id__agents_sync_post",
@@ -11773,12 +11780,12 @@
}
}
},
"/api/v1/classifier/classify": {
"/api/v1/billing/checkout-session": {
"post": {
"tags": ["Classifier", "Beta", "Classifier"],
"summary": "Classify Documents",
"description": "**[BETA]** Classify documents based on provided rules - simplified classification system.\n\n**This is a Beta feature** - API may change based on user feedback.\n\nThis endpoint supports:\n- Classifying new uploaded files\n- Classifying existing files by ID\n- Both new files and existing file IDs in one request\n\n## v0 Features:\n- **Simplified Rules**: Only `type` and `description` fields needed\n- **Matching Threshold**: Confidence-based classification with configurable threshold\n- **Smart Classification**: Filename heuristics + LLM content analysis\n- **Document Type Filtering**: Automatically filters out non-document file types\n- **Fast Processing**: Uses LlamaParse fast mode + GPT-4.1-nano\n- **Optimized Performance**: Parses each file only once for all rules\n\n## Simplified Scoring Logic:\n1. **Evaluate All Rules**: Compare document against all classification rules\n2. **Best Match Selection**: Return the highest scoring rule above matching_threshold\n3. **Unknown Classification**: Return as \"unknown\" if no rules score above threshold\n\nThis ensures optimal classification by:\n- Finding the best possible match among all rules\n- Avoiding false positives with confidence thresholds\n- Maximizing performance with single-pass file parsing\n\n## Rule Format:\n```json\n[\n {\n \"type\": \"invoice\",\n \"description\": \"contains invoice number, line items, and total amount\"\n },\n {\n \"type\": \"receipt\",\n \"description\": \"purchase receipt with transaction details and payment info\"\n }\n]\n```\n\n## Classification Process:\n1. **Metadata Heuristics** (configurable via API):\n - **Document Type Filter**: Only process document file types (PDF, DOC, DOCX, RTF, TXT, ODT, Pages, HTML, XML, Markdown)\n - **Filename Heuristics**: Check if rule type appears in filename\n - **Content Analysis**: Parse document content once and use LLM for semantic matching against all rules\n2. **Result**: Returns type, confidence score, and matched rule information\n\n## API Parameters:\n- `matching_threshold` (0.1-0.99, default: 0.6): Minimum confidence threshold for acceptable matches\n- `enable_metadata_heuristic` (boolean, default: true): Enable metadata-based features\n\n## Supported Document Types:\n**Text Documents**: pdf, doc, docx, rtf, txt, odt, pages\n**Web Documents**: html, htm, xml\n**Markup**: md, markdown\n\n## Limits (Beta):\n- Maximum 100 files per request\n- Maximum 10 rules per request\n- Rule descriptions: 10-500 characters\n- Document types: 1-50 characters (alphanumeric, hyphens, underscores)\n\n**Beta Notice**: This API is subject to change. Please provide feedback!",
"operationId": "classify_documents_api_v1_classifier_classify_post",
"tags": ["Billing"],
"summary": "Create Checkout Session",
"description": "Create a new checkout session.",
"operationId": "create_checkout_session_api_v1_billing_checkout_session_post",
"security": [
{
"HTTPBearer": []
@@ -11788,23 +11795,6 @@
}
],
"parameters": [
{
"name": "project_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Project Id"
}
},
{
"name": "organization_id",
"in": "query",
@@ -11842,9 +11832,9 @@
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Body_classify_documents_api_v1_classifier_classify_post"
"$ref": "#/components/schemas/CheckoutSessionCreatePayload"
}
}
}
@@ -11855,7 +11845,8 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ClassifyResponse"
"type": "string",
"title": "Response Create Checkout Session Api V1 Billing Checkout Session Post"
}
}
}
@@ -11957,6 +11948,55 @@
}
}
},
"/api/v1/billing/webhook": {
"post": {
"tags": ["Billing"],
"summary": "Stripe Webhook",
"description": "Stripe webhook endpoint.",
"operationId": "stripe_webhook_api_v1_billing_webhook_post",
"parameters": [
{
"name": "stripe-signature",
"in": "header",
"required": false,
"schema": {
"type": "string",
"title": "Stripe-Signature"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"const": "success",
"type": "string"
},
"propertyNames": {
"const": "status"
},
"title": "Response Stripe Webhook Api V1 Billing Webhook Post"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/billing/downgrade-plan": {
"post": {
"tags": ["Billing"],
@@ -12125,6 +12165,64 @@
}
}
},
"/api/v1/billing/metronome-webhook": {
"post": {
"tags": ["Billing"],
"summary": "Metronome Webhook",
"description": "Metronome webhook endpoint.",
"operationId": "metronome_webhook_api_v1_billing_metronome_webhook_post",
"parameters": [
{
"name": "Metronome-Webhook-Signature",
"in": "header",
"required": false,
"schema": {
"type": "string",
"title": "Metronome-Webhook-Signature"
}
},
{
"name": "Date",
"in": "header",
"required": false,
"schema": {
"type": "string",
"title": "Date"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"const": "success",
"type": "string"
},
"propertyNames": {
"const": "status"
},
"title": "Response Metronome Webhook Api V1 Billing Metronome Webhook Post"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/api/v1/billing/metronome/dashboard": {
"get": {
"tags": ["Billing"],
@@ -15670,12 +15768,12 @@
}
}
},
"/api/v1/beta/agent-data": {
"/api/v1/beta/agent-data/": {
"post": {
"tags": ["Beta", "Agent Data"],
"summary": "Create Agent Data",
"description": "Create new agent data.",
"operationId": "create_agent_data_api_v1_beta_agent_data_post",
"operationId": "create_agent_data_api_v1_beta_agent_data__post",
"security": [
{
"HTTPBearer": []
@@ -18785,73 +18883,6 @@
"required": ["start_date", "end_date"],
"title": "BillingPeriod"
},
"Body_classify_documents_api_v1_classifier_classify_post": {
"properties": {
"rules_json": {
"type": "string",
"title": "Rules Json",
"description": "JSON string containing classifier rules"
},
"files": {
"anyOf": [
{
"items": {
"type": "string",
"format": "binary"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Files"
},
"file_ids": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "File Ids",
"description": "Comma-separated list of existing file IDs"
},
"matching_threshold": {
"anyOf": [
{
"type": "number",
"maximum": 0.99,
"minimum": 0.1
},
{
"type": "null"
}
],
"title": "Matching Threshold",
"description": "Minimum confidence threshold for acceptable matches (0.1-0.99, default: 0.6)",
"default": 0.6
},
"enable_metadata_heuristic": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Enable Metadata Heuristic",
"description": "Enable metadata-based features (document filtering + content classification, default: true)",
"default": true
}
},
"type": "object",
"required": ["rules_json"],
"title": "Body_classify_documents_api_v1_classifier_classify_post"
},
"Body_create_report_api_v1_reports__post": {
"properties": {
"name": {
@@ -19345,11 +19376,6 @@
],
"title": "Max Pages"
},
"merge_tables_across_pages_in_markdown": {
"type": "boolean",
"title": "Merge Tables Across Pages In Markdown",
"default": false
},
"outlined_table_extraction": {
"type": "boolean",
"title": "Outlined Table Extraction",
@@ -19831,11 +19857,6 @@
],
"title": "Max Pages"
},
"merge_tables_across_pages_in_markdown": {
"type": "boolean",
"title": "Merge Tables Across Pages In Markdown",
"default": false
},
"outlined_table_extraction": {
"type": "boolean",
"title": "Outlined Table Extraction",
@@ -20409,101 +20430,30 @@
"type": "object",
"title": "ChatInputParams"
},
"CheckoutSessionCreatePayload": {
"properties": {
"success_url": {
"type": "string",
"minLength": 1,
"format": "uri",
"title": "Success Url"
},
"cancel_url": {
"type": "string",
"minLength": 1,
"format": "uri",
"title": "Cancel Url"
}
},
"type": "object",
"required": ["success_url", "cancel_url"],
"title": "CheckoutSessionCreatePayload"
},
"ChunkMode": {
"type": "string",
"enum": ["PAGE", "DOCUMENT", "SECTION", "GROUPED_PAGES"],
"title": "ChunkMode"
},
"ClassificationResult": {
"properties": {
"file_id": {
"type": "string",
"format": "uuid",
"title": "File Id",
"description": "The ID of the classified file"
},
"type": {
"type": "string",
"title": "Type",
"description": "The assigned document type ('unknown' if no rules matched)",
"examples": ["invoice", "receipt", "contract", "unknown"]
},
"confidence": {
"type": "number",
"maximum": 1.0,
"minimum": 0.0,
"title": "Confidence",
"description": "Confidence score of the classification (0.0-1.0)"
},
"matched_rule": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Matched Rule",
"description": "Description of the rule that matched, or method used (e.g., 'auto: filename contains invoice')",
"examples": [
"contains invoice number, line items, and total",
"auto: filename contains 'invoice'",
null
]
}
},
"type": "object",
"required": ["file_id", "type", "confidence", "matched_rule"],
"title": "ClassificationResult",
"description": "Result of classifying a single file.\n\nContains the classification outcome with confidence score and matched rule info."
},
"ClassifyResponse": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/ClassificationResult"
},
"type": "array",
"title": "Items",
"description": "The list of items."
},
"next_page_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Next Page Token",
"description": "A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages."
},
"total_size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Total Size",
"description": "The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only."
},
"unknown_count": {
"type": "integer",
"minimum": 0.0,
"title": "Unknown Count",
"description": "Number of files that couldn't be classified"
}
},
"type": "object",
"required": ["items", "unknown_count"],
"title": "ClassifyResponse",
"description": "Response model for the classify endpoint following AIP-132 pagination standard.\n\nContains classification results with pagination support and summary statistics."
},
"CloudAzStorageBlobDataSource": {
"properties": {
"supports_access_control": {
@@ -21991,7 +21941,6 @@
},
"query": {
"type": "string",
"minLength": 1,
"title": "Query",
"description": "The query to retrieve against."
}
@@ -22508,12 +22457,14 @@
"version_metadata": {
"anyOf": [
{
"$ref": "#/components/schemas/DataSourceReaderVersionMetadata"
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Version Metadata",
"description": "Version metadata for the data source"
},
"project_id": {
@@ -22619,24 +22570,6 @@
"title": "DataSourceCreate",
"description": "Schema for creating a data source."
},
"DataSourceReaderVersionMetadata": {
"properties": {
"reader_version": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Reader Version",
"description": "The version of the reader to use for this data source."
}
},
"type": "object",
"title": "DataSourceReaderVersionMetadata"
},
"DataSourceUpdate": {
"properties": {
"name": {
@@ -22908,7 +22841,6 @@
},
"query": {
"type": "string",
"minLength": 1,
"title": "Query",
"description": "The query to retrieve against."
},
@@ -23867,7 +23799,7 @@
},
"ExtractMode": {
"type": "string",
"enum": ["FAST", "BALANCED", "PREMIUM", "MULTIMODAL"],
"enum": ["FAST", "BALANCED", "PREMIUM", "MULTIMODAL", "ACCURATE"],
"title": "ExtractMode"
},
"ExtractModels": {
@@ -26278,19 +26210,6 @@
"description": "Whether to try to extract outlined tables",
"default": false
},
"mergeTablesAcrossPagesInMarkdown": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Mergetablesacrosspagesinmarkdown",
"description": "Whether to merge tables across pages in markdown",
"default": false
},
"saveImages": {
"anyOf": [
{
@@ -27151,7 +27070,6 @@
"disable_image_extraction": false,
"invalidate_cache": false,
"outlined_table_extraction": false,
"merge_tables_across_pages_in_markdown": false,
"output_pdf_of_document": false,
"do_not_cache": false,
"fast_mode": false,
@@ -27328,18 +27246,6 @@
"title": "Outlined Table Extraction",
"default": false
},
"merge_tables_across_pages_in_markdown": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Merge Tables Across Pages In Markdown",
"default": false
},
"output_pdf_of_document": {
"anyOf": [
{
@@ -29500,18 +29406,6 @@
"title": "Outlined Table Extraction",
"default": false
},
"merge_tables_across_pages_in_markdown": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Merge Tables Across Pages In Markdown",
"default": false
},
"output_pdf_of_document": {
"anyOf": [
{
@@ -31440,12 +31334,14 @@
"version_metadata": {
"anyOf": [
{
"$ref": "#/components/schemas/DataSourceReaderVersionMetadata"
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Version Metadata",
"description": "Version metadata for the data source"
},
"project_id": {
@@ -32233,6 +32129,12 @@
"title": "Data Source Project File Changed",
"description": "Whether the data source project file has changed",
"default": false
},
"should_migrate_pipeline_file_to_external_file_id": {
"type": "boolean",
"title": "Should Migrate Pipeline File To External File Id",
"description": "Whether to migrate the pipeline file to the external file id",
"default": false
}
},
"type": "object",
@@ -34337,6 +34239,19 @@
"title": "Name",
"description": "A name for the role."
},
"organization_id": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"title": "Organization Id",
"description": "The organization's ID."
},
"permissions": {
"items": {
"$ref": "#/components/schemas/Permission"
@@ -34347,7 +34262,7 @@
}
},
"type": "object",
"required": ["id", "name", "permissions"],
"required": ["id", "name", "organization_id", "permissions"],
"title": "Role",
"description": "Schema for a role."
},
@@ -35219,13 +35134,19 @@
"title": "Project Ids",
"description": "The project ID scope."
},
"role_id": {
"type": "string",
"format": "uuid",
"title": "Role Id",
"description": "The role's ID."
},
"role": {
"$ref": "#/components/schemas/Role",
"description": "The role."
}
},
"type": "object",
"required": ["id", "user_id", "organization_id", "role"],
"required": ["id", "user_id", "organization_id", "role_id", "role"],
"title": "UserOrganizationRole",
"description": "Schema for a user's role in an organization."
},
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@llamaindex/cloud",
"version": "4.0.22",
"version": "4.0.20",
"type": "module",
"license": "MIT",
"scripts": {
+188 -54
View File
@@ -8,19 +8,16 @@ import {
searchAgentDataApiV1BetaAgentDataSearchPost,
updateAgentDataApiV1BetaAgentDataItemIdPut,
type AgentData,
type AggregateRequest,
type PaginatedResponseAgentData,
type PaginatedResponseAggregateGroup,
type SearchRequest,
type AggregateGroup,
} from "../../client";
type AgentClientOptions = {
apiKey?: string;
baseUrl?: string;
collection?: string;
agentUrlId?: string;
windowUrl?: string;
};
import type {
AggregateAgentDataOptions,
SearchAgentDataOptions,
TypedAgentData,
TypedAgentDataItems,
TypedAggregateGroup,
TypedAggregateGroupItems,
} from "./types";
/**
* Async client for agent data operations
@@ -32,26 +29,18 @@ export class AgentClient<T = unknown> {
private collection: string;
private agentUrlId: string;
constructor(options: AgentClientOptions = {}) {
// Handle windowUrl to infer agentUrlId
let inferredAgentUrlId: string | undefined;
if (options.windowUrl && !options.agentUrlId) {
try {
const path = new URL(options.windowUrl).pathname;
// /deployments/<agent-url-id>/ui/ -> ["", "deployments", "<agent-url-id>", "ui"]
inferredAgentUrlId = path.split("/")[2];
} catch (error) {
console.warn(
"Failed to infer agent url id from window url, falling back to default",
error,
);
}
}
this.collection = options.collection || "default";
this.agentUrlId = options.agentUrlId || inferredAgentUrlId || "default";
const apiKey = options?.apiKey || getEnv("LLAMA_CLOUD_API_KEY");
this.baseUrl = options?.baseUrl || "https://api.cloud.llamaindex.ai/";
constructor({
apiKey = getEnv("LLAMA_CLOUD_API_KEY"),
baseUrl = "https://api.cloud.llamaindex.ai/",
collection = "default",
agentUrlId = "default",
}: {
apiKey?: string;
baseUrl?: string;
collection?: string;
agentUrlId?: string;
}) {
this.baseUrl = baseUrl;
this.headers = {
"X-SDK-Name": "llamaindex-ts",
@@ -64,29 +53,32 @@ export class AgentClient<T = unknown> {
headers: this.headers,
}),
);
this.collection = collection;
this.agentUrlId = agentUrlId;
}
/**
* Create new agent data
*/
async createItem(data: T): Promise<AgentData> {
async createItem(data: T): Promise<TypedAgentData<T>> {
const response = await createAgentDataApiV1BetaAgentDataPost({
throwOnError: true,
body: {
collection: this.collection,
agent_slug: this.agentUrlId,
collection: this.collection,
data: data as Record<string, unknown>,
},
client: this.client,
});
return response.data;
return this.transformResponse(response.data);
}
/**
* Get agent data by ID
*/
async getItem(id: string): Promise<AgentData | null> {
async getItem(id: string): Promise<TypedAgentData<T> | null> {
try {
const response = await getAgentDataApiV1BetaAgentDataItemIdGet({
throwOnError: true,
@@ -94,7 +86,7 @@ export class AgentClient<T = unknown> {
client: this.client,
});
return response.data;
return this.transformResponse(response.data);
} catch (error) {
if (
error instanceof Error &&
@@ -110,7 +102,7 @@ export class AgentClient<T = unknown> {
/**
* Update agent data
*/
async updateItem(id: string, data: T): Promise<AgentData> {
async updateItem(id: string, data: T): Promise<TypedAgentData<T>> {
const response = await updateAgentDataApiV1BetaAgentDataItemIdPut({
throwOnError: true,
path: { item_id: id },
@@ -120,7 +112,7 @@ export class AgentClient<T = unknown> {
client: this.client,
});
return response.data;
return this.transformResponse(response.data);
}
/**
@@ -135,46 +127,188 @@ export class AgentClient<T = unknown> {
}
/**
* Search agent data
* List agent data
*/
async search(
options: Partial<SearchRequest> = {},
): Promise<PaginatedResponseAgentData> {
options: SearchAgentDataOptions,
): Promise<TypedAgentDataItems<T>> {
const response = await searchAgentDataApiV1BetaAgentDataSearchPost({
throwOnError: true,
body: {
...options,
agent_slug: this.agentUrlId,
collection: this.collection,
...(this.collection !== undefined && {
collection: this.collection,
}),
...(options.filter !== undefined && { filter: options.filter }),
...(options.orderBy !== undefined && { order_by: options.orderBy }),
...(options.pageSize !== undefined && { page_size: options.pageSize }),
...(options.offset !== undefined && { offset: options.offset }),
...(options.includeTotal !== undefined && {
include_total: options.includeTotal,
}),
},
client: this.client,
});
return response.data;
const result: TypedAgentDataItems<T> = {
items: response.data.items.map((item: AgentData) =>
this.transformResponse(item),
),
};
if (
response.data.total_size !== null &&
response.data.total_size !== undefined
) {
result.totalSize = response.data.total_size;
}
if (
response.data.next_page_token !== null &&
response.data.next_page_token !== undefined
) {
result.nextPageToken = response.data.next_page_token;
}
return result;
}
/**
* Aggregate agent data into groups
*/
async aggregate(
options: Partial<AggregateRequest> = {},
): Promise<PaginatedResponseAggregateGroup> {
options: AggregateAgentDataOptions,
): Promise<TypedAggregateGroupItems<T>> {
const response = await aggregateAgentDataApiV1BetaAgentDataAggregatePost({
throwOnError: true,
body: {
...options,
agent_slug: this.agentUrlId,
collection: this.collection,
...(this.collection !== undefined && {
collection: this.collection,
}),
...(options.filter !== undefined && { filter: options.filter }),
...(options.groupBy !== undefined && { group_by: options.groupBy }),
...(options.count !== undefined && { count: options.count }),
...(options.first !== undefined && { first: options.first }),
...(options.orderBy !== undefined && { order_by: options.orderBy }),
...(options.offset !== undefined && { offset: options.offset }),
...(options.pageSize !== undefined && { page_size: options.pageSize }),
},
client: this.client,
});
return response.data;
const result: TypedAggregateGroupItems<T> = {
items: response.data.items.map((item) =>
this.transformAggregateResponse(item),
),
};
if (
response.data.total_size !== null &&
response.data.total_size !== undefined
) {
result.totalSize = response.data.total_size;
}
if (
response.data.next_page_token !== null &&
response.data.next_page_token !== undefined
) {
result.nextPageToken = response.data.next_page_token;
}
return result;
}
/**
* Transform API response to typed data
*/
private transformResponse(data: AgentData): TypedAgentData<T> {
const result: TypedAgentData<T> = {
id: data.id!,
agentUrlId: data.agent_slug,
data: data.data as T,
createdAt: new Date(data.created_at!),
updatedAt: new Date(data.updated_at!),
};
if (data.collection !== undefined) {
result.collection = data.collection;
}
return result;
}
/**
* Transform API aggregate response to typed data
*/
private transformAggregateResponse(
data: AggregateGroup,
): TypedAggregateGroup<T> {
const result: TypedAggregateGroup<T> = {
groupKey: data.group_key,
};
if (data.count !== null && data.count !== undefined) {
result.count = data.count;
}
if (data.first_item !== null && data.first_item !== undefined) {
result.firstItem = data.first_item as T;
}
return result;
}
}
export function createAgentDataClient<T = unknown>(
options: AgentClientOptions = {},
): AgentClient<T> {
return new AgentClient<T>(options);
export interface AgentDataClientOptions<T = unknown> {
/** API key for the client */
apiKey?: string;
/** Base URL for the client */
/** Base URL of the llama cloud api */
baseUrl?: string;
/** If running in an agent runtime, optionally provide the window url to infer the agent url id */
windowUrl?: string;
/** Agent URL ID for the client, if not provided, it will be inferred from the window url, or fall back to "default" */
agentUrlId?: string;
/** Collection name for the client, defaults to "default" */
collection?: string;
}
/**
* Create a new AsyncAgentDataClient instance
* @param options - The options for the client
* @returns A new AgentClient instance
*/
export function createAgentDataClient<T = unknown>({
apiKey,
baseUrl,
windowUrl,
agentUrlId,
collection = "default",
}: {
apiKey?: string;
baseUrl?: string;
windowUrl?: string;
agentUrlId?: string;
collection?: string;
} = {}): AgentClient<T> {
if (windowUrl && !agentUrlId) {
try {
const path = new URL(windowUrl).pathname;
// /deployments/<agent-url-id>/ui/ -> ["", "deployments", "<agent-url-id>", "ui"]
agentUrlId = path.split("/")[2];
} catch (error) {
console.warn(
"Failed to infer agent url id from window url, falling back to default",
error,
);
}
}
return new AgentClient({
...(apiKey && { apiKey }),
...(baseUrl && { baseUrl }),
...(agentUrlId && { agentUrlId }),
collection,
});
}
+7 -6
View File
@@ -1,15 +1,16 @@
export { AgentClient, createAgentDataClient } from "./client";
export type {
AgentData,
AggregateGroup,
AggregateRequest,
AggregateAgentDataOptions,
ComparisonOperator,
ExtractedData,
FilterOperation,
PaginatedResponseAgentData,
PaginatedResponseAggregateGroup,
SearchRequest,
SearchAgentDataOptions,
StatusType,
TypedAgentData,
TypedAgentDataItems,
TypedAggregateGroup,
TypedAggregateGroupItems,
} from "./types";
export { StatusType as StatusTypeEnum } from "./types";
+105 -11
View File
@@ -1,14 +1,4 @@
// Re-export types from the client
export type {
AgentData,
AggregateGroup,
AggregateRequest,
FilterOperation,
PaginatedResponseAgentData,
PaginatedResponseAggregateGroup,
SearchRequest,
} from "../../client";
import type { FilterOperation as RawFilterOperation } from "../../client/types.gen";
/**
* Status types for agent data processing
*/
@@ -21,6 +11,23 @@ export const StatusType = {
export type StatusType = (typeof StatusType)[keyof typeof StatusType];
export const ComparisonOperator = {
GT: "gt",
GTE: "gte",
LT: "lt",
LTE: "lte",
EQ: "eq",
INCLUDES: "includes",
} as const;
export type ComparisonOperator =
(typeof ComparisonOperator)[keyof typeof ComparisonOperator];
/**
* Filter operation for searching/filtering agent data
*/
export type FilterOperation = RawFilterOperation;
/**
* Base extracted data interface
*/
@@ -42,3 +49,90 @@ export interface ExtractedData<T = unknown> {
/** Additional metadata about the extracted data, such as errors, tokens, etc. */
metadata?: Record<string, unknown>;
}
/**
* TypedAgentData interface for typed agent data
*/
export interface TypedAgentData<T = unknown> {
/** The unique ID of the agent data record. */
id: string;
/** The ID of the agent that created the data. */
agentUrlId: string;
/** The collection of the agent data. */
collection?: string;
/** The data of the agent data. Usually an ExtractedData&lt;SomeOtherType&gt; */
data: T;
/** The date and time the data was created. */
createdAt: Date;
/** The date and time the data was last updated. */
updatedAt: Date;
}
/**
* Paginated response of typed agent data items
*/
export interface TypedAgentDataItems<T = unknown> {
items: TypedAgentData<T>[];
totalSize?: number;
nextPageToken?: string;
}
/**
* Options for listing agent data
*/
export interface SearchAgentDataOptions {
/** Filter options for the list. */
filter?: Record<string, FilterOperation>;
/** Order by options for the list. */
orderBy?: string;
/** Page size for the list. */
pageSize?: number;
/** Offset for the list. */
offset?: number;
/**
* Whether to include the total number of items in the response.
* Should use only for first request to build total pagination, and not subsequent requests.
*/
includeTotal?: boolean;
}
/**
* Options for aggregating agent data
*/
export interface AggregateAgentDataOptions {
/** Filter options for the aggregation. */
filter?: Record<string, FilterOperation>;
/** Fields to group by. */
groupBy?: string[];
/** Whether to count the number of items in each group. */
count?: boolean;
/** Whether to return the first item in each group. */
first?: boolean;
/** Order by options for the aggregation. */
orderBy?: string;
/** Offset for the aggregation. */
offset?: number;
/** Page size for the aggregation. */
pageSize?: number;
}
/**
* Single aggregation group result
*/
export interface TypedAggregateGroup<T = unknown> {
/** The group key values */
groupKey: Record<string, unknown>;
/** Count of items in the group */
count?: number;
/** First item in the group */
firstItem?: T;
}
/**
* Paginated response of aggregated agent data
*/
export interface TypedAggregateGroupItems<T = unknown> {
items: TypedAggregateGroup<T>[];
totalSize?: number;
nextPageToken?: string;
}
-3
View File
@@ -179,7 +179,6 @@ export class LlamaParseReader extends FileReader {
page_header_suffix?: string | undefined;
page_footer_prefix?: string | undefined;
page_footer_suffix?: string | undefined;
merge_tables_across_pages_in_markdown?: boolean | undefined;
constructor(
params: Partial<Omit<LlamaParseReader, "language" | "apiKey">> & {
@@ -369,8 +368,6 @@ export class LlamaParseReader extends FileReader {
page_header_suffix: this.page_header_suffix,
page_footer_prefix: this.page_footer_prefix,
page_footer_suffix: this.page_footer_suffix,
merge_tables_across_pages_in_markdown:
this.merge_tables_across_pages_in_markdown,
} satisfies {
[Key in keyof BodyUploadFileApiParsingUploadPost]-?:
| BodyUploadFileApiParsingUploadPost[Key]
-12
View File
@@ -1,17 +1,5 @@
# @llamaindex/experimental
## 0.0.194
### Patch Changes
- llamaindex@0.11.17
## 0.0.193
### Patch Changes
- llamaindex@0.11.16
## 0.0.192
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/experimental",
"description": "Experimental package for LlamaIndexTS",
"version": "0.0.194",
"version": "0.0.192",
"type": "module",
"types": "dist/type/index.d.ts",
"main": "dist/cjs/index.js",
-14
View File
@@ -1,19 +1,5 @@
# llamaindex
## 0.11.17
### Patch Changes
- Updated dependencies [d2be868]
- @llamaindex/cloud@4.0.22
## 0.11.16
### Patch Changes
- Updated dependencies [579ca0c]
- @llamaindex/cloud@4.0.21
## 0.11.15
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "llamaindex",
"version": "0.11.17",
"version": "0.11.15",
"license": "MIT",
"type": "module",
"keywords": [
-6
View File
@@ -1,11 +1,5 @@
# @llamaindex/deepseek
## 0.0.25
### Patch Changes
- af3f866: feat: add supportToolCall getter to DeepSeekLLM class
## 0.0.24
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/deepseek",
"description": "DeepSeek Adapter for LlamaIndex",
"version": "0.0.25",
"version": "0.0.24",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
+1 -2
View File
@@ -26,8 +26,7 @@
},
"devDependencies": {
"@llamaindex/core": "workspace:*",
"@llamaindex/env": "workspace:*",
"@notionhq/client": "^4.0.0"
"@llamaindex/env": "workspace:*"
},
"peerDependencies": {
"@llamaindex/core": "workspace:*",
+1 -4
View File
@@ -1,12 +1,9 @@
import type { BaseReader } from "@llamaindex/core/schema";
import { Document } from "@llamaindex/core/schema";
import { Client } from "@notionhq/client";
import type { Crawler, CrawlerOptions, Page } from "notion-md-crawler";
import { crawler, pageToString } from "notion-md-crawler";
type NotionReaderOptions = Pick<CrawlerOptions, "serializers"> & {
client: Client;
};
type NotionReaderOptions = Pick<CrawlerOptions, "client" | "serializers">;
/**
* Notion pages are retrieved recursively and converted to Document objects.
+1 -4
View File
@@ -645,7 +645,7 @@ importers:
specifier: ^0.0.64
version: link:../packages/providers/deepinfra
'@llamaindex/deepseek':
specifier: ^0.0.25
specifier: ^0.0.24
version: link:../packages/providers/deepseek
'@llamaindex/discord':
specifier: ^0.1.13
@@ -1375,9 +1375,6 @@ importers:
'@llamaindex/env':
specifier: workspace:*
version: link:../../env
'@notionhq/client':
specifier: ^4.0.0
version: 4.0.0
packages/providers/ollama:
dependencies:
-16
View File
@@ -1,21 +1,5 @@
# @llamaindex/unit-test
## 0.1.46
### Patch Changes
- Updated dependencies [d2be868]
- @llamaindex/cloud@4.0.22
- llamaindex@0.11.17
## 0.1.45
### Patch Changes
- Updated dependencies [579ca0c]
- @llamaindex/cloud@4.0.21
- llamaindex@0.11.16
## 0.1.44
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@llamaindex/unit-test",
"private": true,
"version": "0.1.46",
"version": "0.1.44",
"type": "module",
"scripts": {
"test": "vitest run"