Skip to content

Commit 2807b30

Browse files
New Version 0.1.1
1 parent 630f12e commit 2807b30

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

src/windows/Chat.bas

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Attribute VB_Name = "Chat"
22
'
33
'
4-
' GPT ChatBot - Version 0.1.0
4+
' GPT ChatBot - Version 0.1.1
55
'
66
'
77
Option Explicit
@@ -84,13 +84,22 @@ Sub Chat()
8484
.SetRequestHeader "Authorization", "Bearer " + strAPIKey
8585
.Send (strJSONdata)
8686

87+
Dim strStatus As Integer
88+
strStatus = .Status
89+
Dim strStatusText As String
90+
strStatusText = .StatusText
91+
92+
If strStatus <> 200 Then
93+
MsgBox Prompt:="The OpenAI servers have experienced an error while processing your request! Please try again shortly, or for continued downtime please check the Chat status at: https://status.openai.com/"
94+
Exit Sub
95+
End If
96+
8797
Dim strResponse As String
8898
strResponse = .ResponseText
99+
89100

90-
91-
92-
If Mid(strResponse, 6, 5) = "error" Then
93-
MsgBox Prompt:="That ChatGPT model is currently overloaded with other requests. You can retry your request, or contact us through our help center at help.openai.com if the error persists."
101+
If Mid(strResponse, 8, 5) = "error" Then
102+
MsgBox Prompt:="The ChatGPT model is currently overloaded with other requests. You can retry your request, or contact us through our help center at help.openai.com if the error persists."
94103
Exit Sub
95104
End If
96105

@@ -101,7 +110,7 @@ Sub Chat()
101110

102111

103112
If intStartPos = 11 Then
104-
MsgBox Prompt:="That ChatGPT model is currently overloaded with other requests. You can retry your request, or contact us through our help center at help.openai.com if the error persists."
113+
MsgBox Prompt:="ChatGPT is at capacity right now. Please wait a minute and try again."
105114
Exit Sub
106115
End If
107116

src/windows/ChatReset.bas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Attribute VB_Name = "ChatReset"
22
'
33
'
4-
' GPT ChatBot Reset - Version 0.1.0
4+
' GPT ChatBot Reset - Version 0.1.1
55
'
66
'
77
Option Explicit

0 commit comments

Comments
 (0)