Skip to content

Commit

Permalink
Merge pull request #216 from tri-star/feature/add-gpt-4o
Browse files Browse the repository at this point in the history
Add gpt-4o
  • Loading branch information
tri-star authored May 13, 2024
2 parents 835d8a8 + c2020ec commit 8b86d1a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
${{ runner.os }}-yarn-
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-build-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18.x'
node-version: '20.x'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## v2.5.0

- Add gpt-4o.

## v2.4.0

- Add gpt-4-turbo.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

Your friend living in the sidebar, powered by OpenAI API(from gpt-3.5-turbo to gpt-4-turbo).
Your friend living in the sidebar, powered by OpenAI API(from gpt-3.5-turbo to gpt-4o).
You can specify the model and temperature, and refer to conversation history(shared between Windows/WSL).

## Requirements
Expand Down
4 changes: 3 additions & 1 deletion packages/app/src/domain/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const roleSchema = zod.union([
])

export const modelSchema = zod.union([
zod.literal('gpt-4o'),
zod.literal('gpt-4-turbo'),
zod.literal('gpt-4-0125-preview'),
zod.literal('gpt-4-1106-preview'),
Expand Down Expand Up @@ -41,6 +42,7 @@ export const chatRoles: ChatRole[] = ['system', 'assistant', 'user']
export type ChatModel = zod.infer<typeof modelSchema>

export const chatModels: ChatModel[] = [
'gpt-4o',
'gpt-4-turbo',
'gpt-4-0125-preview',
'gpt-4-1106-preview',
Expand All @@ -51,4 +53,4 @@ export const chatModels: ChatModel[] = [
'gpt-3.5-turbo',
] as const

export const DEFAULT_CHAT_MODEL: ChatModel = 'gpt-4-turbo'
export const DEFAULT_CHAT_MODEL: ChatModel = 'gpt-4o'
3 changes: 1 addition & 2 deletions src/test/suite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export async function run(): Promise<void> {
}
})
} catch (err) {
console.error(err)
reject(err)
reject(new Error(err as string))
}
}
)
Expand Down

0 comments on commit 8b86d1a

Please sign in to comment.