mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-11 00:04:07 -04:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97c00d67c3 | |||
| 6ebd7c2f13 | |||
| 0267bb0e8e | |||
| 7875ee91e6 | |||
| e3405fca44 | |||
| f3bc2b61e7 | |||
| 4c703767b7 | |||
| a27648200d | |||
| c93bb02002 | |||
| e9ded4e65f | |||
| 47a6f5fe5a | |||
| b80f33e264 | |||
| b6409b6823 | |||
| db3f556cb4 | |||
| 4b5179169b | |||
| 971d37ceba | |||
| 3e0ffdc688 | |||
| 049471bade |
@@ -1,5 +1,49 @@
|
|||||||
# @llamaindex/doc
|
# @llamaindex/doc
|
||||||
|
|
||||||
|
## 0.2.52
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
- @llamaindex/cloud@4.1.2
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
- @llamaindex/node-parser@2.0.20
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
- @llamaindex/readers@3.1.19
|
||||||
|
- @llamaindex/workflow@1.1.21
|
||||||
|
|
||||||
|
## 0.2.51
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
|
||||||
|
## 0.2.50
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
|
||||||
|
## 0.2.49
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4b51791]
|
||||||
|
- @llamaindex/cloud@4.1.1
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
|
||||||
|
## 0.2.48
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- @llamaindex/cloud@4.1.0
|
||||||
|
- llamaindex@0.11.25
|
||||||
|
|
||||||
## 0.2.47
|
## 0.2.47
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/doc",
|
"name": "@llamaindex/doc",
|
||||||
"version": "0.2.47",
|
"version": "0.2.52",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "fumadocs-mdx",
|
"postinstall": "fumadocs-mdx",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@huggingface/transformers": "^3.5.0",
|
"@huggingface/transformers": "^3.5.0",
|
||||||
"@icons-pack/react-simple-icons": "^10.1.0",
|
"@icons-pack/react-simple-icons": "^10.1.0",
|
||||||
"@llamaindex/chat-ui-docs": "^0.0.5",
|
"@llamaindex/chat-ui-docs": "^0.1.0",
|
||||||
"@llamaindex/cloud": "workspace:*",
|
"@llamaindex/cloud": "workspace:*",
|
||||||
"@llamaindex/core": "workspace:*",
|
"@llamaindex/core": "workspace:*",
|
||||||
"@llamaindex/node-parser": "workspace:*",
|
"@llamaindex/node-parser": "workspace:*",
|
||||||
|
|||||||
@@ -93,4 +93,4 @@ async function main() {
|
|||||||
main().catch(console.error);
|
main().catch(console.error);
|
||||||
```
|
```
|
||||||
|
|
||||||
You can see the [full example file](https://github.com/run-llama/LlamaIndexTS/blob/main/examples/vectorIndexLocal.ts).
|
You can see the [full example file](https://github.com/run-llama/LlamaIndexTS/blob/main/examples/index/vectorIndexLocal.ts).
|
||||||
|
|||||||
@@ -46,3 +46,31 @@ You should expect output something like:
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Using the `exec` method
|
||||||
|
|
||||||
|
Many LLMs do not natively support structured output, and often rely exclusively on prompt or context engineering.
|
||||||
|
|
||||||
|
In this sense, we proved you with an alternative for structured data extraction, using the `exec` method with `responseFormat`.
|
||||||
|
|
||||||
|
For example, you can, in a new folder, install our Anthropic integration and `zod` v3:
|
||||||
|
|
||||||
|
```package-install
|
||||||
|
npm init
|
||||||
|
npm i -D typescript @types/node
|
||||||
|
npm i @llamaindex/anthropic zod@3.25.76
|
||||||
|
```
|
||||||
|
|
||||||
|
And then try extracting data with this code:
|
||||||
|
|
||||||
|
<include cwd>../../examples/agents/tools/response-format-exec.ts</include>
|
||||||
|
|
||||||
|
The output should look like this:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"title": "La Divina Commedia",
|
||||||
|
"author": "Dante Alighieri",
|
||||||
|
"year": 1321
|
||||||
|
}
|
||||||
|
```
|
||||||
@@ -1,5 +1,24 @@
|
|||||||
# @llamaindex/cloudflare-worker-agent-test
|
# @llamaindex/cloudflare-worker-agent-test
|
||||||
|
|
||||||
|
## 0.0.188
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
|
||||||
|
## 0.0.187
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
|
||||||
|
## 0.0.186
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- llamaindex@0.11.25
|
||||||
|
|
||||||
## 0.0.185
|
## 0.0.185
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/cloudflare-worker-agent-test",
|
"name": "@llamaindex/cloudflare-worker-agent-test",
|
||||||
"version": "0.0.185",
|
"version": "0.0.188",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,5 +1,25 @@
|
|||||||
# @llamaindex/llama-parse-browser-test
|
# @llamaindex/llama-parse-browser-test
|
||||||
|
|
||||||
|
## 0.0.86
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @llamaindex/cloud@4.1.2
|
||||||
|
|
||||||
|
## 0.0.85
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4b51791]
|
||||||
|
- @llamaindex/cloud@4.1.1
|
||||||
|
|
||||||
|
## 0.0.84
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- @llamaindex/cloud@4.1.0
|
||||||
|
|
||||||
## 0.0.83
|
## 0.0.83
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/llama-parse-browser-test",
|
"name": "@llamaindex/llama-parse-browser-test",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.83",
|
"version": "0.0.86",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
# @llamaindex/next-agent-test
|
# @llamaindex/next-agent-test
|
||||||
|
|
||||||
|
## 0.1.188
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
|
||||||
|
## 0.1.187
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
|
||||||
|
## 0.1.186
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- llamaindex@0.11.25
|
||||||
|
|
||||||
## 0.1.185
|
## 0.1.185
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/next-agent-test",
|
"name": "@llamaindex/next-agent-test",
|
||||||
"version": "0.1.185",
|
"version": "0.1.188",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
# test-edge-runtime
|
# test-edge-runtime
|
||||||
|
|
||||||
|
## 0.1.187
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
|
||||||
|
## 0.1.186
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
|
||||||
|
## 0.1.185
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- llamaindex@0.11.25
|
||||||
|
|
||||||
## 0.1.184
|
## 0.1.184
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/nextjs-edge-runtime-test",
|
"name": "@llamaindex/nextjs-edge-runtime-test",
|
||||||
"version": "0.1.184",
|
"version": "0.1.187",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,5 +1,38 @@
|
|||||||
# @llamaindex/next-node-runtime
|
# @llamaindex/next-node-runtime
|
||||||
|
|
||||||
|
## 0.1.59
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
- @llamaindex/huggingface@0.1.27
|
||||||
|
- @llamaindex/readers@3.1.19
|
||||||
|
|
||||||
|
## 0.1.58
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @llamaindex/huggingface@0.1.26
|
||||||
|
|
||||||
|
## 0.1.57
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @llamaindex/huggingface@0.1.25
|
||||||
|
|
||||||
|
## 0.1.56
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
|
||||||
|
## 0.1.55
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- llamaindex@0.11.25
|
||||||
|
|
||||||
## 0.1.54
|
## 0.1.54
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/next-node-runtime-test",
|
"name": "@llamaindex/next-node-runtime-test",
|
||||||
"version": "0.1.54",
|
"version": "0.1.59",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
# vite-import-llamaindex
|
# vite-import-llamaindex
|
||||||
|
|
||||||
|
## 0.0.54
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
|
||||||
|
## 0.0.53
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
|
||||||
|
## 0.0.52
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- llamaindex@0.11.25
|
||||||
|
|
||||||
## 0.0.51
|
## 0.0.51
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "vite-import-llamaindex",
|
"name": "vite-import-llamaindex",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.51",
|
"version": "0.0.54",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
# @llamaindex/waku-query-engine-test
|
# @llamaindex/waku-query-engine-test
|
||||||
|
|
||||||
|
## 0.0.188
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
|
||||||
|
## 0.0.187
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
|
||||||
|
## 0.0.186
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- llamaindex@0.11.25
|
||||||
|
|
||||||
## 0.0.185
|
## 0.0.185
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/waku-query-engine-test",
|
"name": "@llamaindex/waku-query-engine-test",
|
||||||
"version": "0.0.185",
|
"version": "0.0.188",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,5 +1,110 @@
|
|||||||
# examples
|
# examples
|
||||||
|
|
||||||
|
## 0.3.39
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
- @llamaindex/cloud@4.1.2
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
- @llamaindex/node-parser@2.0.20
|
||||||
|
- @llamaindex/anthropic@0.3.23
|
||||||
|
- @llamaindex/assemblyai@0.1.19
|
||||||
|
- @llamaindex/clip@0.0.73
|
||||||
|
- @llamaindex/cohere@0.0.34
|
||||||
|
- @llamaindex/deepinfra@0.0.73
|
||||||
|
- @llamaindex/discord@0.1.19
|
||||||
|
- @llamaindex/google@0.3.20
|
||||||
|
- @llamaindex/huggingface@0.1.27
|
||||||
|
- @llamaindex/jinaai@0.0.33
|
||||||
|
- @llamaindex/mistral@0.1.20
|
||||||
|
- @llamaindex/mixedbread@0.0.34
|
||||||
|
- @llamaindex/notion@0.1.19
|
||||||
|
- @llamaindex/ollama@0.1.21
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
- @llamaindex/perplexity@0.0.30
|
||||||
|
- @llamaindex/portkey-ai@0.0.62
|
||||||
|
- @llamaindex/replicate@0.0.62
|
||||||
|
- @llamaindex/bm25-retriever@0.0.9
|
||||||
|
- @llamaindex/astra@0.0.34
|
||||||
|
- @llamaindex/azure@0.1.34
|
||||||
|
- @llamaindex/chroma@0.0.34
|
||||||
|
- @llamaindex/elastic-search@0.1.20
|
||||||
|
- @llamaindex/firestore@1.0.27
|
||||||
|
- @llamaindex/milvus@0.1.29
|
||||||
|
- @llamaindex/mongodb@0.0.35
|
||||||
|
- @llamaindex/pinecone@0.1.20
|
||||||
|
- @llamaindex/postgres@0.0.63
|
||||||
|
- @llamaindex/qdrant@0.1.30
|
||||||
|
- @llamaindex/supabase@0.1.21
|
||||||
|
- @llamaindex/upstash@0.0.34
|
||||||
|
- @llamaindex/weaviate@0.0.35
|
||||||
|
- @llamaindex/vercel@0.1.20
|
||||||
|
- @llamaindex/voyage-ai@1.0.26
|
||||||
|
- @llamaindex/readers@3.1.19
|
||||||
|
- @llamaindex/tools@0.1.10
|
||||||
|
- @llamaindex/workflow@1.1.21
|
||||||
|
- @llamaindex/deepseek@0.0.35
|
||||||
|
- @llamaindex/fireworks@0.0.33
|
||||||
|
- @llamaindex/groq@0.0.89
|
||||||
|
- @llamaindex/together@0.0.33
|
||||||
|
- @llamaindex/vllm@0.0.59
|
||||||
|
- @llamaindex/xai@0.0.20
|
||||||
|
|
||||||
|
## 0.3.38
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
- @llamaindex/clip@0.0.72
|
||||||
|
- @llamaindex/deepinfra@0.0.72
|
||||||
|
- @llamaindex/deepseek@0.0.34
|
||||||
|
- @llamaindex/fireworks@0.0.32
|
||||||
|
- @llamaindex/groq@0.0.88
|
||||||
|
- @llamaindex/huggingface@0.1.26
|
||||||
|
- @llamaindex/jinaai@0.0.32
|
||||||
|
- @llamaindex/perplexity@0.0.29
|
||||||
|
- @llamaindex/azure@0.1.33
|
||||||
|
- @llamaindex/together@0.0.32
|
||||||
|
- @llamaindex/vllm@0.0.58
|
||||||
|
- @llamaindex/xai@0.0.19
|
||||||
|
|
||||||
|
## 0.3.37
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [47a6f5f]
|
||||||
|
- Updated dependencies [b80f33e]
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- Updated dependencies [b80f33e]
|
||||||
|
- @llamaindex/ollama@0.1.20
|
||||||
|
- @llamaindex/anthropic@0.3.22
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
- @llamaindex/clip@0.0.71
|
||||||
|
- @llamaindex/deepinfra@0.0.71
|
||||||
|
- @llamaindex/deepseek@0.0.33
|
||||||
|
- @llamaindex/fireworks@0.0.31
|
||||||
|
- @llamaindex/groq@0.0.87
|
||||||
|
- @llamaindex/huggingface@0.1.25
|
||||||
|
- @llamaindex/jinaai@0.0.31
|
||||||
|
- @llamaindex/perplexity@0.0.28
|
||||||
|
- @llamaindex/azure@0.1.32
|
||||||
|
- @llamaindex/together@0.0.31
|
||||||
|
- @llamaindex/vllm@0.0.57
|
||||||
|
- @llamaindex/xai@0.0.18
|
||||||
|
|
||||||
|
## 0.3.36
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4b51791]
|
||||||
|
- Updated dependencies [971d37c]
|
||||||
|
- @llamaindex/cloud@4.1.1
|
||||||
|
- @llamaindex/deepseek@0.0.32
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
|
||||||
## 0.3.35
|
## 0.3.35
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import { Anthropic } from "@llamaindex/anthropic";
|
||||||
|
import { ChatMessage, ToolCall } from "llamaindex";
|
||||||
|
import { z } from "zod";
|
||||||
|
|
||||||
|
const llm = new Anthropic({ model: "claude-4-0-sonnet" });
|
||||||
|
|
||||||
|
const responseSchema = z.object({
|
||||||
|
title: z.string().describe("The title of the book"),
|
||||||
|
author: z.string().describe("The author of the book"),
|
||||||
|
year: z.number().describe("The publication year"),
|
||||||
|
});
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const messages: ChatMessage[] = [];
|
||||||
|
let toolCalls: ToolCall[] = [];
|
||||||
|
do {
|
||||||
|
const result = await llm.exec({
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
role: "system",
|
||||||
|
content: `You are a book expert. Your task is, given a user message, extract the title, author and publication year of the book and output them in JSON format.`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
role: "user",
|
||||||
|
content: `I have been reading La Divina Commedia by Dante Alighieri, published in 1321, which tells the story of a guy who goes through Hell, Purgatory and Heaven just to meet his beloved ex-girlfriend.`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
responseFormat: responseSchema,
|
||||||
|
});
|
||||||
|
console.log(result.newMessages[0].content);
|
||||||
|
messages.push(...result.newMessages);
|
||||||
|
toolCalls = result.toolCalls;
|
||||||
|
} while (toolCalls.length == 0);
|
||||||
|
|
||||||
|
console.log(messages[1].content);
|
||||||
|
console.log(toolCalls);
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import { anthropic } from "@llamaindex/anthropic";
|
||||||
|
import { agent } from "@llamaindex/workflow";
|
||||||
|
|
||||||
|
(async function () {
|
||||||
|
const workflow = agent({
|
||||||
|
llm: anthropic({
|
||||||
|
model: "claude-4-1-opus",
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
const result = await workflow.run(
|
||||||
|
"What are three compounds we should consider investigating to advance research into new antibiotics? Why should we consider them?",
|
||||||
|
);
|
||||||
|
console.log(result.data.result);
|
||||||
|
})();
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { ollama } from "@llamaindex/ollama";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
const llm = ollama({
|
||||||
|
model: "gpt-oss:20b",
|
||||||
|
});
|
||||||
|
const response = await llm.complete({ prompt: "How are you?" });
|
||||||
|
console.log("Response:", response.text);
|
||||||
|
})();
|
||||||
+47
-47
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/examples",
|
"name": "@llamaindex/examples",
|
||||||
"version": "0.3.35",
|
"version": "0.3.39",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
@@ -11,52 +11,52 @@
|
|||||||
"@azure/cosmos": "^4.1.1",
|
"@azure/cosmos": "^4.1.1",
|
||||||
"@azure/identity": "^4.4.1",
|
"@azure/identity": "^4.4.1",
|
||||||
"@azure/search-documents": "^12.1.0",
|
"@azure/search-documents": "^12.1.0",
|
||||||
"@llamaindex/anthropic": "^0.3.21",
|
"@llamaindex/anthropic": "^0.3.23",
|
||||||
"@llamaindex/assemblyai": "^0.1.18",
|
"@llamaindex/assemblyai": "^0.1.19",
|
||||||
"@llamaindex/astra": "^0.0.33",
|
"@llamaindex/astra": "^0.0.34",
|
||||||
"@llamaindex/azure": "^0.1.31",
|
"@llamaindex/azure": "^0.1.34",
|
||||||
"@llamaindex/bm25-retriever": "^0.0.8",
|
"@llamaindex/bm25-retriever": "^0.0.9",
|
||||||
"@llamaindex/chroma": "^0.0.33",
|
"@llamaindex/chroma": "^0.0.34",
|
||||||
"@llamaindex/clip": "^0.0.70",
|
"@llamaindex/clip": "^0.0.73",
|
||||||
"@llamaindex/cloud": "^4.0.28",
|
"@llamaindex/cloud": "^4.1.2",
|
||||||
"@llamaindex/cohere": "^0.0.33",
|
"@llamaindex/cohere": "^0.0.34",
|
||||||
"@llamaindex/core": "^0.6.19",
|
"@llamaindex/core": "^0.6.20",
|
||||||
"@llamaindex/deepinfra": "^0.0.70",
|
"@llamaindex/deepinfra": "^0.0.73",
|
||||||
"@llamaindex/deepseek": "^0.0.31",
|
"@llamaindex/deepseek": "^0.0.35",
|
||||||
"@llamaindex/discord": "^0.1.18",
|
"@llamaindex/discord": "^0.1.19",
|
||||||
"@llamaindex/elastic-search": "^0.1.19",
|
"@llamaindex/elastic-search": "^0.1.20",
|
||||||
"@llamaindex/env": "^0.1.30",
|
"@llamaindex/env": "^0.1.30",
|
||||||
"@llamaindex/firestore": "^1.0.26",
|
"@llamaindex/firestore": "^1.0.27",
|
||||||
"@llamaindex/fireworks": "^0.0.30",
|
"@llamaindex/fireworks": "^0.0.33",
|
||||||
"@llamaindex/google": "^0.3.18",
|
"@llamaindex/google": "^0.3.20",
|
||||||
"@llamaindex/groq": "^0.0.86",
|
"@llamaindex/groq": "^0.0.89",
|
||||||
"@llamaindex/huggingface": "^0.1.24",
|
"@llamaindex/huggingface": "^0.1.27",
|
||||||
"@llamaindex/jinaai": "^0.0.30",
|
"@llamaindex/jinaai": "^0.0.33",
|
||||||
"@llamaindex/milvus": "^0.1.28",
|
"@llamaindex/milvus": "^0.1.29",
|
||||||
"@llamaindex/mistral": "^0.1.19",
|
"@llamaindex/mistral": "^0.1.20",
|
||||||
"@llamaindex/mixedbread": "^0.0.33",
|
"@llamaindex/mixedbread": "^0.0.34",
|
||||||
"@llamaindex/mongodb": "^0.0.34",
|
"@llamaindex/mongodb": "^0.0.35",
|
||||||
"@llamaindex/node-parser": "^2.0.19",
|
"@llamaindex/node-parser": "^2.0.20",
|
||||||
"@llamaindex/notion": "^0.1.18",
|
"@llamaindex/notion": "^0.1.19",
|
||||||
"@llamaindex/ollama": "^0.1.19",
|
"@llamaindex/ollama": "^0.1.21",
|
||||||
"@llamaindex/openai": "^0.4.14",
|
"@llamaindex/openai": "^0.4.17",
|
||||||
"@llamaindex/perplexity": "^0.0.27",
|
"@llamaindex/perplexity": "^0.0.30",
|
||||||
"@llamaindex/pinecone": "^0.1.19",
|
"@llamaindex/pinecone": "^0.1.20",
|
||||||
"@llamaindex/portkey-ai": "^0.0.61",
|
"@llamaindex/portkey-ai": "^0.0.62",
|
||||||
"@llamaindex/postgres": "^0.0.62",
|
"@llamaindex/postgres": "^0.0.63",
|
||||||
"@llamaindex/qdrant": "^0.1.29",
|
"@llamaindex/qdrant": "^0.1.30",
|
||||||
"@llamaindex/readers": "^3.1.18",
|
"@llamaindex/readers": "^3.1.19",
|
||||||
"@llamaindex/replicate": "^0.0.61",
|
"@llamaindex/replicate": "^0.0.62",
|
||||||
"@llamaindex/supabase": "^0.1.20",
|
"@llamaindex/supabase": "^0.1.21",
|
||||||
"@llamaindex/together": "^0.0.30",
|
"@llamaindex/together": "^0.0.33",
|
||||||
"@llamaindex/tools": "^0.1.9",
|
"@llamaindex/tools": "^0.1.10",
|
||||||
"@llamaindex/upstash": "^0.0.33",
|
"@llamaindex/upstash": "^0.0.34",
|
||||||
"@llamaindex/vercel": "^0.1.19",
|
"@llamaindex/vercel": "^0.1.20",
|
||||||
"@llamaindex/vllm": "^0.0.56",
|
"@llamaindex/vllm": "^0.0.59",
|
||||||
"@llamaindex/voyage-ai": "^1.0.25",
|
"@llamaindex/voyage-ai": "^1.0.26",
|
||||||
"@llamaindex/weaviate": "^0.0.34",
|
"@llamaindex/weaviate": "^0.0.35",
|
||||||
"@llamaindex/workflow": "^1.1.20",
|
"@llamaindex/workflow": "^1.1.21",
|
||||||
"@llamaindex/xai": "^0.0.17",
|
"@llamaindex/xai": "^0.0.20",
|
||||||
"@notionhq/client": "^4.0.0",
|
"@notionhq/client": "^4.0.0",
|
||||||
"@pinecone-database/pinecone": "^4.0.0",
|
"@pinecone-database/pinecone": "^4.0.0",
|
||||||
"@vercel/postgres": "^0.10.0",
|
"@vercel/postgres": "^0.10.0",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
"commander": "^12.1.0",
|
"commander": "^12.1.0",
|
||||||
"dotenv": "^17.2.0",
|
"dotenv": "^17.2.0",
|
||||||
"js-tiktoken": "^1.0.14",
|
"js-tiktoken": "^1.0.14",
|
||||||
"llamaindex": "^0.11.24",
|
"llamaindex": "^0.11.27",
|
||||||
"mongodb": "6.7.0",
|
"mongodb": "6.7.0",
|
||||||
"postgres": "^3.4.4",
|
"postgres": "^3.4.4",
|
||||||
"wikipedia": "^2.1.2",
|
"wikipedia": "^2.1.2",
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
# @llamaindex/autotool
|
# @llamaindex/autotool
|
||||||
|
|
||||||
|
## 8.0.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
|
||||||
|
## 8.0.26
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
|
||||||
|
## 8.0.25
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- llamaindex@0.11.25
|
||||||
|
|
||||||
## 8.0.24
|
## 8.0.24
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,5 +1,27 @@
|
|||||||
# @llamaindex/autotool-01-node-example
|
# @llamaindex/autotool-01-node-example
|
||||||
|
|
||||||
|
## 0.0.135
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
- @llamaindex/autotool@8.0.27
|
||||||
|
|
||||||
|
## 0.0.134
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
- @llamaindex/autotool@8.0.26
|
||||||
|
|
||||||
|
## 0.0.133
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- llamaindex@0.11.25
|
||||||
|
- @llamaindex/autotool@8.0.25
|
||||||
|
|
||||||
## 0.0.132
|
## 0.0.132
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -13,5 +13,5 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node --import tsx --import @llamaindex/autotool/node ./src/index.ts"
|
"start": "node --import tsx --import @llamaindex/autotool/node ./src/index.ts"
|
||||||
},
|
},
|
||||||
"version": "0.0.132"
|
"version": "0.0.135"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"url": "git+https://github.com/run-llama/LlamaIndexTS.git",
|
"url": "git+https://github.com/run-llama/LlamaIndexTS.git",
|
||||||
"directory": "packages/autotool"
|
"directory": "packages/autotool"
|
||||||
},
|
},
|
||||||
"version": "8.0.24",
|
"version": "8.0.27",
|
||||||
"description": "auto transpile your JS function to LLM Agent compatible",
|
"description": "auto transpile your JS function to LLM Agent compatible",
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
# @llamaindex/cloud
|
# @llamaindex/cloud
|
||||||
|
|
||||||
|
## 4.1.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
|
## 4.1.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 4b51791: Add deprecation to README
|
||||||
|
|
||||||
|
## 4.1.0
|
||||||
|
|
||||||
|
### Minor Changes
|
||||||
|
|
||||||
|
- 049471b: Add deprecation warning
|
||||||
|
|
||||||
## 4.0.28
|
## 4.0.28
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
# @llamaindex/cloud
|
# @llamaindex/cloud
|
||||||
|
|
||||||
> 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.
|
> [!WARNING]
|
||||||
|
> This package has been deprecated since version 4.1.0.
|
||||||
For more information, see the [API documentation](https://docs.cloud.llamaindex.ai/).
|
> Please migrate to [llama-cloud-services](https://www.npmjs.com/package/llama-cloud-services).
|
||||||
|
> See the documentation: https://docs.cloud.llamaindex.ai
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/cloud",
|
"name": "@llamaindex/cloud",
|
||||||
"version": "4.0.28",
|
"version": "4.1.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
// Deprecation warning
|
||||||
|
console.warn(`
|
||||||
|
The package @llamaindex/cloud has been deprecated since version 4.1.0
|
||||||
|
* Please migrate to llama-cloud-services.
|
||||||
|
* See the documentation: https://docs.cloud.llamaindex.ai
|
||||||
|
`);
|
||||||
|
|
||||||
import { client } from "./client/client.gen";
|
import { client } from "./client/client.gen";
|
||||||
|
|
||||||
client.setConfig({
|
client.setConfig({
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
// Deprecation warning
|
||||||
|
console.warn(`
|
||||||
|
The package @llamaindex/cloud has been deprecated since version 4.1.0
|
||||||
|
* Please migrate to llama-cloud-services.
|
||||||
|
* See the documentation: https://docs.cloud.llamaindex.ai
|
||||||
|
`);
|
||||||
|
|
||||||
export { AgentClient, createAgentDataClient } from "./client";
|
export { AgentClient, createAgentDataClient } from "./client";
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
// Deprecation warning
|
||||||
|
console.warn(`
|
||||||
|
The package @llamaindex/cloud has been deprecated since version 4.1.0
|
||||||
|
* Please migrate to llama-cloud-services.
|
||||||
|
* See the documentation: https://docs.cloud.llamaindex.ai
|
||||||
|
`);
|
||||||
|
|
||||||
import { createClient, createConfig } from "@hey-api/client-fetch";
|
import { createClient, createConfig } from "@hey-api/client-fetch";
|
||||||
import { createWorkflow, type InferWorkflowEventData } from "@llama-flow/core";
|
import { createWorkflow, type InferWorkflowEventData } from "@llama-flow/core";
|
||||||
import { createStatefulMiddleware } from "@llama-flow/core/middleware/state";
|
import { createStatefulMiddleware } from "@llama-flow/core/middleware/state";
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @llamaindex/community
|
# @llamaindex/community
|
||||||
|
|
||||||
|
## 0.0.102
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 6ebd7c2: fix: invoke complete command using the actual modelId
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 0.0.101
|
## 0.0.101
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/community",
|
"name": "@llamaindex/community",
|
||||||
"description": "Community package for LlamaIndexTS",
|
"description": "Community package for LlamaIndexTS",
|
||||||
"version": "0.0.101",
|
"version": "0.0.102",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/type/index.d.ts",
|
"types": "dist/type/index.d.ts",
|
||||||
"main": "dist/cjs/index.js",
|
"main": "dist/cjs/index.js",
|
||||||
|
|||||||
@@ -493,6 +493,8 @@ export class Bedrock extends ToolCallLLM<BedrockAdditionalChatOptions> {
|
|||||||
|
|
||||||
if (params.stream) {
|
if (params.stream) {
|
||||||
const command = new InvokeModelWithResponseStreamCommand(input);
|
const command = new InvokeModelWithResponseStreamCommand(input);
|
||||||
|
command.input.modelId = this.actualModel;
|
||||||
|
|
||||||
const response = await this.client.send(command);
|
const response = await this.client.send(command);
|
||||||
if (response.body)
|
if (response.body)
|
||||||
return streamConverter(response.body, (response) => {
|
return streamConverter(response.body, (response) => {
|
||||||
@@ -504,6 +506,8 @@ export class Bedrock extends ToolCallLLM<BedrockAdditionalChatOptions> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const command = new InvokeModelCommand(input);
|
const command = new InvokeModelCommand(input);
|
||||||
|
command.input.modelId = this.actualModel;
|
||||||
|
|
||||||
const response = await this.client.send(command);
|
const response = await this.client.send(command);
|
||||||
return {
|
return {
|
||||||
text: this.provider.getTextFromResponse(response),
|
text: this.provider.getTextFromResponse(response),
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @llamaindex/core
|
# @llamaindex/core
|
||||||
|
|
||||||
|
## 0.6.20
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 0267bb0: Added responseFormat to llm.exec
|
||||||
|
|
||||||
## 0.6.19
|
## 0.6.19
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/core",
|
"name": "@llamaindex/core",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.6.19",
|
"version": "0.6.20",
|
||||||
"description": "LlamaIndex Core Module",
|
"description": "LlamaIndex Core Module",
|
||||||
"exports": {
|
"exports": {
|
||||||
"./agent": {
|
"./agent": {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import { emptyLogger } from "@llamaindex/env";
|
import { emptyLogger } from "@llamaindex/env";
|
||||||
|
import type { JSONObject } from "../global";
|
||||||
|
import { tool } from "../tools/";
|
||||||
import { extractText } from "../utils/llms";
|
import { extractText } from "../utils/llms";
|
||||||
import { streamConverter } from "../utils/stream";
|
import { streamConverter } from "../utils/stream";
|
||||||
import { callToolToMessage, getToolCallsFromResponse } from "./tool-call";
|
import { callToolToMessage, getToolCallsFromResponse } from "./tool-call";
|
||||||
@@ -18,6 +20,7 @@ import type {
|
|||||||
PartialToolCall,
|
PartialToolCall,
|
||||||
ToolCallLLMMessageOptions,
|
ToolCallLLMMessageOptions,
|
||||||
} from "./type";
|
} from "./type";
|
||||||
|
import { isZodSchema } from "./utils";
|
||||||
|
|
||||||
export abstract class BaseLLM<
|
export abstract class BaseLLM<
|
||||||
AdditionalChatOptions extends object = object,
|
AdditionalChatOptions extends object = object,
|
||||||
@@ -97,6 +100,31 @@ export abstract class BaseLLM<
|
|||||||
| ExecResponse<AdditionalMessageOptions>
|
| ExecResponse<AdditionalMessageOptions>
|
||||||
| ExecStreamResponse<AdditionalMessageOptions>
|
| ExecStreamResponse<AdditionalMessageOptions>
|
||||||
> {
|
> {
|
||||||
|
const responseFormat = params.responseFormat;
|
||||||
|
if (typeof responseFormat != "undefined" && isZodSchema(responseFormat)) {
|
||||||
|
const structuredTool = tool({
|
||||||
|
name: "format_output",
|
||||||
|
description: "Respond with a JSON object",
|
||||||
|
parameters: responseFormat,
|
||||||
|
execute: (args) => {
|
||||||
|
const result = responseFormat.safeParse(args);
|
||||||
|
if (!result.success) {
|
||||||
|
console.error("Invalid input from LLM:", result.error);
|
||||||
|
return JSON.stringify({
|
||||||
|
error: "Invalid schema",
|
||||||
|
details: result.error,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return result.data as JSONObject;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
if (Array.isArray(params.tools)) {
|
||||||
|
params.tools.push(structuredTool);
|
||||||
|
} else {
|
||||||
|
params.tools = [structuredTool];
|
||||||
|
}
|
||||||
|
params.responseFormat = undefined;
|
||||||
|
}
|
||||||
if (params.stream) {
|
if (params.stream) {
|
||||||
return this.streamExec(params);
|
return this.streamExec(params);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { z } from "zod";
|
||||||
import type {
|
import type {
|
||||||
ChatMessage,
|
ChatMessage,
|
||||||
MessageContentImageDataDetail,
|
MessageContentImageDataDetail,
|
||||||
@@ -26,3 +27,15 @@ export function addContentPart<AdditionalMessageOptions extends object>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isZodSchema(obj: unknown): obj is z.ZodType {
|
||||||
|
return (
|
||||||
|
obj !== null &&
|
||||||
|
typeof obj === "object" &&
|
||||||
|
"parse" in obj &&
|
||||||
|
typeof (obj as { parse: unknown }).parse === "function" &&
|
||||||
|
"safeParse" in obj &&
|
||||||
|
typeof (obj as { safeParse: unknown }).safeParse === "function" &&
|
||||||
|
"_def" in obj
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { z } from "zod";
|
|||||||
import { zodToJsonSchema } from "zod-to-json-schema";
|
import { zodToJsonSchema } from "zod-to-json-schema";
|
||||||
import type { JSONValue } from "../global";
|
import type { JSONValue } from "../global";
|
||||||
import type { BaseTool, ToolMetadata } from "../llms";
|
import type { BaseTool, ToolMetadata } from "../llms";
|
||||||
|
import { isZodSchema } from "../llms/utils";
|
||||||
|
|
||||||
export class FunctionTool<
|
export class FunctionTool<
|
||||||
T,
|
T,
|
||||||
@@ -94,7 +95,7 @@ export class FunctionTool<
|
|||||||
) {
|
) {
|
||||||
const { execute, parameters, ...restConfig } = fnOrConfig;
|
const { execute, parameters, ...restConfig } = fnOrConfig;
|
||||||
|
|
||||||
if (parameters instanceof z.ZodSchema) {
|
if (isZodSchema(parameters)) {
|
||||||
const jsonSchema = zodToJsonSchema(parameters);
|
const jsonSchema = zodToJsonSchema(parameters);
|
||||||
return new FunctionTool(
|
return new FunctionTool(
|
||||||
execute,
|
execute,
|
||||||
@@ -105,7 +106,6 @@ export class FunctionTool<
|
|||||||
parameters,
|
parameters,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new FunctionTool(execute, fnOrConfig);
|
return new FunctionTool(execute, fnOrConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
# @llamaindex/experimental
|
# @llamaindex/experimental
|
||||||
|
|
||||||
|
## 0.0.204
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.27
|
||||||
|
|
||||||
|
## 0.0.203
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- llamaindex@0.11.26
|
||||||
|
|
||||||
|
## 0.0.202
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- llamaindex@0.11.25
|
||||||
|
|
||||||
## 0.0.201
|
## 0.0.201
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/experimental",
|
"name": "@llamaindex/experimental",
|
||||||
"description": "Experimental package for LlamaIndexTS",
|
"description": "Experimental package for LlamaIndexTS",
|
||||||
"version": "0.0.201",
|
"version": "0.0.204",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/type/index.d.ts",
|
"types": "dist/type/index.d.ts",
|
||||||
"main": "dist/cjs/index.js",
|
"main": "dist/cjs/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,30 @@
|
|||||||
# llamaindex
|
# llamaindex
|
||||||
|
|
||||||
|
## 0.11.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
- @llamaindex/cloud@4.1.2
|
||||||
|
- @llamaindex/node-parser@2.0.20
|
||||||
|
- @llamaindex/workflow@1.1.21
|
||||||
|
|
||||||
|
## 0.11.26
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4b51791]
|
||||||
|
- @llamaindex/cloud@4.1.1
|
||||||
|
|
||||||
|
## 0.11.25
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 049471b: Moved LlamaCloudFileService, LlamaCloudIndex and LlamaCloudRetriever to llama-cloud-services
|
||||||
|
- Updated dependencies [049471b]
|
||||||
|
- @llamaindex/cloud@4.1.0
|
||||||
|
|
||||||
## 0.11.24
|
## 0.11.24
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "llamaindex",
|
"name": "llamaindex",
|
||||||
"version": "0.11.24",
|
"version": "0.11.27",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
console.warn(`
|
||||||
|
The classes LlamaCloudFileService, LlamaCloudIndex and LlamaCloudRetriever have been moved to the package llama-cloud-services.
|
||||||
|
* Please migrate your imports to llama-cloud-services, e.g. import { LlamaCloudIndex } from "llama-cloud-services";
|
||||||
|
* See the documentation: https://docs.cloud.llamaindex.ai
|
||||||
|
`);
|
||||||
|
|
||||||
export { LLamaCloudFileService } from "./LLamaCloudFileService.js";
|
export { LLamaCloudFileService } from "./LLamaCloudFileService.js";
|
||||||
export { LlamaCloudIndex } from "./LlamaCloudIndex.js";
|
export { LlamaCloudIndex } from "./LlamaCloudIndex.js";
|
||||||
export {
|
export {
|
||||||
|
|||||||
@@ -1,5 +1,25 @@
|
|||||||
# @llamaindex/core-test
|
# @llamaindex/core-test
|
||||||
|
|
||||||
|
## 0.1.18
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
|
||||||
|
## 0.1.17
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
|
||||||
|
## 0.1.16
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
|
||||||
## 0.1.15
|
## 0.1.15
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/llamaindex-test",
|
"name": "@llamaindex/llamaindex-test",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.15",
|
"version": "0.1.18",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vitest run"
|
"test": "vitest run"
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/node-parser
|
# @llamaindex/node-parser
|
||||||
|
|
||||||
|
## 2.0.20
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 2.0.19
|
## 2.0.19
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/node-parser",
|
"name": "@llamaindex/node-parser",
|
||||||
"version": "2.0.19",
|
"version": "2.0.20",
|
||||||
"description": "Node parser for LlamaIndex",
|
"description": "Node parser for LlamaIndex",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
# @llamaindex/anthropic
|
# @llamaindex/anthropic
|
||||||
|
|
||||||
|
## 0.3.23
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
|
## 0.3.22
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- b80f33e: Fix: prompt caching (moved from beta)
|
||||||
|
- b80f33e: Feat: add claude opus 4.1
|
||||||
|
|
||||||
## 0.3.21
|
## 0.3.21
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/anthropic",
|
"name": "@llamaindex/anthropic",
|
||||||
"description": "Anthropic Adapter for LlamaIndex",
|
"description": "Anthropic Adapter for LlamaIndex",
|
||||||
"version": "0.3.21",
|
"version": "0.3.23",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -28,19 +28,20 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "bunchee",
|
"build": "bunchee",
|
||||||
"dev": "bunchee --watch",
|
"dev": "bunchee --watch",
|
||||||
"test": "vitest run"
|
"test": "vitest run",
|
||||||
|
"type-check": "tsc -b --diagnostics"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"vitest": "^2.1.5",
|
|
||||||
"@llamaindex/core": "workspace:*",
|
"@llamaindex/core": "workspace:*",
|
||||||
"@llamaindex/env": "workspace:*"
|
"@llamaindex/env": "workspace:*",
|
||||||
|
"vitest": "^2.1.5"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@llamaindex/core": "workspace:*",
|
"@llamaindex/core": "workspace:*",
|
||||||
"@llamaindex/env": "workspace:*"
|
"@llamaindex/env": "workspace:*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@anthropic-ai/sdk": "0.37.0",
|
"@anthropic-ai/sdk": "0.58.0",
|
||||||
"remeda": "^2.17.3"
|
"remeda": "^2.17.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
import type { ClientOptions } from "@anthropic-ai/sdk";
|
import type { ClientOptions } from "@anthropic-ai/sdk";
|
||||||
import { Anthropic as SDKAnthropic } from "@anthropic-ai/sdk";
|
import { Anthropic as SDKAnthropic } from "@anthropic-ai/sdk";
|
||||||
import type {
|
import type {
|
||||||
BetaCacheControlEphemeral,
|
CacheControlEphemeral,
|
||||||
BetaTextBlockParam,
|
Message,
|
||||||
} from "@anthropic-ai/sdk/resources/beta/index";
|
TextBlock,
|
||||||
import type { TextBlock } from "@anthropic-ai/sdk/resources/index";
|
} from "@anthropic-ai/sdk/resources/index";
|
||||||
import type {
|
import type {
|
||||||
MessageCreateParams,
|
MessageCreateParams,
|
||||||
MessageCreateParamsBase,
|
MessageCreateParamsBase,
|
||||||
MessageParam,
|
MessageParam,
|
||||||
Model,
|
Model,
|
||||||
|
TextBlockParam,
|
||||||
ThinkingBlock,
|
ThinkingBlock,
|
||||||
Tool,
|
Tool,
|
||||||
ToolUseBlock,
|
ToolUseBlock,
|
||||||
@@ -116,7 +117,15 @@ export const ALL_AVAILABLE_V4_MODELS = {
|
|||||||
"claude-4-0-sonnet": { contextWindow: 200000 },
|
"claude-4-0-sonnet": { contextWindow: 200000 },
|
||||||
"claude-4-sonnet-20240514": { contextWindow: 200000 },
|
"claude-4-sonnet-20240514": { contextWindow: 200000 },
|
||||||
"claude-4-0-opus": { contextWindow: 200000 },
|
"claude-4-0-opus": { contextWindow: 200000 },
|
||||||
|
"claude-4-1-opus": { contextWindow: 200000 },
|
||||||
"claude-4-opus-20240514": { contextWindow: 200000 },
|
"claude-4-opus-20240514": { contextWindow: 200000 },
|
||||||
|
"claude-sonnet-4-0": { contextWindow: 200000 },
|
||||||
|
"claude-sonnet-4-20250514": { contextWindow: 200000 },
|
||||||
|
"claude-opus-4-0": { contextWindow: 200000 },
|
||||||
|
"claude-opus-4-20250514": { contextWindow: 200000 },
|
||||||
|
"claude-4-sonnet-20250514": { contextWindow: 200000 },
|
||||||
|
"claude-4-opus-20250514": { contextWindow: 200000 },
|
||||||
|
"claude-opus-4-1-20250805": { contextWindow: 200000 },
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ALL_AVAILABLE_ANTHROPIC_MODELS = {
|
export const ALL_AVAILABLE_ANTHROPIC_MODELS = {
|
||||||
@@ -137,6 +146,7 @@ const AVAILABLE_ANTHROPIC_MODELS_WITHOUT_DATE: { [key: string]: string } = {
|
|||||||
"claude-3-7-sonnet": "claude-3-7-sonnet-20250219",
|
"claude-3-7-sonnet": "claude-3-7-sonnet-20250219",
|
||||||
"claude-4-0-sonnet": "claude-sonnet-4-20250514",
|
"claude-4-0-sonnet": "claude-sonnet-4-20250514",
|
||||||
"claude-4-0-opus": "claude-opus-4-20250514",
|
"claude-4-0-opus": "claude-opus-4-20250514",
|
||||||
|
"claude-4-1-opus": "claude-opus-4-1-20250805",
|
||||||
} as { [key in keyof typeof ALL_AVAILABLE_ANTHROPIC_MODELS]: string };
|
} as { [key in keyof typeof ALL_AVAILABLE_ANTHROPIC_MODELS]: string };
|
||||||
|
|
||||||
export type AnthropicAdditionalChatOptions = Pick<
|
export type AnthropicAdditionalChatOptions = Pick<
|
||||||
@@ -144,7 +154,7 @@ export type AnthropicAdditionalChatOptions = Pick<
|
|||||||
"thinking"
|
"thinking"
|
||||||
>;
|
>;
|
||||||
export type AnthropicToolCallLLMMessageOptions = ToolCallLLMMessageOptions & {
|
export type AnthropicToolCallLLMMessageOptions = ToolCallLLMMessageOptions & {
|
||||||
cache_control?: BetaCacheControlEphemeral | null;
|
cache_control?: CacheControlEphemeral | null;
|
||||||
thinking?: string | undefined;
|
thinking?: string | undefined;
|
||||||
thinking_signature?: string | undefined;
|
thinking_signature?: string | undefined;
|
||||||
};
|
};
|
||||||
@@ -462,20 +472,20 @@ export class Anthropic extends ToolCallLLM<
|
|||||||
const { messages, stream, tools } = params;
|
const { messages, stream, tools } = params;
|
||||||
|
|
||||||
// Handle system messages
|
// Handle system messages
|
||||||
let systemPrompt: string | BetaTextBlockParam[] | null = null;
|
let systemPrompt: string | TextBlockParam[] | null = null;
|
||||||
const systemMessages = messages.filter(
|
const systemMessages = messages.filter(
|
||||||
(message) => message.role === "system",
|
(message) => message.role === "system",
|
||||||
);
|
);
|
||||||
|
|
||||||
if (systemMessages.length > 0) {
|
if (systemMessages.length > 0) {
|
||||||
systemPrompt = systemMessages.map((message): BetaTextBlockParam => {
|
systemPrompt = systemMessages.map((message): TextBlockParam => {
|
||||||
const textContent = extractText(message.content);
|
const textContent = extractText(message.content);
|
||||||
if (message.options && "cache_control" in message.options) {
|
if (message.options && "cache_control" in message.options) {
|
||||||
return {
|
return {
|
||||||
type: "text" as const,
|
type: "text" as const,
|
||||||
text: textContent,
|
text: textContent,
|
||||||
cache_control: message.options
|
cache_control: message.options
|
||||||
.cache_control as BetaCacheControlEphemeral,
|
.cache_control as CacheControlEphemeral,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -485,17 +495,9 @@ export class Anthropic extends ToolCallLLM<
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const beta =
|
const anthropic = this.session.anthropic;
|
||||||
Array.isArray(systemPrompt) &&
|
|
||||||
systemPrompt.some((message) => "cache_control" in message);
|
|
||||||
|
|
||||||
let anthropic = this.session.anthropic;
|
const apiParams: MessageCreateParamsBase = {
|
||||||
if (beta) {
|
|
||||||
// @ts-expect-error type casting
|
|
||||||
anthropic = anthropic.beta.promptCaching;
|
|
||||||
}
|
|
||||||
|
|
||||||
const apiParams: MessageCreateParams = {
|
|
||||||
model: this.getModelName(this.model),
|
model: this.getModelName(this.model),
|
||||||
messages: this.mergeConsecutiveMessages(
|
messages: this.mergeConsecutiveMessages(
|
||||||
this.formatMessages(messages.filter((m) => m.role !== "system")),
|
this.formatMessages(messages.filter((m) => m.role !== "system")),
|
||||||
@@ -521,7 +523,7 @@ export class Anthropic extends ToolCallLLM<
|
|||||||
return this.streamChat(anthropic, apiParams);
|
return this.streamChat(anthropic, apiParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await anthropic.messages.create(apiParams);
|
const response = (await anthropic.messages.create(apiParams)) as Message;
|
||||||
|
|
||||||
const thinkingBlock = response.content.find(
|
const thinkingBlock = response.content.find(
|
||||||
(content): content is ThinkingBlock => content.type === "thinking",
|
(content): content is ThinkingBlock => content.type === "thinking",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/assemblyai
|
# @llamaindex/assemblyai
|
||||||
|
|
||||||
|
## 0.1.19
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 0.1.18
|
## 0.1.18
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/assemblyai",
|
"name": "@llamaindex/assemblyai",
|
||||||
"description": "AssemblyAI Reader for LlamaIndex",
|
"description": "AssemblyAI Reader for LlamaIndex",
|
||||||
"version": "0.1.18",
|
"version": "0.1.19",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"main": "dist/index.cjs",
|
"main": "dist/index.cjs",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/community
|
# @llamaindex/community
|
||||||
|
|
||||||
|
## 0.0.116
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 0.0.115
|
## 0.0.115
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/aws",
|
"name": "@llamaindex/aws",
|
||||||
"description": "AWS package for LlamaIndexTS",
|
"description": "AWS package for LlamaIndexTS",
|
||||||
"version": "0.0.115",
|
"version": "0.0.116",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/type/index.d.ts",
|
"types": "dist/type/index.d.ts",
|
||||||
"main": "dist/cjs/index.js",
|
"main": "dist/cjs/index.js",
|
||||||
|
|||||||
@@ -546,6 +546,8 @@ export class Bedrock extends ToolCallLLM<BedrockAdditionalChatOptions> {
|
|||||||
|
|
||||||
if (params.stream) {
|
if (params.stream) {
|
||||||
const command = new InvokeModelWithResponseStreamCommand(input);
|
const command = new InvokeModelWithResponseStreamCommand(input);
|
||||||
|
command.input.modelId = this.actualModel;
|
||||||
|
|
||||||
const response = await this.client.send(command);
|
const response = await this.client.send(command);
|
||||||
if (response.body)
|
if (response.body)
|
||||||
return streamConverter(response.body, (response) => {
|
return streamConverter(response.body, (response) => {
|
||||||
@@ -557,6 +559,8 @@ export class Bedrock extends ToolCallLLM<BedrockAdditionalChatOptions> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const command = new InvokeModelCommand(input);
|
const command = new InvokeModelCommand(input);
|
||||||
|
command.input.modelId = this.actualModel;
|
||||||
|
|
||||||
const response = await this.client.send(command);
|
const response = await this.client.send(command);
|
||||||
return {
|
return {
|
||||||
text: this.provider.getTextFromResponse(response),
|
text: this.provider.getTextFromResponse(response),
|
||||||
|
|||||||
@@ -1,5 +1,27 @@
|
|||||||
# @llamaindex/clip
|
# @llamaindex/clip
|
||||||
|
|
||||||
|
## 0.0.73
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
|
||||||
|
## 0.0.72
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
|
||||||
|
## 0.0.71
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
|
||||||
## 0.0.70
|
## 0.0.70
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/clip",
|
"name": "@llamaindex/clip",
|
||||||
"description": "Clip Embedding Adapter for LlamaIndex",
|
"description": "Clip Embedding Adapter for LlamaIndex",
|
||||||
"version": "0.0.70",
|
"version": "0.0.73",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"main": "dist/index.cjs",
|
"main": "dist/index.cjs",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/cohere
|
# @llamaindex/cohere
|
||||||
|
|
||||||
|
## 0.0.34
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 0.0.33
|
## 0.0.33
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/cohere",
|
"name": "@llamaindex/cohere",
|
||||||
"description": "Cohere Adapter for LlamaIndex",
|
"description": "Cohere Adapter for LlamaIndex",
|
||||||
"version": "0.0.33",
|
"version": "0.0.34",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,27 @@
|
|||||||
# @llamaindex/deepinfra
|
# @llamaindex/deepinfra
|
||||||
|
|
||||||
|
## 0.0.73
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
|
||||||
|
## 0.0.72
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
|
||||||
|
## 0.0.71
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
|
||||||
## 0.0.70
|
## 0.0.70
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/deepinfra",
|
"name": "@llamaindex/deepinfra",
|
||||||
"description": "Deepinfra Adapter for LlamaIndex",
|
"description": "Deepinfra Adapter for LlamaIndex",
|
||||||
"version": "0.0.70",
|
"version": "0.0.73",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,31 @@
|
|||||||
# @llamaindex/deepseek
|
# @llamaindex/deepseek
|
||||||
|
|
||||||
|
## 0.0.35
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
|
||||||
|
## 0.0.34
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
|
||||||
|
## 0.0.33
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
|
||||||
|
## 0.0.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 971d37c: fix: contextwindow metadata
|
||||||
|
|
||||||
## 0.0.31
|
## 0.0.31
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/deepseek",
|
"name": "@llamaindex/deepseek",
|
||||||
"description": "DeepSeek Adapter for LlamaIndex",
|
"description": "DeepSeek Adapter for LlamaIndex",
|
||||||
"version": "0.0.31",
|
"version": "0.0.35",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { OpenAI } from "@llamaindex/openai";
|
|||||||
export const DEEPSEEK_MODELS = {
|
export const DEEPSEEK_MODELS = {
|
||||||
"deepseek-coder": { contextWindow: 128000 },
|
"deepseek-coder": { contextWindow: 128000 },
|
||||||
"deepseek-chat": { contextWindow: 128000 },
|
"deepseek-chat": { contextWindow: 128000 },
|
||||||
};
|
} as const;
|
||||||
|
|
||||||
type DeepSeekModelName = keyof typeof DEEPSEEK_MODELS;
|
type DeepSeekModelName = keyof typeof DEEPSEEK_MODELS;
|
||||||
const DEFAULT_MODEL: DeepSeekModelName = "deepseek-coder";
|
const DEFAULT_MODEL: DeepSeekModelName = "deepseek-coder";
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/discord
|
# @llamaindex/discord
|
||||||
|
|
||||||
|
## 0.1.19
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 0.1.18
|
## 0.1.18
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/discord",
|
"name": "@llamaindex/discord",
|
||||||
"description": "Discord Reader for LlamaIndex",
|
"description": "Discord Reader for LlamaIndex",
|
||||||
"version": "0.1.18",
|
"version": "0.1.19",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"main": "dist/index.cjs",
|
"main": "dist/index.cjs",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/excel
|
# @llamaindex/excel
|
||||||
|
|
||||||
|
## 0.1.20
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 0.1.19
|
## 0.1.19
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/excel",
|
"name": "@llamaindex/excel",
|
||||||
"description": "Excel Reader for LlamaIndex",
|
"description": "Excel Reader for LlamaIndex",
|
||||||
"version": "0.1.19",
|
"version": "0.1.20",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"main": "dist/index.cjs",
|
"main": "dist/index.cjs",
|
||||||
|
|||||||
@@ -1,5 +1,25 @@
|
|||||||
# @llamaindex/fireworks
|
# @llamaindex/fireworks
|
||||||
|
|
||||||
|
## 0.0.33
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
|
||||||
|
## 0.0.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
|
||||||
|
## 0.0.31
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
|
||||||
## 0.0.30
|
## 0.0.30
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/fireworks",
|
"name": "@llamaindex/fireworks",
|
||||||
"description": "Fireworks Adapter for LlamaIndex",
|
"description": "Fireworks Adapter for LlamaIndex",
|
||||||
"version": "0.0.30",
|
"version": "0.0.33",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,18 @@
|
|||||||
# @llamaindex/google
|
# @llamaindex/google
|
||||||
|
|
||||||
|
## 0.3.20
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
|
## 0.3.19
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- c93bb02: chore: remove streaming logs
|
||||||
|
|
||||||
## 0.3.18
|
## 0.3.18
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/google",
|
"name": "@llamaindex/google",
|
||||||
"description": "Google Adapter for LlamaIndex",
|
"description": "Google Adapter for LlamaIndex",
|
||||||
"version": "0.3.18",
|
"version": "0.3.20",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -226,9 +226,6 @@ export class Gemini extends ToolCallLLM<GeminiAdditionalChatOptions> {
|
|||||||
const config = this.prepareChatConfig(params);
|
const config = this.prepareChatConfig(params);
|
||||||
const { message, history } = await this.prepareChatContext(params.messages);
|
const { message, history } = await this.prepareChatContext(params.messages);
|
||||||
|
|
||||||
console.log("history", JSON.stringify(history, null, 2));
|
|
||||||
console.log("message", JSON.stringify(message, null, 2));
|
|
||||||
|
|
||||||
const chat = this.client.chats.create({
|
const chat = this.client.chats.create({
|
||||||
model: this.model,
|
model: this.model,
|
||||||
config,
|
config,
|
||||||
|
|||||||
@@ -1,5 +1,25 @@
|
|||||||
# @llamaindex/groq
|
# @llamaindex/groq
|
||||||
|
|
||||||
|
## 0.0.89
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
|
||||||
|
## 0.0.88
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
|
||||||
|
## 0.0.87
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
|
||||||
## 0.0.86
|
## 0.0.86
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/groq",
|
"name": "@llamaindex/groq",
|
||||||
"description": "Groq Adapter for LlamaIndex",
|
"description": "Groq Adapter for LlamaIndex",
|
||||||
"version": "0.0.86",
|
"version": "0.0.89",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,27 @@
|
|||||||
# @llamaindex/huggingface
|
# @llamaindex/huggingface
|
||||||
|
|
||||||
|
## 0.1.27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
|
||||||
|
## 0.1.26
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
|
||||||
|
## 0.1.25
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
|
||||||
## 0.1.24
|
## 0.1.24
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/huggingface",
|
"name": "@llamaindex/huggingface",
|
||||||
"description": "Huggingface Adapter for LlamaIndex",
|
"description": "Huggingface Adapter for LlamaIndex",
|
||||||
"version": "0.1.24",
|
"version": "0.1.27",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"main": "dist/index.cjs",
|
"main": "dist/index.cjs",
|
||||||
|
|||||||
@@ -1,5 +1,27 @@
|
|||||||
# @llamaindex/jinaai
|
# @llamaindex/jinaai
|
||||||
|
|
||||||
|
## 0.0.33
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
|
||||||
|
## 0.0.32
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
|
||||||
|
## 0.0.31
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
|
||||||
## 0.0.30
|
## 0.0.30
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/jinaai",
|
"name": "@llamaindex/jinaai",
|
||||||
"description": "JinaAI Adapter for LlamaIndex",
|
"description": "JinaAI Adapter for LlamaIndex",
|
||||||
"version": "0.0.30",
|
"version": "0.0.33",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/mistral
|
# @llamaindex/mistral
|
||||||
|
|
||||||
|
## 0.1.20
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 0.1.19
|
## 0.1.19
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/mistral",
|
"name": "@llamaindex/mistral",
|
||||||
"description": "Mistral Adapter for LlamaIndex",
|
"description": "Mistral Adapter for LlamaIndex",
|
||||||
"version": "0.1.19",
|
"version": "0.1.20",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/mixedbread
|
# @llamaindex/mixedbread
|
||||||
|
|
||||||
|
## 0.0.34
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 0.0.33
|
## 0.0.33
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/mixedbread",
|
"name": "@llamaindex/mixedbread",
|
||||||
"description": "Mixedbread Adapter for LlamaIndex",
|
"description": "Mixedbread Adapter for LlamaIndex",
|
||||||
"version": "0.0.33",
|
"version": "0.0.34",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/notion
|
# @llamaindex/notion
|
||||||
|
|
||||||
|
## 0.1.19
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 0.1.18
|
## 0.1.18
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/notion",
|
"name": "@llamaindex/notion",
|
||||||
"description": "Notion Reader for LlamaIndex",
|
"description": "Notion Reader for LlamaIndex",
|
||||||
"version": "0.1.18",
|
"version": "0.1.19",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"main": "dist/index.cjs",
|
"main": "dist/index.cjs",
|
||||||
|
|||||||
@@ -1,5 +1,18 @@
|
|||||||
# @llamaindex/ollama
|
# @llamaindex/ollama
|
||||||
|
|
||||||
|
## 0.1.21
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
|
## 0.1.20
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 47a6f5f: chore: bump ollama package to support gpt-oss
|
||||||
|
|
||||||
## 0.1.19
|
## 0.1.19
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/ollama",
|
"name": "@llamaindex/ollama",
|
||||||
"description": "Ollama Adapter for LlamaIndex",
|
"description": "Ollama Adapter for LlamaIndex",
|
||||||
"version": "0.1.19",
|
"version": "0.1.21",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
"@llamaindex/env": "workspace:*"
|
"@llamaindex/env": "workspace:*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ollama": "^0.5.10",
|
"ollama": "^0.5.16",
|
||||||
"remeda": "^2.17.3"
|
"remeda": "^2.17.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
# @llamaindex/openai
|
# @llamaindex/openai
|
||||||
|
|
||||||
|
## 0.4.17
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
|
## 0.4.16
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 4c70376: Add gpt-5 support
|
||||||
|
|
||||||
|
## 0.4.15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- b6409b6: chore: bump openai version
|
||||||
|
|
||||||
## 0.4.14
|
## 0.4.14
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/openai",
|
"name": "@llamaindex/openai",
|
||||||
"description": "OpenAI Adapter for LlamaIndex",
|
"description": "OpenAI Adapter for LlamaIndex",
|
||||||
"version": "0.4.14",
|
"version": "0.4.17",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -40,6 +40,6 @@
|
|||||||
"@llamaindex/env": "workspace:*"
|
"@llamaindex/env": "workspace:*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"openai": "^4.102.0"
|
"openai": "^5.12.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,6 +248,7 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
|
|||||||
|
|
||||||
private isResponseOutputTextAnnotationAddedEvent(
|
private isResponseOutputTextAnnotationAddedEvent(
|
||||||
event: OpenAILLM.Responses.ResponseStreamEvent,
|
event: OpenAILLM.Responses.ResponseStreamEvent,
|
||||||
|
// @ts-expect-error type is broken
|
||||||
): event is OpenAILLM.Responses.ResponseTextAnnotationDeltaEvent {
|
): event is OpenAILLM.Responses.ResponseTextAnnotationDeltaEvent {
|
||||||
return event.type === "response.output_text.annotation.added";
|
return event.type === "response.output_text.annotation.added";
|
||||||
}
|
}
|
||||||
@@ -304,6 +305,7 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
|
|||||||
outputContent += part.text;
|
outputContent += part.text;
|
||||||
}
|
}
|
||||||
if (this.isAnnotationPresent(part)) {
|
if (this.isAnnotationPresent(part)) {
|
||||||
|
// @ts-expect-error type is broken
|
||||||
options.annotations = part.annotations;
|
options.annotations = part.annotations;
|
||||||
}
|
}
|
||||||
if (this.isRefusalPresent(part)) {
|
if (this.isRefusalPresent(part)) {
|
||||||
@@ -456,6 +458,7 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private handleOutputTextAnnotationAddedEvent(
|
private handleOutputTextAnnotationAddedEvent(
|
||||||
|
// @ts-expect-error type is broken
|
||||||
event: OpenAILLM.Responses.ResponseTextAnnotationDeltaEvent,
|
event: OpenAILLM.Responses.ResponseTextAnnotationDeltaEvent,
|
||||||
streamState: StreamState,
|
streamState: StreamState,
|
||||||
) {
|
) {
|
||||||
@@ -580,7 +583,10 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
|
|||||||
delete baseRequestParams.tools;
|
delete baseRequestParams.tools;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isTemperatureSupported(baseRequestParams.model))
|
if (
|
||||||
|
baseRequestParams.model &&
|
||||||
|
!isTemperatureSupported(baseRequestParams.model)
|
||||||
|
)
|
||||||
delete baseRequestParams.temperature;
|
delete baseRequestParams.temperature;
|
||||||
|
|
||||||
if (stream) {
|
if (stream) {
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ export const GPT4_MODELS = {
|
|||||||
"gpt-4o-audio-preview-2024-10-01": {
|
"gpt-4o-audio-preview-2024-10-01": {
|
||||||
contextWindow: 128000,
|
contextWindow: 128000,
|
||||||
},
|
},
|
||||||
|
"gpt-4o-audio-preview-2025-06-03": {
|
||||||
|
contextWindow: 128000,
|
||||||
|
},
|
||||||
"gpt-4o-2024-11-20": {
|
"gpt-4o-2024-11-20": {
|
||||||
contextWindow: 128000,
|
contextWindow: 128000,
|
||||||
},
|
},
|
||||||
@@ -128,6 +131,27 @@ export const O4_MODELS = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const GPT5_MODELS = {
|
||||||
|
"gpt-5": {
|
||||||
|
contextWindow: 400000,
|
||||||
|
},
|
||||||
|
"gpt-5-2025-08-07": {
|
||||||
|
contextWindow: 400000,
|
||||||
|
},
|
||||||
|
"gpt-5-mini": {
|
||||||
|
contextWindow: 400000,
|
||||||
|
},
|
||||||
|
"gpt-5-mini-2025-08-07": {
|
||||||
|
contextWindow: 400000,
|
||||||
|
},
|
||||||
|
"gpt-5-nano": {
|
||||||
|
contextWindow: 400000,
|
||||||
|
},
|
||||||
|
"gpt-5-nano-2025-08-07": {
|
||||||
|
contextWindow: 400000,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We currently support GPT-3.5 and GPT-4 models
|
* We currently support GPT-3.5 and GPT-4 models
|
||||||
*/
|
*/
|
||||||
@@ -137,6 +161,7 @@ export const ALL_AVAILABLE_OPENAI_MODELS = {
|
|||||||
...O1_MODELS,
|
...O1_MODELS,
|
||||||
...O3_MODELS,
|
...O3_MODELS,
|
||||||
...O4_MODELS,
|
...O4_MODELS,
|
||||||
|
...GPT5_MODELS,
|
||||||
"codex-mini-latest": { contextWindow: 200000 },
|
"codex-mini-latest": { contextWindow: 200000 },
|
||||||
} satisfies Record<ChatModel, { contextWindow: number }>;
|
} satisfies Record<ChatModel, { contextWindow: number }>;
|
||||||
|
|
||||||
@@ -158,7 +183,8 @@ export function isReasoningModel(model: ChatModel | string): boolean {
|
|||||||
const isO1 = model.startsWith("o1");
|
const isO1 = model.startsWith("o1");
|
||||||
const isO3 = model.startsWith("o3");
|
const isO3 = model.startsWith("o3");
|
||||||
const isO4 = model.startsWith("o4");
|
const isO4 = model.startsWith("o4");
|
||||||
return isO1 || isO3 || isO4;
|
const isGPT5 = model.startsWith("gpt-5");
|
||||||
|
return isO1 || isO3 || isO4 || isGPT5;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isTemperatureSupported(model: ChatModel | string): boolean {
|
export function isTemperatureSupported(model: ChatModel | string): boolean {
|
||||||
|
|||||||
@@ -1,5 +1,27 @@
|
|||||||
# @llamaindex/perplexity
|
# @llamaindex/perplexity
|
||||||
|
|
||||||
|
## 0.0.30
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
- @llamaindex/openai@0.4.17
|
||||||
|
|
||||||
|
## 0.0.29
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [4c70376]
|
||||||
|
- @llamaindex/openai@0.4.16
|
||||||
|
|
||||||
|
## 0.0.28
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [b6409b6]
|
||||||
|
- @llamaindex/openai@0.4.15
|
||||||
|
|
||||||
## 0.0.27
|
## 0.0.27
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/perplexity",
|
"name": "@llamaindex/perplexity",
|
||||||
"description": "Perplexity Adapter for LlamaIndex",
|
"description": "Perplexity Adapter for LlamaIndex",
|
||||||
"version": "0.0.27",
|
"version": "0.0.30",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @llamaindex/portkey-ai
|
# @llamaindex/portkey-ai
|
||||||
|
|
||||||
|
## 0.0.62
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [0267bb0]
|
||||||
|
- @llamaindex/core@0.6.20
|
||||||
|
|
||||||
## 0.0.61
|
## 0.0.61
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@llamaindex/portkey-ai",
|
"name": "@llamaindex/portkey-ai",
|
||||||
"description": "Portkey Adapter for LlamaIndex",
|
"description": "Portkey Adapter for LlamaIndex",
|
||||||
"version": "0.0.61",
|
"version": "0.0.62",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.cjs",
|
"main": "./dist/index.cjs",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user