Skip to content

Commit 347bf8b

Browse files
New version v1.4
New version v1.4 has added error handling for situations when ChatGPT is at capacity.
1 parent 8615a36 commit 347bf8b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ChatgptTextCompletion.bas

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ Sub TextCompletion()
4848
Dim intStartPos As Integer
4949
intStartPos = InStr(1, strResponse, Chr(34) & "text" & Chr(34)) + 12
5050

51+
If intStartPos = 12 Then
52+
MsgBox Prompt:="ChatGPT is at capacity right now. Please wait a minute and try again."
53+
Exit Sub
54+
End If
55+
5156
Dim intEndPos As Integer
5257
intEndPos = InStr(1, strResponse, Chr(34) & "index" & Chr(34)) - 2
5358

0 commit comments

Comments
 (0)