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 c9e5815 + d65397a commit 6f7c239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/openai.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { OpenAI } from "llamaindex";

(async () => {
const llm = new OpenAI({ model: "gpt-3.5-turbo-1106", temperature: 0.1 });
const llm = new OpenAI({ model: "gpt-4-1106-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" },
{ content: "Tell me a joke.", role: "user" },
]);
console.log(response2.message.content);
})();

0 comments on commit 6f7c239

Please sign in to comment.