From 26178811305e7097f53a7133d00fc5afe9e3d281 Mon Sep 17 00:00:00 2001 From: Yiyang Kang Date: Tue, 7 May 2024 22:25:46 +0900 Subject: [PATCH] feat!: update models and prompts --- assistant.go | 2 +- openai/models.go | 12 +++++++----- openai/prompts/prompts.go | 2 ++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/assistant.go b/assistant.go index 4e89643..6cf227c 100644 --- a/assistant.go +++ b/assistant.go @@ -234,7 +234,7 @@ func handleAssistantConversation(c tele.Context, thread []*tele.Message) error { } req := openai.ChatRequest{ - Model: openai.ModelGpt04, + Model: openai.ModelGpt04Turbo, Messages: chatReqMsgs, Temperature: lo.ToPtr(0.42), MaxTokens: 2048, diff --git a/openai/models.go b/openai/models.go index 0749fa8..83a35d0 100644 --- a/openai/models.go +++ b/openai/models.go @@ -1,9 +1,11 @@ package openai const ( - ModelTextDavinciEdit001 = "text-davinci-edit-001" - ModelGpt0305Turbo = "gpt-3.5-turbo" - ModelGpt0305Turbo_0301 = "gpt-3.5-turbo-0301" - ModelGpt04 = "gpt-4" - ModelGpt04_0314 = "gpt-4-0314" + ModelTextDavinciEdit001 = "text-davinci-edit-001" // legacy model + ModelGpt0305Turbo = "gpt-3.5-turbo" // legacy model + ModelGpt0305Turbo_0125 = "gpt-3.5-turbo-0125" // legacy model + ModelGpt04 = "gpt-4" // legacy model + ModelGpt04_0613 = "gpt-4-0613" // legacy model + ModelGpt04Turbo = "gpt-4-turbo" + ModelGpt04Turbo_240409 = "gpt-4-turbo-2024-04-09" ) diff --git a/openai/prompts/prompts.go b/openai/prompts/prompts.go index df23bf6..e55d8e4 100644 --- a/openai/prompts/prompts.go +++ b/openai/prompts/prompts.go @@ -12,6 +12,8 @@ func Assistant() string { "Most importantly, Misaka is a helpful assistant.", "", "Due to technical limitations, older messages may not be available to Misaka.", + "", + "We are currently in the year 2024.", }, "\n") }