mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-07 23:07:53 -04:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a57e52a9c8 | |||
| 1028877090 | |||
| ba42e3407c | |||
| 2bd1640f10 |
@@ -1,5 +1,11 @@
|
||||
# @llamaindex/next-node-runtime
|
||||
|
||||
## 0.1.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @llamaindex/huggingface@0.1.31
|
||||
|
||||
## 0.1.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/next-node-runtime-test",
|
||||
"version": "0.1.62",
|
||||
"version": "0.1.63",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"@size-limit/preset-big-lib": "^11.1.6",
|
||||
"size-limit": "^11.1.6",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.3.6"
|
||||
"vite": "^6.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"llamaindex": "workspace:*"
|
||||
|
||||
@@ -1,5 +1,24 @@
|
||||
# examples
|
||||
|
||||
## 0.3.43
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
- @llamaindex/clip@0.0.77
|
||||
- @llamaindex/deepinfra@0.0.77
|
||||
- @llamaindex/deepseek@0.0.39
|
||||
- @llamaindex/fireworks@0.0.37
|
||||
- @llamaindex/groq@0.0.93
|
||||
- @llamaindex/huggingface@0.1.31
|
||||
- @llamaindex/jinaai@0.0.37
|
||||
- @llamaindex/perplexity@0.0.34
|
||||
- @llamaindex/azure@0.1.38
|
||||
- @llamaindex/together@0.0.37
|
||||
- @llamaindex/vllm@0.0.63
|
||||
- @llamaindex/xai@0.0.24
|
||||
|
||||
## 0.3.42
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
"globals": "^16.0.0",
|
||||
"typescript": "~5.8.3",
|
||||
"typescript-eslint": "^8.36.0",
|
||||
"vite": "^6.3.5"
|
||||
"vite": "^6.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
+14
-14
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@llamaindex/examples",
|
||||
"version": "0.3.42",
|
||||
"version": "0.3.43",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
@@ -14,24 +14,24 @@
|
||||
"@llamaindex/anthropic": "^0.3.25",
|
||||
"@llamaindex/assemblyai": "^0.1.21",
|
||||
"@llamaindex/astra": "^0.0.36",
|
||||
"@llamaindex/azure": "^0.1.37",
|
||||
"@llamaindex/azure": "^0.1.38",
|
||||
"@llamaindex/bm25-retriever": "^0.0.11",
|
||||
"@llamaindex/chroma": "^0.0.36",
|
||||
"@llamaindex/clip": "^0.0.76",
|
||||
"@llamaindex/clip": "^0.0.77",
|
||||
"llama-cloud-services": "^0.3.5",
|
||||
"@llamaindex/cohere": "^0.0.36",
|
||||
"@llamaindex/core": "^0.6.22",
|
||||
"@llamaindex/deepinfra": "^0.0.76",
|
||||
"@llamaindex/deepseek": "^0.0.38",
|
||||
"@llamaindex/deepinfra": "^0.0.77",
|
||||
"@llamaindex/deepseek": "^0.0.39",
|
||||
"@llamaindex/discord": "^0.1.21",
|
||||
"@llamaindex/elastic-search": "^0.1.22",
|
||||
"@llamaindex/env": "^0.1.30",
|
||||
"@llamaindex/firestore": "^1.0.29",
|
||||
"@llamaindex/fireworks": "^0.0.36",
|
||||
"@llamaindex/fireworks": "^0.0.37",
|
||||
"@llamaindex/google": "^0.3.22",
|
||||
"@llamaindex/groq": "^0.0.92",
|
||||
"@llamaindex/huggingface": "^0.1.30",
|
||||
"@llamaindex/jinaai": "^0.0.36",
|
||||
"@llamaindex/groq": "^0.0.93",
|
||||
"@llamaindex/huggingface": "^0.1.31",
|
||||
"@llamaindex/jinaai": "^0.0.37",
|
||||
"@llamaindex/milvus": "^0.1.31",
|
||||
"@llamaindex/mistral": "^0.1.22",
|
||||
"@llamaindex/mixedbread": "^0.0.36",
|
||||
@@ -39,8 +39,8 @@
|
||||
"@llamaindex/node-parser": "^2.0.22",
|
||||
"@llamaindex/notion": "^0.1.21",
|
||||
"@llamaindex/ollama": "^0.1.23",
|
||||
"@llamaindex/openai": "^0.4.20",
|
||||
"@llamaindex/perplexity": "^0.0.33",
|
||||
"@llamaindex/openai": "^0.4.21",
|
||||
"@llamaindex/perplexity": "^0.0.34",
|
||||
"@llamaindex/pinecone": "^0.1.22",
|
||||
"@llamaindex/portkey-ai": "^0.0.64",
|
||||
"@llamaindex/postgres": "^0.0.65",
|
||||
@@ -48,15 +48,15 @@
|
||||
"@llamaindex/readers": "^3.1.21",
|
||||
"@llamaindex/replicate": "^0.0.64",
|
||||
"@llamaindex/supabase": "^0.1.23",
|
||||
"@llamaindex/together": "^0.0.36",
|
||||
"@llamaindex/together": "^0.0.37",
|
||||
"@llamaindex/tools": "^0.1.12",
|
||||
"@llamaindex/upstash": "^0.0.36",
|
||||
"@llamaindex/vercel": "^0.1.22",
|
||||
"@llamaindex/vllm": "^0.0.62",
|
||||
"@llamaindex/vllm": "^0.0.63",
|
||||
"@llamaindex/voyage-ai": "^1.0.28",
|
||||
"@llamaindex/weaviate": "^0.0.37",
|
||||
"@llamaindex/workflow": "^1.1.24",
|
||||
"@llamaindex/xai": "^0.0.23",
|
||||
"@llamaindex/xai": "^0.0.24",
|
||||
"@notionhq/client": "^4.0.0",
|
||||
"@pinecone-database/pinecone": "^4.0.0",
|
||||
"@vercel/postgres": "^0.10.0",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/core-test
|
||||
|
||||
## 0.1.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.1.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/llamaindex-test",
|
||||
"private": true,
|
||||
"version": "0.1.21",
|
||||
"version": "0.1.22",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "vitest run"
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/clip
|
||||
|
||||
## 0.0.77
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.0.76
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/clip",
|
||||
"description": "Clip Embedding Adapter for LlamaIndex",
|
||||
"version": "0.0.76",
|
||||
"version": "0.0.77",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.cjs",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/deepinfra
|
||||
|
||||
## 0.0.77
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.0.76
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/deepinfra",
|
||||
"description": "Deepinfra Adapter for LlamaIndex",
|
||||
"version": "0.0.76",
|
||||
"version": "0.0.77",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/deepseek
|
||||
|
||||
## 0.0.39
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.0.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/deepseek",
|
||||
"description": "DeepSeek Adapter for LlamaIndex",
|
||||
"version": "0.0.38",
|
||||
"version": "0.0.39",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/fireworks
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/fireworks",
|
||||
"description": "Fireworks Adapter for LlamaIndex",
|
||||
"version": "0.0.36",
|
||||
"version": "0.0.37",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/groq
|
||||
|
||||
## 0.0.93
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.0.92
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/groq",
|
||||
"description": "Groq Adapter for LlamaIndex",
|
||||
"version": "0.0.92",
|
||||
"version": "0.0.93",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/huggingface
|
||||
|
||||
## 0.1.31
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.1.30
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/huggingface",
|
||||
"description": "Huggingface Adapter for LlamaIndex",
|
||||
"version": "0.1.30",
|
||||
"version": "0.1.31",
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
"main": "dist/index.cjs",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/jinaai
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/jinaai",
|
||||
"description": "JinaAI Adapter for LlamaIndex",
|
||||
"version": "0.0.36",
|
||||
"version": "0.0.37",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @llamaindex/openai
|
||||
|
||||
## 0.4.21
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 1028877: Fix support for reasoning effort, and add support for reasoning summary
|
||||
|
||||
## 0.4.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/openai",
|
||||
"description": "OpenAI Adapter for LlamaIndex",
|
||||
"version": "0.4.20",
|
||||
"version": "0.4.21",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -53,6 +53,7 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
|
||||
maxOutputTokens?: number | undefined;
|
||||
additionalChatOptions?: OpenAIResponsesChatOptions | undefined;
|
||||
reasoningEffort?: "low" | "medium" | "high" | undefined;
|
||||
reasoningSummary?: "auto" | "concise" | "detailed" | undefined;
|
||||
apiKey?: string | undefined;
|
||||
baseURL?: string | undefined;
|
||||
maxRetries: number;
|
||||
@@ -86,6 +87,9 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
|
||||
? init?.reasoningEffort
|
||||
: undefined;
|
||||
|
||||
this.reasoningSummary = isReasoningModel(this.model)
|
||||
? init?.reasoningSummary
|
||||
: undefined;
|
||||
this.topP = init?.topP ?? 1;
|
||||
this.maxOutputTokens = init?.maxOutputTokens ?? undefined;
|
||||
this.maxRetries = init?.maxRetries ?? 10;
|
||||
@@ -515,6 +519,10 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
|
||||
|
||||
const baseRequestParams = <OpenAILLM.Responses.ResponseCreateParams>{
|
||||
model: this.model,
|
||||
reasoning: {
|
||||
effort: this.reasoningEffort,
|
||||
summary: this.reasoningSummary,
|
||||
},
|
||||
include: this.include,
|
||||
input: this.toOpenAIResponseMessages(messages),
|
||||
tools: processedBuiltInTools,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { BaseTool, ToolCallOptions } from "@llamaindex/core/llms";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { OpenAIResponses } from "../src/responses";
|
||||
import { LLMInstance } from "../src/utils";
|
||||
|
||||
const API_KEY = process.env.MY_OPENAI_API_KEY;
|
||||
|
||||
@@ -94,6 +95,54 @@ describe("OpenAIResponses Integration Tests", () => {
|
||||
});
|
||||
|
||||
describe("OpenAIResponses Unit Tests", () => {
|
||||
it("passes reasoning_effort to OpenAI SDK when reasoningEffort is set", async () => {
|
||||
const createSpy = vi.fn().mockResolvedValue({
|
||||
id: "resp_123",
|
||||
output: [
|
||||
{
|
||||
type: "message",
|
||||
role: "assistant",
|
||||
content: [
|
||||
{
|
||||
type: "output_text",
|
||||
text: "ok",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const mockSession = {
|
||||
responses: {
|
||||
create: createSpy,
|
||||
},
|
||||
apiKey: undefined,
|
||||
baseURL: undefined,
|
||||
chat: {} as unknown,
|
||||
embeddings: {} as unknown,
|
||||
} as const;
|
||||
|
||||
const llm = new OpenAIResponses({
|
||||
model: "gpt-5",
|
||||
reasoningEffort: "high",
|
||||
reasoningSummary: "auto",
|
||||
session: mockSession as unknown as LLMInstance,
|
||||
});
|
||||
|
||||
await llm.chat({
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: "hello",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
expect(createSpy).toHaveBeenCalledTimes(1);
|
||||
const arg = createSpy.mock.calls[0]?.[0] as Record<string, unknown>;
|
||||
expect(arg["reasoning"]).toHaveProperty("effort", "high");
|
||||
expect(arg["reasoning"]).toHaveProperty("summary", "auto");
|
||||
});
|
||||
// Testing utility functions
|
||||
describe("processMessageContent", () => {
|
||||
const llm = new OpenAIResponses({
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/perplexity
|
||||
|
||||
## 0.0.34
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.0.33
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/perplexity",
|
||||
"description": "Perplexity 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/azure
|
||||
|
||||
## 0.1.38
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.1.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/azure",
|
||||
"description": "Azure Storage for LlamaIndex",
|
||||
"version": "0.1.37",
|
||||
"version": "0.1.38",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/together
|
||||
|
||||
## 0.0.37
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.0.36
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/together",
|
||||
"description": "Together Adapter for LlamaIndex",
|
||||
"version": "0.0.36",
|
||||
"version": "0.0.37",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/vllm
|
||||
|
||||
## 0.0.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.0.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/vllm",
|
||||
"description": "vLLM Adapter for LlamaIndex",
|
||||
"version": "0.0.62",
|
||||
"version": "0.0.63",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/xai
|
||||
|
||||
## 0.0.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.0.23
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/xai",
|
||||
"description": "XAI Adapter for LlamaIndex",
|
||||
"version": "0.0.23",
|
||||
"version": "0.0.24",
|
||||
"type": "module",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
"@discoveryjs/json-ext": "^0.6.1",
|
||||
"@xmldom/xmldom": "^0.9.8",
|
||||
"csv-parse": "^5.5.6",
|
||||
"mammoth": "^1.7.2",
|
||||
"mammoth": "^1.11.0",
|
||||
"unpdf": "^0.12.1"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+875
-867
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,12 @@
|
||||
# @llamaindex/unit-test
|
||||
|
||||
## 0.1.63
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [1028877]
|
||||
- @llamaindex/openai@0.4.21
|
||||
|
||||
## 0.1.62
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@llamaindex/unit-test",
|
||||
"private": true,
|
||||
"version": "0.1.62",
|
||||
"version": "0.1.63",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "vitest run"
|
||||
|
||||
Reference in New Issue
Block a user