Skip to content

Commit

Permalink
added 3.5 1106
Browse files Browse the repository at this point in the history
  • Loading branch information
yisding committed Nov 6, 2023
1 parent 9806b5a commit 3bc52a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/simple/openai.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OpenAI } from "llamaindex";

(async () => {
const llm = new OpenAI({ model: "gpt-4-1106-preview", temperature: 0.1 });
const llm = new OpenAI({ model: "gpt-3.5-turbo-1106", temperature: 0.1 });

// complete api
const response1 = await llm.complete("How are you?");
Expand Down
2 changes: 1 addition & 1 deletion examples/openai.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OpenAI } from "llamaindex";

(async () => {
const llm = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0.0 });
const llm = new OpenAI({ model: "gpt-3.5-turbo-1106", temperature: 0.1 });

// complete api
const response1 = await llm.complete("How are you?");
Expand Down
7 changes: 4 additions & 3 deletions packages/core/src/llm/LLM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,23 @@ export interface LLM {

export const GPT4_MODELS = {
"gpt-4": { contextWindow: 8192 },
"gpt-4-32k": { contextWindow: 32768 },
"gpt-4-1106-preview": { contextWindow: 128000 },
"gpt-4-vision-preview": { contextWindow: 8192 },
"gpt-4-32k": { contextWindow: 32768 },
};

export const TURBO_MODELS = {
export const GPT35_MODELS = {
"gpt-3.5-turbo": { contextWindow: 4096 },
"gpt-3.5-turbo-16k": { contextWindow: 16384 },
"gpt-3.5-turbo-1106": { contextWindow: 16384 },
};

/**
* We currently support GPT-3.5 and GPT-4 models
*/
export const ALL_AVAILABLE_OPENAI_MODELS = {
...GPT4_MODELS,
...TURBO_MODELS,
...GPT35_MODELS,
};

/**
Expand Down

0 comments on commit 3bc52a1

Please sign in to comment.