Skip to content

Commit

Permalink
feat: adding GPT-4o
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-i committed May 18, 2024
1 parent 9dfde81 commit 7f386ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/lib/models/ai.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class Ai {
? 'Powered by GPT-4'
: OpenAiApi.model == 'gpt-3.5-turbo'
? 'Powered by GPT-3.5'
: OpenAiApi.model == 'gpt-4-1106-preview'
? 'Powered by GPT-4 Turbo'
: OpenAiApi.model == 'gpt-4o'
? 'Powered by GPT-4o'
: OpenAiApi.model == 'huggingface'
? HuggingFaceApi.model()
: OpenAiApi.model == 'pulzeai'
Expand Down
8 changes: 2 additions & 6 deletions app/lib/views/dialogs/ai_settings_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ class AiSettingsDialogState extends State<AiSettingsDialog> {
super.initState();
GlobalSettings().selectedModel = OpenAiApi.model;
_systemPromptController.text = GlobalSettings().systemPrompt;
//_isGPT4Selected =
// _selectedModel == 'gpt-4' || _selectedModel == 'gpt-4-1106-preview';
_isHuggingFaceSelected = GlobalSettings().selectedModel == 'huggingface';
_isPulzeSelected = GlobalSettings().selectedModel == 'pulzeai';
_modelIdController.text = HuggingFaceApi.model();
Expand Down Expand Up @@ -157,8 +155,8 @@ class AiSettingsDialogState extends State<AiSettingsDialog> {
child: Text('GPT-4 (Advanced)'),
),
const DropdownMenuItem<String>(
value: 'gpt-4-1106-preview',
child: Text('GPT-4 Turbo (Preview)'),
value: 'gpt-4o',
child: Text('GPT-4o'),
),
if (HuggingFaceApi.oat() != '')
const DropdownMenuItem<String>(
Expand All @@ -179,8 +177,6 @@ class AiSettingsDialogState extends State<AiSettingsDialog> {
onChanged: (value) {
setState(() {
GlobalSettings().selectedModel = value!;
//_isGPT4Selected =
// value == 'gpt-4' || value == 'gpt-4-1106-preview';
_isHuggingFaceSelected = value == 'huggingface';
_isPulzeSelected = value == 'pulzeai';
});
Expand Down

0 comments on commit 7f386ef

Please sign in to comment.