Skip to content
Snippets Groups Projects
Commit 99df58f6 authored by Yi Ding's avatar Yi Ding
Browse files

openai and anthropic upgrade

parent 454f3f84
No related branches found
No related tags found
No related merge requests found
---
"llamaindex": patch
---
Anthropic 0.6.1 and OpenAI 4.2.0. Changed Anthropic timeout back to 60s
...@@ -11,16 +11,16 @@ ...@@ -11,16 +11,16 @@
"publish-snapshot": "turbo run build lint test && changeset version --snapshot && changeset publish" "publish-snapshot": "turbo run build lint test && changeset version --snapshot && changeset publish"
}, },
"devDependencies": { "devDependencies": {
"@turbo/gen": "^1.10.12", "@turbo/gen": "^1.10.13",
"@types/jest": "^29.5.3", "@types/jest": "^29.5.4",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-config-custom": "workspace:*", "eslint-config-custom": "workspace:*",
"husky": "^8.0.3", "husky": "^8.0.3",
"jest": "^29.6.2", "jest": "^29.6.3",
"prettier": "^3.0.2", "prettier": "^3.0.2",
"prettier-plugin-organize-imports": "^3.2.3", "prettier-plugin-organize-imports": "^3.2.3",
"ts-jest": "^29.1.1", "ts-jest": "^29.1.1",
"turbo": "^1.10.12" "turbo": "^1.10.13"
}, },
"packageManager": "pnpm@7.15.0", "packageManager": "pnpm@7.15.0",
"dependencies": { "dependencies": {
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
"name": "llamaindex", "name": "llamaindex",
"version": "0.0.21", "version": "0.0.21",
"dependencies": { "dependencies": {
"@anthropic-ai/sdk": "^0.6.0", "@anthropic-ai/sdk": "^0.6.1",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"openai": "^4.1.0", "openai": "^4.2.0",
"papaparse": "^5.4.1", "papaparse": "^5.4.1",
"pdf-parse": "^1.1.1", "pdf-parse": "^1.1.1",
"replicate": "^0.16.1", "replicate": "^0.16.1",
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
}, },
"devDependencies": { "devDependencies": {
"@types/lodash": "^4.14.197", "@types/lodash": "^4.14.197",
"@types/node": "^18.17.8", "@types/node": "^18.17.9",
"@types/papaparse": "^5.3.8", "@types/papaparse": "^5.3.8",
"@types/pdf-parse": "^1.1.1", "@types/pdf-parse": "^1.1.1",
"@types/uuid": "^9.0.2", "@types/uuid": "^9.0.2",
......
...@@ -2,9 +2,9 @@ import OpenAILLM, { ClientOptions as OpenAIClientOptions } from "openai"; ...@@ -2,9 +2,9 @@ import OpenAILLM, { ClientOptions as OpenAIClientOptions } from "openai";
import { CallbackManager, Event } from "../callbacks/CallbackManager"; import { CallbackManager, Event } from "../callbacks/CallbackManager";
import { handleOpenAIStream } from "../callbacks/utility/handleOpenAIStream"; import { handleOpenAIStream } from "../callbacks/utility/handleOpenAIStream";
import { import {
AnthropicSession,
ANTHROPIC_AI_PROMPT, ANTHROPIC_AI_PROMPT,
ANTHROPIC_HUMAN_PROMPT, ANTHROPIC_HUMAN_PROMPT,
AnthropicSession,
getAnthropicSession, getAnthropicSession,
} from "./anthropic"; } from "./anthropic";
import { import {
...@@ -14,7 +14,7 @@ import { ...@@ -14,7 +14,7 @@ import {
getAzureModel, getAzureModel,
shouldUseAzure, shouldUseAzure,
} from "./azure"; } from "./azure";
import { getOpenAISession, OpenAISession } from "./openai"; import { OpenAISession, getOpenAISession } from "./openai";
import { ReplicateSession } from "./replicate"; import { ReplicateSession } from "./replicate";
export type MessageType = export type MessageType =
...@@ -471,7 +471,7 @@ export class Anthropic implements LLM { ...@@ -471,7 +471,7 @@ export class Anthropic implements LLM {
this.apiKey = init?.apiKey ?? undefined; this.apiKey = init?.apiKey ?? undefined;
this.maxRetries = init?.maxRetries ?? 10; this.maxRetries = init?.maxRetries ?? 10;
this.timeout = init?.timeout ?? undefined; // Default is 60 seconds this.timeout = init?.timeout ?? 60 * 1000; // Default is 60 seconds
this.session = this.session =
init?.session ?? init?.session ??
getAnthropicSession({ getAnthropicSession({
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment