Skip to content

Commit

Permalink
Merge main into sweep/fix-lockfile-compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Nov 6, 2023
2 parents 1bdb935 + 8c72500 commit c9e5815
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
7 changes: 7 additions & 0 deletions apps/simple/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# simple

## 0.0.32

### Patch Changes

- Updated dependencies [2a27e21]
- [email protected]

## 0.0.31

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/simple/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { OpenAI } from "llamaindex";

// chat api
const response2 = await llm.chat([
{ content: "Tell me a joke!", role: "user" },
{ content: "Tell me a joke.", role: "user" },
]);
console.log(response2.message.content);
})();
2 changes: 1 addition & 1 deletion apps/simple/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.0.31",
"version": "0.0.32",
"private": true,
"name": "simple",
"dependencies": {
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
6 changes: 6 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# llamaindex

## 0.0.34

### Patch Changes

- 2a27e21: Add support for gpt-3.5-turbo-1106

## 0.0.33

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "llamaindex",
"version": "0.0.33",
"version": "0.0.34",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "^0.9.0",
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 c9e5815

Please sign in to comment.