mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-01 22:14:03 -04:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97c00d67c3 | |||
| 6ebd7c2f13 | |||
| 0267bb0e8e | |||
| 7875ee91e6 | |||
| e3405fca44 | |||
| f3bc2b61e7 | |||
| 4c703767b7 | |||
| a27648200d | |||
| c93bb02002 |
@@ -1,5 +1,25 @@
|
||||
# @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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/doc",
|
||||
"version": "0.2.50",
|
||||
"version": "0.2.52",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"postinstall": "fumadocs-mdx",
|
||||
@@ -15,7 +15,7 @@
|
||||
"dependencies": {
|
||||
"@huggingface/transformers": "^3.5.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/core": "workspace:*",
|
||||
"@llamaindex/node-parser": "workspace:*",
|
||||
|
||||
@@ -93,4 +93,4 @@ async function main() {
|
||||
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,11 @@
|
||||
# @llamaindex/cloudflare-worker-agent-test
|
||||
|
||||
## 0.0.188
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- llamaindex@0.11.27
|
||||
|
||||
## 0.0.187
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/cloudflare-worker-agent-test",
|
||||
"version": "0.0.187",
|
||||
"version": "0.0.188",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @llamaindex/llama-parse-browser-test
|
||||
|
||||
## 0.0.86
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @llamaindex/cloud@4.1.2
|
||||
|
||||
## 0.0.85
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/llama-parse-browser-test",
|
||||
"private": true,
|
||||
"version": "0.0.85",
|
||||
"version": "0.0.86",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @llamaindex/next-agent-test
|
||||
|
||||
## 0.1.188
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- llamaindex@0.11.27
|
||||
|
||||
## 0.1.187
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/next-agent-test",
|
||||
"version": "0.1.187",
|
||||
"version": "0.1.188",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# test-edge-runtime
|
||||
|
||||
## 0.1.187
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- llamaindex@0.11.27
|
||||
|
||||
## 0.1.186
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/nextjs-edge-runtime-test",
|
||||
"version": "0.1.186",
|
||||
"version": "0.1.187",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/next-node-runtime-test",
|
||||
"version": "0.1.57",
|
||||
"version": "0.1.59",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# vite-import-llamaindex
|
||||
|
||||
## 0.0.54
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- llamaindex@0.11.27
|
||||
|
||||
## 0.0.53
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "vite-import-llamaindex",
|
||||
"private": true,
|
||||
"version": "0.0.53",
|
||||
"version": "0.0.54",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @llamaindex/waku-query-engine-test
|
||||
|
||||
## 0.0.188
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- llamaindex@0.11.27
|
||||
|
||||
## 0.0.187
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/waku-query-engine-test",
|
||||
"version": "0.0.187",
|
||||
"version": "0.0.188",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,76 @@
|
||||
# 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
|
||||
|
||||
@@ -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);
|
||||
+47
-47
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/examples",
|
||||
"version": "0.3.37",
|
||||
"version": "0.3.39",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
@@ -11,52 +11,52 @@
|
||||
"@azure/cosmos": "^4.1.1",
|
||||
"@azure/identity": "^4.4.1",
|
||||
"@azure/search-documents": "^12.1.0",
|
||||
"@llamaindex/anthropic": "^0.3.22",
|
||||
"@llamaindex/assemblyai": "^0.1.18",
|
||||
"@llamaindex/astra": "^0.0.33",
|
||||
"@llamaindex/azure": "^0.1.32",
|
||||
"@llamaindex/bm25-retriever": "^0.0.8",
|
||||
"@llamaindex/chroma": "^0.0.33",
|
||||
"@llamaindex/clip": "^0.0.71",
|
||||
"@llamaindex/cloud": "^4.1.1",
|
||||
"@llamaindex/cohere": "^0.0.33",
|
||||
"@llamaindex/core": "^0.6.19",
|
||||
"@llamaindex/deepinfra": "^0.0.71",
|
||||
"@llamaindex/deepseek": "^0.0.33",
|
||||
"@llamaindex/discord": "^0.1.18",
|
||||
"@llamaindex/elastic-search": "^0.1.19",
|
||||
"@llamaindex/anthropic": "^0.3.23",
|
||||
"@llamaindex/assemblyai": "^0.1.19",
|
||||
"@llamaindex/astra": "^0.0.34",
|
||||
"@llamaindex/azure": "^0.1.34",
|
||||
"@llamaindex/bm25-retriever": "^0.0.9",
|
||||
"@llamaindex/chroma": "^0.0.34",
|
||||
"@llamaindex/clip": "^0.0.73",
|
||||
"@llamaindex/cloud": "^4.1.2",
|
||||
"@llamaindex/cohere": "^0.0.34",
|
||||
"@llamaindex/core": "^0.6.20",
|
||||
"@llamaindex/deepinfra": "^0.0.73",
|
||||
"@llamaindex/deepseek": "^0.0.35",
|
||||
"@llamaindex/discord": "^0.1.19",
|
||||
"@llamaindex/elastic-search": "^0.1.20",
|
||||
"@llamaindex/env": "^0.1.30",
|
||||
"@llamaindex/firestore": "^1.0.26",
|
||||
"@llamaindex/fireworks": "^0.0.31",
|
||||
"@llamaindex/google": "^0.3.18",
|
||||
"@llamaindex/groq": "^0.0.87",
|
||||
"@llamaindex/huggingface": "^0.1.25",
|
||||
"@llamaindex/jinaai": "^0.0.31",
|
||||
"@llamaindex/milvus": "^0.1.28",
|
||||
"@llamaindex/mistral": "^0.1.19",
|
||||
"@llamaindex/mixedbread": "^0.0.33",
|
||||
"@llamaindex/mongodb": "^0.0.34",
|
||||
"@llamaindex/node-parser": "^2.0.19",
|
||||
"@llamaindex/notion": "^0.1.18",
|
||||
"@llamaindex/ollama": "^0.1.20",
|
||||
"@llamaindex/openai": "^0.4.15",
|
||||
"@llamaindex/perplexity": "^0.0.28",
|
||||
"@llamaindex/pinecone": "^0.1.19",
|
||||
"@llamaindex/portkey-ai": "^0.0.61",
|
||||
"@llamaindex/postgres": "^0.0.62",
|
||||
"@llamaindex/qdrant": "^0.1.29",
|
||||
"@llamaindex/readers": "^3.1.18",
|
||||
"@llamaindex/replicate": "^0.0.61",
|
||||
"@llamaindex/supabase": "^0.1.20",
|
||||
"@llamaindex/together": "^0.0.31",
|
||||
"@llamaindex/tools": "^0.1.9",
|
||||
"@llamaindex/upstash": "^0.0.33",
|
||||
"@llamaindex/vercel": "^0.1.19",
|
||||
"@llamaindex/vllm": "^0.0.57",
|
||||
"@llamaindex/voyage-ai": "^1.0.25",
|
||||
"@llamaindex/weaviate": "^0.0.34",
|
||||
"@llamaindex/workflow": "^1.1.20",
|
||||
"@llamaindex/xai": "^0.0.18",
|
||||
"@llamaindex/firestore": "^1.0.27",
|
||||
"@llamaindex/fireworks": "^0.0.33",
|
||||
"@llamaindex/google": "^0.3.20",
|
||||
"@llamaindex/groq": "^0.0.89",
|
||||
"@llamaindex/huggingface": "^0.1.27",
|
||||
"@llamaindex/jinaai": "^0.0.33",
|
||||
"@llamaindex/milvus": "^0.1.29",
|
||||
"@llamaindex/mistral": "^0.1.20",
|
||||
"@llamaindex/mixedbread": "^0.0.34",
|
||||
"@llamaindex/mongodb": "^0.0.35",
|
||||
"@llamaindex/node-parser": "^2.0.20",
|
||||
"@llamaindex/notion": "^0.1.19",
|
||||
"@llamaindex/ollama": "^0.1.21",
|
||||
"@llamaindex/openai": "^0.4.17",
|
||||
"@llamaindex/perplexity": "^0.0.30",
|
||||
"@llamaindex/pinecone": "^0.1.20",
|
||||
"@llamaindex/portkey-ai": "^0.0.62",
|
||||
"@llamaindex/postgres": "^0.0.63",
|
||||
"@llamaindex/qdrant": "^0.1.30",
|
||||
"@llamaindex/readers": "^3.1.19",
|
||||
"@llamaindex/replicate": "^0.0.62",
|
||||
"@llamaindex/supabase": "^0.1.21",
|
||||
"@llamaindex/together": "^0.0.33",
|
||||
"@llamaindex/tools": "^0.1.10",
|
||||
"@llamaindex/upstash": "^0.0.34",
|
||||
"@llamaindex/vercel": "^0.1.20",
|
||||
"@llamaindex/vllm": "^0.0.59",
|
||||
"@llamaindex/voyage-ai": "^1.0.26",
|
||||
"@llamaindex/weaviate": "^0.0.35",
|
||||
"@llamaindex/workflow": "^1.1.21",
|
||||
"@llamaindex/xai": "^0.0.20",
|
||||
"@notionhq/client": "^4.0.0",
|
||||
"@pinecone-database/pinecone": "^4.0.0",
|
||||
"@vercel/postgres": "^0.10.0",
|
||||
@@ -65,7 +65,7 @@
|
||||
"commander": "^12.1.0",
|
||||
"dotenv": "^17.2.0",
|
||||
"js-tiktoken": "^1.0.14",
|
||||
"llamaindex": "^0.11.26",
|
||||
"llamaindex": "^0.11.27",
|
||||
"mongodb": "6.7.0",
|
||||
"postgres": "^3.4.4",
|
||||
"wikipedia": "^2.1.2",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @llamaindex/autotool
|
||||
|
||||
## 8.0.27
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- llamaindex@0.11.27
|
||||
|
||||
## 8.0.26
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/autotool-01-node-example
|
||||
|
||||
## 0.0.135
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- llamaindex@0.11.27
|
||||
- @llamaindex/autotool@8.0.27
|
||||
|
||||
## 0.0.134
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -13,5 +13,5 @@
|
||||
"scripts": {
|
||||
"start": "node --import tsx --import @llamaindex/autotool/node ./src/index.ts"
|
||||
},
|
||||
"version": "0.0.134"
|
||||
"version": "0.0.135"
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"url": "git+https://github.com/run-llama/LlamaIndexTS.git",
|
||||
"directory": "packages/autotool"
|
||||
},
|
||||
"version": "8.0.26",
|
||||
"version": "8.0.27",
|
||||
"description": "auto transpile your JS function to LLM Agent compatible",
|
||||
"files": [
|
||||
"dist",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/cloud
|
||||
|
||||
## 4.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 4.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/cloud",
|
||||
"version": "4.1.1",
|
||||
"version": "4.1.2",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @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
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/community",
|
||||
"description": "Community package for LlamaIndexTS",
|
||||
"version": "0.0.101",
|
||||
"version": "0.0.102",
|
||||
"type": "module",
|
||||
"types": "dist/type/index.d.ts",
|
||||
"main": "dist/cjs/index.js",
|
||||
|
||||
@@ -493,6 +493,8 @@ export class Bedrock extends ToolCallLLM<BedrockAdditionalChatOptions> {
|
||||
|
||||
if (params.stream) {
|
||||
const command = new InvokeModelWithResponseStreamCommand(input);
|
||||
command.input.modelId = this.actualModel;
|
||||
|
||||
const response = await this.client.send(command);
|
||||
if (response.body)
|
||||
return streamConverter(response.body, (response) => {
|
||||
@@ -504,6 +506,8 @@ export class Bedrock extends ToolCallLLM<BedrockAdditionalChatOptions> {
|
||||
}
|
||||
|
||||
const command = new InvokeModelCommand(input);
|
||||
command.input.modelId = this.actualModel;
|
||||
|
||||
const response = await this.client.send(command);
|
||||
return {
|
||||
text: this.provider.getTextFromResponse(response),
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @llamaindex/core
|
||||
|
||||
## 0.6.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0267bb0: Added responseFormat to llm.exec
|
||||
|
||||
## 0.6.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/core",
|
||||
"type": "module",
|
||||
"version": "0.6.19",
|
||||
"version": "0.6.20",
|
||||
"description": "LlamaIndex Core Module",
|
||||
"exports": {
|
||||
"./agent": {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { emptyLogger } from "@llamaindex/env";
|
||||
import type { JSONObject } from "../global";
|
||||
import { tool } from "../tools/";
|
||||
import { extractText } from "../utils/llms";
|
||||
import { streamConverter } from "../utils/stream";
|
||||
import { callToolToMessage, getToolCallsFromResponse } from "./tool-call";
|
||||
@@ -18,6 +20,7 @@ import type {
|
||||
PartialToolCall,
|
||||
ToolCallLLMMessageOptions,
|
||||
} from "./type";
|
||||
import { isZodSchema } from "./utils";
|
||||
|
||||
export abstract class BaseLLM<
|
||||
AdditionalChatOptions extends object = object,
|
||||
@@ -97,6 +100,31 @@ export abstract class BaseLLM<
|
||||
| ExecResponse<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) {
|
||||
return this.streamExec(params);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { z } from "zod";
|
||||
import type {
|
||||
ChatMessage,
|
||||
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 type { JSONValue } from "../global";
|
||||
import type { BaseTool, ToolMetadata } from "../llms";
|
||||
import { isZodSchema } from "../llms/utils";
|
||||
|
||||
export class FunctionTool<
|
||||
T,
|
||||
@@ -94,7 +95,7 @@ export class FunctionTool<
|
||||
) {
|
||||
const { execute, parameters, ...restConfig } = fnOrConfig;
|
||||
|
||||
if (parameters instanceof z.ZodSchema) {
|
||||
if (isZodSchema(parameters)) {
|
||||
const jsonSchema = zodToJsonSchema(parameters);
|
||||
return new FunctionTool(
|
||||
execute,
|
||||
@@ -105,7 +106,6 @@ export class FunctionTool<
|
||||
parameters,
|
||||
);
|
||||
}
|
||||
|
||||
return new FunctionTool(execute, fnOrConfig);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @llamaindex/experimental
|
||||
|
||||
## 0.0.204
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- llamaindex@0.11.27
|
||||
|
||||
## 0.0.203
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/experimental",
|
||||
"description": "Experimental package for LlamaIndexTS",
|
||||
"version": "0.0.203",
|
||||
"version": "0.0.204",
|
||||
"type": "module",
|
||||
"types": "dist/type/index.d.ts",
|
||||
"main": "dist/cjs/index.js",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "llamaindex",
|
||||
"version": "0.11.26",
|
||||
"version": "0.11.27",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/llamaindex-test",
|
||||
"private": true,
|
||||
"version": "0.1.16",
|
||||
"version": "0.1.18",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "vitest run"
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/node-parser
|
||||
|
||||
## 2.0.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 2.0.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/node-parser",
|
||||
"version": "2.0.19",
|
||||
"version": "2.0.20",
|
||||
"description": "Node parser for LlamaIndex",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/anthropic
|
||||
|
||||
## 0.3.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.3.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/anthropic",
|
||||
"description": "Anthropic Adapter for LlamaIndex",
|
||||
"version": "0.3.22",
|
||||
"version": "0.3.23",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/assemblyai
|
||||
|
||||
## 0.1.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.1.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/assemblyai",
|
||||
"description": "AssemblyAI Reader for LlamaIndex",
|
||||
"version": "0.1.18",
|
||||
"version": "0.1.19",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.cjs",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/community
|
||||
|
||||
## 0.0.116
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.0.115
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/aws",
|
||||
"description": "AWS package for LlamaIndexTS",
|
||||
"version": "0.0.115",
|
||||
"version": "0.0.116",
|
||||
"type": "module",
|
||||
"types": "dist/type/index.d.ts",
|
||||
"main": "dist/cjs/index.js",
|
||||
|
||||
@@ -546,6 +546,8 @@ export class Bedrock extends ToolCallLLM<BedrockAdditionalChatOptions> {
|
||||
|
||||
if (params.stream) {
|
||||
const command = new InvokeModelWithResponseStreamCommand(input);
|
||||
command.input.modelId = this.actualModel;
|
||||
|
||||
const response = await this.client.send(command);
|
||||
if (response.body)
|
||||
return streamConverter(response.body, (response) => {
|
||||
@@ -557,6 +559,8 @@ export class Bedrock extends ToolCallLLM<BedrockAdditionalChatOptions> {
|
||||
}
|
||||
|
||||
const command = new InvokeModelCommand(input);
|
||||
command.input.modelId = this.actualModel;
|
||||
|
||||
const response = await this.client.send(command);
|
||||
return {
|
||||
text: this.provider.getTextFromResponse(response),
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# @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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/clip",
|
||||
"description": "Clip Embedding Adapter for LlamaIndex",
|
||||
"version": "0.0.71",
|
||||
"version": "0.0.73",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.cjs",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/cohere
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/cohere",
|
||||
"description": "Cohere Adapter for LlamaIndex",
|
||||
"version": "0.0.33",
|
||||
"version": "0.0.34",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# @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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/deepinfra",
|
||||
"description": "Deepinfra Adapter for LlamaIndex",
|
||||
"version": "0.0.71",
|
||||
"version": "0.0.73",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/deepseek",
|
||||
"description": "DeepSeek Adapter for LlamaIndex",
|
||||
"version": "0.0.33",
|
||||
"version": "0.0.35",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/discord
|
||||
|
||||
## 0.1.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.1.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/discord",
|
||||
"description": "Discord Reader for LlamaIndex",
|
||||
"version": "0.1.18",
|
||||
"version": "0.1.19",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.cjs",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/excel
|
||||
|
||||
## 0.1.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.1.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/excel",
|
||||
"description": "Excel Reader for LlamaIndex",
|
||||
"version": "0.1.19",
|
||||
"version": "0.1.20",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.cjs",
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/fireworks",
|
||||
"description": "Fireworks Adapter for LlamaIndex",
|
||||
"version": "0.0.31",
|
||||
"version": "0.0.33",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @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
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/google",
|
||||
"description": "Google Adapter for LlamaIndex",
|
||||
"version": "0.3.18",
|
||||
"version": "0.3.20",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -226,9 +226,6 @@ export class Gemini extends ToolCallLLM<GeminiAdditionalChatOptions> {
|
||||
const config = this.prepareChatConfig(params);
|
||||
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({
|
||||
model: this.model,
|
||||
config,
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/groq",
|
||||
"description": "Groq Adapter for LlamaIndex",
|
||||
"version": "0.0.87",
|
||||
"version": "0.0.89",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# @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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/huggingface",
|
||||
"description": "Huggingface Adapter for LlamaIndex",
|
||||
"version": "0.1.25",
|
||||
"version": "0.1.27",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.cjs",
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# @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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/jinaai",
|
||||
"description": "JinaAI Adapter for LlamaIndex",
|
||||
"version": "0.0.31",
|
||||
"version": "0.0.33",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/mistral
|
||||
|
||||
## 0.1.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.1.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/mistral",
|
||||
"description": "Mistral Adapter for LlamaIndex",
|
||||
"version": "0.1.19",
|
||||
"version": "0.1.20",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/mixedbread
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/mixedbread",
|
||||
"description": "Mixedbread Adapter for LlamaIndex",
|
||||
"version": "0.0.33",
|
||||
"version": "0.0.34",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/notion
|
||||
|
||||
## 0.1.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.1.18
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/notion",
|
||||
"description": "Notion Reader for LlamaIndex",
|
||||
"version": "0.1.18",
|
||||
"version": "0.1.19",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.cjs",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/ollama
|
||||
|
||||
## 0.1.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.1.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/ollama",
|
||||
"description": "Ollama Adapter for LlamaIndex",
|
||||
"version": "0.1.20",
|
||||
"version": "0.1.21",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/openai",
|
||||
"description": "OpenAI Adapter for LlamaIndex",
|
||||
"version": "0.4.15",
|
||||
"version": "0.4.17",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -131,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
|
||||
*/
|
||||
@@ -140,6 +161,7 @@ export const ALL_AVAILABLE_OPENAI_MODELS = {
|
||||
...O1_MODELS,
|
||||
...O3_MODELS,
|
||||
...O4_MODELS,
|
||||
...GPT5_MODELS,
|
||||
"codex-mini-latest": { contextWindow: 200000 },
|
||||
} satisfies Record<ChatModel, { contextWindow: number }>;
|
||||
|
||||
@@ -161,7 +183,8 @@ export function isReasoningModel(model: ChatModel | string): boolean {
|
||||
const isO1 = model.startsWith("o1");
|
||||
const isO3 = model.startsWith("o3");
|
||||
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 {
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# @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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/perplexity",
|
||||
"description": "Perplexity Adapter for LlamaIndex",
|
||||
"version": "0.0.28",
|
||||
"version": "0.0.30",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/portkey-ai
|
||||
|
||||
## 0.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.0.61
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/portkey-ai",
|
||||
"description": "Portkey Adapter for LlamaIndex",
|
||||
"version": "0.0.61",
|
||||
"version": "0.0.62",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/replicate
|
||||
|
||||
## 0.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.0.61
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/replicate",
|
||||
"description": "Replicate Adapter for LlamaIndex",
|
||||
"version": "0.0.61",
|
||||
"version": "0.0.62",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/bm25-retriever
|
||||
|
||||
## 0.0.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.0.8
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/bm25-retriever",
|
||||
"description": "BM25 Retriever for LlamaIndex",
|
||||
"version": "0.0.8",
|
||||
"version": "0.0.9",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/astra
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/astra",
|
||||
"description": "Astra Storage for LlamaIndex",
|
||||
"version": "0.0.33",
|
||||
"version": "0.0.34",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# @llamaindex/azure
|
||||
|
||||
## 0.1.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
- @llamaindex/openai@0.4.17
|
||||
|
||||
## 0.1.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [4c70376]
|
||||
- @llamaindex/openai@0.4.16
|
||||
|
||||
## 0.1.32
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/azure",
|
||||
"description": "Azure Storage for LlamaIndex",
|
||||
"version": "0.1.32",
|
||||
"version": "0.1.34",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/chroma
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/chroma",
|
||||
"description": "Chroma Storage for LlamaIndex",
|
||||
"version": "0.0.33",
|
||||
"version": "0.0.34",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/elastic-search
|
||||
|
||||
## 0.1.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0267bb0]
|
||||
- @llamaindex/core@0.6.20
|
||||
|
||||
## 0.1.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/elastic-search",
|
||||
"description": "Elastic Search Storage for LlamaIndex",
|
||||
"version": "0.1.19",
|
||||
"version": "0.1.20",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"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