Skip to content

Commit

Permalink
Add gpt-40-mini
Browse files Browse the repository at this point in the history
  • Loading branch information
sacredbanana committed Aug 9, 2024
1 parent e2e2b21 commit f14a9df
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 47 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.6.0 (2024-08-08)

- Add the GPT4o Mini model

## 1.5.1 (2024-06-26)

- Send button no longer appears after image creation
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ GPT-4 is a large multimodal model (accepting text inputs and emitting text outpu
| ----- | ----------- | ---------- | ------------- |
| gpt-4o | Our most advanced, multimodal flagship model that’s cheaper and faster than GPT-4 Turbo. Currently points to gpt-4o-2024-05-13. | 128,000 | Up to Oct 2023 |
| gpt-4o-2024-05-13 | gpt-4o currently points to this version. | 128,000 | Up to Oct 2023 |
| gpt-4o-mini | Our affordable and intelligent small model for fast, lightweight tasks. GPT-4o mini is cheaper and more capable than GPT-3.5 Turbo. Currently points to gpt-4o-mini-2024-07-18. | 128,000 | Up to Oct 2023 |
| gpt-4o-mini-2024-07-18 | gpt-4o-mini currently points to this version. | Up to Oct 2023 |
| gpt-4-turbo | The latest GPT-4 Turbo model with vision capabilities. Vision requests can now use JSON mode and function calling. Currently points to gpt-4-turbo-2024-04-09. | 128,000 | Up to Dec 2023 |
| gpt-4-turbo-2024-04-09 | GPT-4 Turbo with Vision model. Vision requests can now use JSON mode and function calling. gpt-4-turbo currently points to this version. | 128,000 | Up to Dec 2023 |
| gpt-4-turbo-preview | GPT-4 Turbo preview model. Currently points to gpt-4-0125-preview. | 128,000 | Up to Dec 2023 |
Expand Down
16 changes: 16 additions & 0 deletions bundle/AmigaGPT/AmigaGPT.guide
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,18 @@ gpt-4o currently points to this version.
Max tokens: 128,000
Training data: Up to Oct 2023

@{b}gpt-4o-mini@{ub}
Our affordable and intelligent small model for fast, lightweight tasks. GPT-4o mini is cheaper and more capable than GPT-3.5 Turbo. Currently points to gpt-4o-mini-2024-07-18.

Max tokens: 128,000
Training data: Up to Oct 2023

@{b}gpt-4o-mini-2024-07-18@{ub}
gpt-4o-mini currently points to this version.

Max tokens: 128,000
Training data: Up to Oct 2023

@{b}gpt-4-turbo@{ub}
The latest GPT-4 Turbo model with vision capabilities. Vision requests can now use JSON mode and function calling. Currently points to gpt-4-turbo-2024-04-09.

Expand Down Expand Up @@ -703,6 +715,10 @@ Training data: Up to Sep 2021
@node changelog "Changelog"
@{b}Changelog@{ub}

@{b}1.6.0 (2024-08-08)@{ub}

- Add the GPT4o Mini model

@{b}1.5.1 (2024-06-26)@{ub}

- Send button no longer appears after image creation
Expand Down
8 changes: 7 additions & 1 deletion bundle/AmigaGPT/AmigaGPT.readme
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Kurz: App zum Chatten mit ChatGPT
Author: Cameron Armstrong (Nightfox) <[email protected]>
Uploader: Cameron Armstrong (Nightfox) <[email protected]>
Type: util/misc
Version: 1.5.1
Version: 1.6.0
Architecture: m68k-amigaos >= 3.9; ppc-amigaos
Requires: AmigaOS 3.9+/68020+ util/libs/AmiSSL-5.9-OS3.lha
Replaces: util/misc/AmigaGPT.lha
Expand Down Expand Up @@ -215,6 +215,12 @@ Special Thanks:

Changelog:

------------------
1.6.0 (2024-08-08)
------------------

- Add the GPT4o Mini model

------------------
1.5.1 (2024-06-26)
------------------
Expand Down
2 changes: 1 addition & 1 deletion src/config.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "openai.h"
#include "speech.h"

#define CHAT_MODEL_SET_VERSION 2
#define CHAT_MODEL_SET_VERSION 3
#define IMAGE_MODEL_SET_VERSION 0
#define SPEECH_SYSTEM_SET_VERSION 0
#define OPENAI_TTS_MODEL_SET_VERSION 0
Expand Down
98 changes: 56 additions & 42 deletions src/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,48 +97,50 @@
#define MENU_ITEM_SELECT_ALL_ID 15
#define MENU_ITEM_CHAT_MODEL_GPT_4o_ID 16
#define MENU_ITEM_CHAT_MODEL_GPT_4o_2024_05_13_ID 17
#define MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_ID 18
#define MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_2024_04_09_ID 19
#define MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_PREVIEW_ID 20
#define MENU_ITEM_CHAT_MODEL_GPT_4_0125_PREVIEW_ID 21
#define MENU_ITEM_CHAT_MODEL_GPT_4_1106_PREVIEW_ID 22
#define MENU_ITEM_CHAT_MODEL_GPT_4_ID 23
#define MENU_ITEM_CHAT_MODEL_GPT_4_0613_ID 24
#define MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_ID 25
#define MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_0125_ID 26
#define MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_1106_ID 27
#define MENU_ITEM_CHAT_MODEL_ID 28
#define MENU_ITEM_SPEECH_SYSTEM_ID 29
#define MENU_ITEM_OPENAI_API_KEY_ID 30
#define MENU_ITEM_VIEW_DOCUMENTATION_ID 31
#define MENU_ITEM_SPEECH_FLITE_VOICE_ID 32
#define MENU_ITEM_SPEECH_FLITE_VOICE_AWB_ID 33
#define MENU_ITEM_SPEECH_FLITE_VOICE_KAL_ID 34
#define MENU_ITEM_SPEECH_FLITE_VOICE_KAL16_ID 35
#define MENU_ITEM_SPEECH_FLITE_VOICE_RMS_ID 36
#define MENU_ITEM_SPEECH_FLITE_VOICE_SLT_ID 37
#define MENU_ITEM_SPEECH_OPENAI_VOICE_ID 38
#define MENU_ITEM_SPEECH_OPENAI_VOICE_ALLOY_ID 39
#define MENU_ITEM_SPEECH_OPENAI_VOICE_ECHO_ID 40
#define MENU_ITEM_SPEECH_OPENAI_VOICE_FABLE_ID 41
#define MENU_ITEM_SPEECH_OPENAI_VOICE_ONYX_ID 42
#define MENU_ITEM_SPEECH_OPENAI_VOICE_NOVA_ID 43
#define MENU_ITEM_SPEECH_OPENAI_VOICE_SHIMMER_ID 44
#define MENU_ITEM_SPEECH_OPENAI_MODEL_ID 45
#define MENU_ITEM_SPEECH_OPENAI_MODEL_TTS_1_ID 46
#define MENU_ITEM_SPEECH_OPENAI_MODEL_TTS_1_HD_ID 47
#define MENU_ITEM_IMAGE_MODEL_ID 48
#define MENU_ITEM_IMAGE_MODEL_DALL_E_2_ID 49
#define MENU_ITEM_IMAGE_MODEL_DALL_E_3_ID 50
#define MENU_ITEM_IMAGE_SIZE_DALL_E_2_ID 51
#define MENU_ITEM_IMAGE_SIZE_DALL_E_3_ID 52
#define MENU_ITEM_IMAGE_SIZE_DALL_E_2_256X256_ID 53
#define MENU_ITEM_IMAGE_SIZE_DALL_E_2_512X512_ID 54
#define MENU_ITEM_IMAGE_SIZE_DALL_E_2_1024X1024_ID 55
#define MENU_ITEM_IMAGE_SIZE_DALL_E_3_1024X1024_ID 56
#define MENU_ITEM_IMAGE_SIZE_DALL_E_3_1792X1024_ID 57
#define MENU_ITEM_IMAGE_SIZE_DALL_E_3_1024X1792_ID 58
#define MENU_ITEM_CHAT_SYSTEM_ID 59
#define MENU_ITEM_CHAT_MODEL_GPT_4o_MINI_ID 18
#define MENU_ITEM_CHAT_MODEL_GPT_4o_MINI_2024_07_18_ID 19
#define MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_ID 20
#define MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_2024_04_09_ID 21
#define MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_PREVIEW_ID 22
#define MENU_ITEM_CHAT_MODEL_GPT_4_0125_PREVIEW_ID 23
#define MENU_ITEM_CHAT_MODEL_GPT_4_1106_PREVIEW_ID 24
#define MENU_ITEM_CHAT_MODEL_GPT_4_ID 25
#define MENU_ITEM_CHAT_MODEL_GPT_4_0613_ID 26
#define MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_ID 27
#define MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_0125_ID 28
#define MENU_ITEM_CHAT_MODEL_GPT_3_5_TURBO_1106_ID 29
#define MENU_ITEM_CHAT_MODEL_ID 30
#define MENU_ITEM_SPEECH_SYSTEM_ID 31
#define MENU_ITEM_OPENAI_API_KEY_ID 32
#define MENU_ITEM_VIEW_DOCUMENTATION_ID 33
#define MENU_ITEM_SPEECH_FLITE_VOICE_ID 34
#define MENU_ITEM_SPEECH_FLITE_VOICE_AWB_ID 35
#define MENU_ITEM_SPEECH_FLITE_VOICE_KAL_ID 36
#define MENU_ITEM_SPEECH_FLITE_VOICE_KAL16_ID 37
#define MENU_ITEM_SPEECH_FLITE_VOICE_RMS_ID 38
#define MENU_ITEM_SPEECH_FLITE_VOICE_SLT_ID 39
#define MENU_ITEM_SPEECH_OPENAI_VOICE_ID 40
#define MENU_ITEM_SPEECH_OPENAI_VOICE_ALLOY_ID 41
#define MENU_ITEM_SPEECH_OPENAI_VOICE_ECHO_ID 42
#define MENU_ITEM_SPEECH_OPENAI_VOICE_FABLE_ID 43
#define MENU_ITEM_SPEECH_OPENAI_VOICE_ONYX_ID 44
#define MENU_ITEM_SPEECH_OPENAI_VOICE_NOVA_ID 45
#define MENU_ITEM_SPEECH_OPENAI_VOICE_SHIMMER_ID 46
#define MENU_ITEM_SPEECH_OPENAI_MODEL_ID 47
#define MENU_ITEM_SPEECH_OPENAI_MODEL_TTS_1_ID 48
#define MENU_ITEM_SPEECH_OPENAI_MODEL_TTS_1_HD_ID 49
#define MENU_ITEM_IMAGE_MODEL_ID 50
#define MENU_ITEM_IMAGE_MODEL_DALL_E_2_ID 51
#define MENU_ITEM_IMAGE_MODEL_DALL_E_3_ID 52
#define MENU_ITEM_IMAGE_SIZE_DALL_E_2_ID 53
#define MENU_ITEM_IMAGE_SIZE_DALL_E_3_ID 54
#define MENU_ITEM_IMAGE_SIZE_DALL_E_2_256X256_ID 55
#define MENU_ITEM_IMAGE_SIZE_DALL_E_2_512X512_ID 56
#define MENU_ITEM_IMAGE_SIZE_DALL_E_2_1024X1024_ID 57
#define MENU_ITEM_IMAGE_SIZE_DALL_E_3_1024X1024_ID 58
#define MENU_ITEM_IMAGE_SIZE_DALL_E_3_1792X1024_ID 59
#define MENU_ITEM_IMAGE_SIZE_DALL_E_3_1024X1792_ID 60
#define MENU_ITEM_CHAT_SYSTEM_ID 61

#ifdef __AMIGAOS4__
#define IntuitionBase Library
Expand Down Expand Up @@ -285,6 +287,8 @@ static struct NewMenu amigaGPTMenu[] = {
{NM_ITEM, "Chat Model", 0, 0, 0, (APTR)MENU_ITEM_CHAT_MODEL_ID},
{NM_SUB, "gpt-4o", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4o_ID},
{NM_SUB, "gpt-4o-2024-05-13", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4o_2024_05_13_ID},
{NM_SUB, "gpt-4o-mini", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4o_MINI_ID},
{NM_SUB, "gpt-4o-mini-2024-07-18", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4o_MINI_2024_07_18_ID},
{NM_SUB, "gpt-4-turbo", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_ID},
{NM_SUB, "gpt-4-turbo-2024-04-09", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_2024_04_09_ID},
{NM_SUB, "gpt-4-turbo-preview", 0, CHECKIT, 0, (APTR)MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_PREVIEW_ID},
Expand Down Expand Up @@ -2618,6 +2622,16 @@ LONG startGUIRunLoop() {
writeConfig();
refreshOpenAIMenuItems();
break;
case MENU_ITEM_CHAT_MODEL_GPT_4o_MINI_ID:
config.chatModel = GPT_4o_MINI;
writeConfig();
refreshOpenAIMenuItems();
break;
case MENU_ITEM_CHAT_MODEL_GPT_4o_MINI_2024_07_18_ID:
config.chatModel = GPT_4o_MINI_2024_07_18;
writeConfig();
refreshOpenAIMenuItems();
break;
case MENU_ITEM_CHAT_MODEL_GPT_4_TURBO_ID:
config.chatModel = GPT_4_TURBO;
writeConfig();
Expand Down
4 changes: 3 additions & 1 deletion src/openai.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ ULONG RangeSeed;
CONST_STRPTR CHAT_MODEL_NAMES[] = {
[GPT_4o] = "gpt-4o",
[GPT_4o_2024_05_13] = "gpt-4o-2024-05-13",
[GPT_4o_MINI] = "gpt-4o-mini",
[GPT_4o_MINI_2024_07_18] = "gpt-4o-mini-2024-07-18",
[GPT_4_TURBO] = "gpt-4-turbo",
[GPT_4_TURBO_2024_04_09] = "gpt-4-turbo-2024-04-09",
[GPT_4_TURBO_PREVIEW] = "gpt-4-turbo-preview",
Expand Down Expand Up @@ -371,7 +373,7 @@ struct json_object** postChatMessageToOpenAI(struct MinList *conversation, enum
json_object_object_add(obj, "messages", conversationArray);
json_object_object_add(obj, "stream", json_object_new_boolean((json_bool)stream));

STRPTR jsonString = json_object_to_json_string(obj);
CONST_STRPTR jsonString = json_object_to_json_string(obj);

snprintf(writeBuffer, WRITE_BUFFER_LENGTH, "POST /v1/chat/completions HTTP/1.1\r\n"
"Host: api.openai.com\r\n"
Expand Down
2 changes: 2 additions & 0 deletions src/openai.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ struct ConversationNode {
enum ChatModel {
GPT_4o = 0,
GPT_4o_2024_05_13,
GPT_4o_MINI,
GPT_4o_MINI_2024_07_18,
GPT_4_TURBO,
GPT_4_TURBO_2024_04_09,
GPT_4_TURBO_PREVIEW,
Expand Down
4 changes: 2 additions & 2 deletions src/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define APP_VERSION "1.5.1"
#define BUILD_NUMBER "3007"
#define APP_VERSION "1.6.0"
#define BUILD_NUMBER "3014"
#define APP_NAME "AmigaGPT"

0 comments on commit f14a9df

Please sign in to comment.