Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
chore: changed model names to 'default'
Browse files Browse the repository at this point in the history
  • Loading branch information
francis2tm committed Jan 26, 2024
1 parent a2658ef commit 523cf5c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const edgen = new Edgen({
async function main() {
const chatCompletion = await edgen.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'gpt-3.5-turbo',
model: 'default',
});
}

Expand All @@ -46,7 +46,7 @@ const edgen = new Edgen();

async function main() {
const stream = await edgen.chat.completions.create({
model: 'gpt-4',
model: 'default',
messages: [{ role: 'user', content: 'Say this is a test' }],
stream: true,
});
Expand Down Expand Up @@ -74,7 +74,7 @@ const edgen = new Edgen();
async function main() {
const params: Edgen.Chat.ChatCompletionCreateParams = {
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'gpt-3.5-turbo',
model: 'default',
};
const chatCompletion: Edgen.Chat.ChatCompletion = await edgen.chat.completions.create(params);
}
Expand All @@ -96,7 +96,7 @@ async function main() {
const job = await edgen.chat.completions
.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'gpt-3.5-turbo',
model: 'default',
})
.catch((err) => {
if (err instanceof Edgen.APIError) {
Expand Down Expand Up @@ -141,7 +141,7 @@ const edgen = new Edgen({
});

// Or, configure per-request:
await edgen.chat.completions.create({ messages: [{ role: 'user', content: 'How can I get the name of the current day in Node.js?' }], model: 'gpt-3.5-turbo' }, {
await edgen.chat.completions.create({ messages: [{ role: 'user', content: 'How can I get the name of the current day in Node.js?' }], model: 'default' }, {
maxRetries: 5,
});
```
Expand All @@ -158,7 +158,7 @@ const edgen = new Edgen({
});

// Override per-request:
await edgen.chat.completions.create({ messages: [{ role: 'user', content: 'How can I list all files in a directory using Python?' }], model: 'gpt-3.5-turbo' }, {
await edgen.chat.completions.create({ messages: [{ role: 'user', content: 'How can I list all files in a directory using Python?' }], model: 'default' }, {
timeout: 5 * 1000,
});
```
Expand Down
4 changes: 2 additions & 2 deletions examples/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ async function main() {
// Non-streaming:
/*
const completion = await client.chat.completions.create({
model: 'gpt-4',
model: 'default',
messages: [{ role: 'user', content: 'Say this is a test' }],
});
console.log(completion.choices[0]?.message?.content);
*/

// Streaming:
const stream = await client.chat.completions.create({
model: 'gpt-4',
model: 'default',
messages: [{ role: 'user', content: 'Say this is a test' }],
stream: true,
});
Expand Down

0 comments on commit 523cf5c

Please sign in to comment.