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 98bffdf + 5e2e92c commit 40949f8
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 15 deletions.
5 changes: 0 additions & 5 deletions .changeset/good-badgers-train.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/heavy-beans-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"llamaindex": patch
---

gpt-4-1106-preview and gpt-4-vision-preview from OpenAI dev day
5 changes: 0 additions & 5 deletions .changeset/shiny-lions-clap.md

This file was deleted.

8 changes: 8 additions & 0 deletions apps/simple/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# simple

## 0.0.30

### Patch Changes

- Updated dependencies [90c0b83]
- Updated dependencies [dfd22aa]
- [email protected]

## 0.0.29

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

(async () => {
const gpt4 = new OpenAI({ model: "gpt-4", temperature: 0.9 });
const gpt4 = new OpenAI({ model: "gpt-4-vision-preview", temperature: 0.9 });
const l2 = new LlamaDeuce({
model: "Llama-2-70b-chat-4bit",
temperature: 0.9,
Expand Down
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-3.5-turbo", temperature: 0.0 });
const llm = new OpenAI({ model: "gpt-4-1106-preview", temperature: 0.1 });

// complete api
const response1 = await llm.complete("How are you?");
Expand Down
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.29",
"version": "0.0.30",
"private": true,
"name": "simple",
"dependencies": {
Expand Down
15 changes: 15 additions & 0 deletions apps/simple/vision.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { OpenAI } from "llamaindex";

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

// complete api
const response1 = await llm.complete("How are you?");
console.log(response1.message.content);

// chat api
const response2 = await llm.chat([
{ content: "Tell me a joke!", role: "user" },
]);
console.log(response2.message.content);
})();
7 changes: 7 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# llamaindex

## 0.0.32

### Patch Changes

- 90c0b83: Add HTMLReader (thanks @mtutty)
- dfd22aa: Add observer/filter to the SimpleDirectoryReader (thanks @mtutty)

## 0.0.31

### 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.31",
"version": "0.0.32",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "^0.8.1",
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/llm/LLM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ export interface LLM {

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

Expand Down Expand Up @@ -648,7 +650,7 @@ export class Anthropic implements LLM {

this.callbackManager = init?.callbackManager;
}

tokens(messages: ChatMessage[]): number {
throw new Error("Method not implemented.");
}
Expand Down

0 comments on commit 40949f8

Please sign in to comment.