Skip to content
Snippets Groups Projects
Commit 3bc52a1f authored by yisding's avatar yisding
Browse files

added 3.5 1106

parent 9806b5a0
No related branches found
No related tags found
No related merge requests found
import { OpenAI } from "llamaindex"; import { OpenAI } from "llamaindex";
(async () => { (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 // complete api
const response1 = await llm.complete("How are you?"); const response1 = await llm.complete("How are you?");
......
import { OpenAI } from "llamaindex"; import { OpenAI } from "llamaindex";
(async () => { (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 // complete api
const response1 = await llm.complete("How are you?"); const response1 = await llm.complete("How are you?");
......
...@@ -101,14 +101,15 @@ export interface LLM { ...@@ -101,14 +101,15 @@ export interface LLM {
export const GPT4_MODELS = { export const GPT4_MODELS = {
"gpt-4": { contextWindow: 8192 }, "gpt-4": { contextWindow: 8192 },
"gpt-4-32k": { contextWindow: 32768 },
"gpt-4-1106-preview": { contextWindow: 128000 }, "gpt-4-1106-preview": { contextWindow: 128000 },
"gpt-4-vision-preview": { contextWindow: 8192 }, "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": { contextWindow: 4096 },
"gpt-3.5-turbo-16k": { contextWindow: 16384 }, "gpt-3.5-turbo-16k": { contextWindow: 16384 },
"gpt-3.5-turbo-1106": { contextWindow: 16384 },
}; };
/** /**
...@@ -116,7 +117,7 @@ export const TURBO_MODELS = { ...@@ -116,7 +117,7 @@ export const TURBO_MODELS = {
*/ */
export const ALL_AVAILABLE_OPENAI_MODELS = { export const ALL_AVAILABLE_OPENAI_MODELS = {
...GPT4_MODELS, ...GPT4_MODELS,
...TURBO_MODELS, ...GPT35_MODELS,
}; };
/** /**
......
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