From 4aba02eb82101375d5cf8a34c5edbc2df877ba8d Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Mon, 13 May 2024 10:51:10 -0700 Subject: [PATCH] feat: support `gpt4-o` (#831) --- .changeset/swift-beans-battle.md | 5 +++++ packages/core/src/llm/openai.ts | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/swift-beans-battle.md diff --git a/.changeset/swift-beans-battle.md b/.changeset/swift-beans-battle.md new file mode 100644 index 0000000000..082323741c --- /dev/null +++ b/.changeset/swift-beans-battle.md @@ -0,0 +1,5 @@ +--- +"llamaindex": patch +--- + +feat: support gpt4-o diff --git a/packages/core/src/llm/openai.ts b/packages/core/src/llm/openai.ts index 22d486587b..288ed4558c 100644 --- a/packages/core/src/llm/openai.ts +++ b/packages/core/src/llm/openai.ts @@ -110,6 +110,9 @@ export const GPT4_MODELS = { "gpt-4-1106-preview": { contextWindow: 128000 }, "gpt-4-0125-preview": { contextWindow: 128000 }, "gpt-4-vision-preview": { contextWindow: 128000 }, + // fixme: wait for openai documentation + "gpt-4o": { contextWindow: 128000 }, + "gpt-4o-2024-05-13": { contextWindow: 128000 }, }; // NOTE we don't currently support gpt-3.5-turbo-instruct and don't plan to in the near future