]> gitweb.factorcode.org Git - factor.git/commitdiff
discord.chatgpt-bot: use new openai model order
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 26 May 2023 00:11:13 +0000 (19:11 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 6 Jun 2023 13:36:50 +0000 (08:36 -0500)
extra/discord/chatgpt-bot/chatgpt-bot.factor

index 7f1a2dfea0da6e32f4ab0f05db00ed63c62d8d88..1fc78deb13b4e5da9b7092ac962d216c20ea4261 100644 (file)
@@ -18,8 +18,9 @@ M: object discord-chatgpt-bot 2drop ;
 M: MESSAGE_CREATE discord-chatgpt-bot drop
     dup obey-message? [
         "content" of "chatgpt: " ?head [
-            [ "gpt-3.5-turbo" ] dip
-            [ blank? ] trim '{ { "role" "user" } { "content" _ } } >hashtable 1array <chat-completion>
+            [ blank? ] trim
+            '{ { "role" "user" } { "content" _ } } >hashtable 1array
+            "gpt-3.5-turbo" <chat-completion>
             [ g... gflush ] [ chat-completions ] bi
             first-chat-completion reply-message
         ] [