-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters