Skip to content

Commit 35c74bf

Browse files
fix streaming error with v1/responses
1 parent a7fb7da commit 35c74bf

File tree

2 files changed

+60
-34
lines changed

2 files changed

+60
-34
lines changed

Main.dfm

Lines changed: 55 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ object Form1: TForm1
433433
Top = 50
434434
Width = 350
435435
Height = 488
436-
ActivePage = HistorySheet
436+
ActivePage = SettingsSheet
437437
Align = alClient
438438
Style = tsButtons
439439
TabOrder = 0
@@ -920,7 +920,7 @@ object Form1: TForm1
920920
Width = 342
921921
Height = 478
922922
HorzScrollBar.Visible = False
923-
VertScrollBar.Position = 142
923+
VertScrollBar.Position = 412
924924
Align = alClient
925925
BevelInner = bvNone
926926
BevelOuter = bvNone
@@ -931,21 +931,21 @@ object Form1: TForm1
931931
StyleElements = [seFont, seBorder]
932932
object Label5: TLabel
933933
Left = 8
934-
Top = -134
934+
Top = -404
935935
Width = 120
936936
Height = 20
937937
Caption = 'Delphi Proficiency'
938938
end
939939
object Label6: TLabel
940940
Left = 8
941-
Top = -58
941+
Top = -328
942942
Width = 105
943943
Height = 20
944944
Caption = 'Preferred Name'
945945
end
946946
object Label7: TLabel
947947
Left = 8
948-
Top = -105
948+
Top = -375
949949
Width = 313
950950
Height = 20
951951
Alignment = taRightJustify
@@ -963,14 +963,14 @@ object Form1: TForm1
963963
end
964964
object Label8: TLabel
965965
Left = 8
966-
Top = -18
966+
Top = -288
967967
Width = 78
968968
Height = 20
969969
Caption = 'OpenAI Key'
970970
end
971971
object Label9: TLabel
972972
Left = 24
973-
Top = 116
973+
Top = -154
974974
Width = 91
975975
Height = 20
976976
Hint = 'Models that support both the file_search and web_search tools.'
@@ -980,7 +980,7 @@ object Form1: TForm1
980980
end
981981
object Label10: TLabel
982982
Left = 24
983-
Top = 241
983+
Top = -29
984984
Width = 93
985985
Height = 20
986986
Hint = 'Models that support both the file_search and web_search tools.'
@@ -990,7 +990,7 @@ object Form1: TForm1
990990
end
991991
object Label11: TLabel
992992
Left = 8
993-
Top = 83
993+
Top = -187
994994
Width = 318
995995
Height = 20
996996
AutoSize = False
@@ -1007,7 +1007,7 @@ object Form1: TForm1
10071007
end
10081008
object Label12: TLabel
10091009
Left = 8
1010-
Top = 203
1010+
Top = -67
10111011
Width = 313
10121012
Height = 20
10131013
AutoSize = False
@@ -1024,7 +1024,7 @@ object Form1: TForm1
10241024
end
10251025
object Label21: TLabel
10261026
Left = 24
1027-
Top = 281
1027+
Top = 11
10281028
Width = 37
10291029
Height = 20
10301030
Caption = 'Effort'
@@ -1033,7 +1033,7 @@ object Form1: TForm1
10331033
end
10341034
object Label22: TLabel
10351035
Left = 24
1036-
Top = 321
1036+
Top = 51
10371037
Width = 62
10381038
Height = 20
10391039
Caption = 'Summary'
@@ -1042,7 +1042,7 @@ object Form1: TForm1
10421042
end
10431043
object Label23: TLabel
10441044
Left = 24
1045-
Top = 431
1045+
Top = 161
10461046
Width = 80
10471047
Height = 20
10481048
Caption = 'Context size'
@@ -1051,7 +1051,7 @@ object Form1: TForm1
10511051
end
10521052
object Label24: TLabel
10531053
Left = 8
1054-
Top = 178
1054+
Top = -92
10551055
Width = 93
10561056
Height = 25
10571057
Hint = 'Models that support both the file_search and web_search tools.'
@@ -1067,7 +1067,7 @@ object Form1: TForm1
10671067
end
10681068
object Label25: TLabel
10691069
Left = 8
1070-
Top = 58
1070+
Top = -212
10711071
Width = 303
10721072
Height = 25
10731073
Caption = 'Flagship && Cost-optimized models'
@@ -1082,7 +1082,7 @@ object Form1: TForm1
10821082
end
10831083
object Label26: TLabel
10841084
Left = 8
1085-
Top = 388
1085+
Top = 118
10861086
Width = 101
10871087
Height = 25
10881088
Caption = 'Web search'
@@ -1097,7 +1097,7 @@ object Form1: TForm1
10971097
end
10981098
object Label27: TLabel
10991099
Left = 24
1100-
Top = 470
1100+
Top = 200
11011101
Width = 51
11021102
Height = 20
11031103
Caption = 'Country'
@@ -1106,7 +1106,7 @@ object Form1: TForm1
11061106
end
11071107
object Label28: TLabel
11081108
Left = 24
1109-
Top = 510
1109+
Top = 240
11101110
Width = 25
11111111
Height = 20
11121112
Caption = 'City'
@@ -1115,7 +1115,7 @@ object Form1: TForm1
11151115
end
11161116
object Label29: TLabel
11171117
Left = 8
1118-
Top = 578
1118+
Top = 308
11191119
Width = 74
11201120
Height = 25
11211121
Caption = 'Timeout'
@@ -1130,7 +1130,7 @@ object Form1: TForm1
11301130
end
11311131
object Label30: TLabel
11321132
Left = 24
1133-
Top = 621
1133+
Top = 351
11341134
Width = 63
11351135
Height = 20
11361136
Caption = 'Response'
@@ -1139,9 +1139,9 @@ object Form1: TForm1
11391139
end
11401140
object Label31: TLabel
11411141
Left = 8
1142-
Top = 662
1142+
Top = 440
11431143
Width = 305
1144-
Height = 86
1144+
Height = 65
11451145
Alignment = taCenter
11461146
AutoSize = False
11471147
Caption =
@@ -1161,9 +1161,31 @@ object Form1: TForm1
11611161
WordWrap = True
11621162
StyleElements = [seClient, seBorder]
11631163
end
1164+
object SpeedButton11: TSpeedButton
1165+
Left = 169
1166+
Top = 409
1167+
Width = 145
1168+
Height = 25
1169+
Caption = 'Clear Response Id'
1170+
end
1171+
object Label32: TLabel
1172+
Left = 24
1173+
Top = 412
1174+
Width = 127
1175+
Height = 20
1176+
Cursor = crHandPoint
1177+
Caption = 'Dashboard OpenAI'
1178+
Font.Charset = DEFAULT_CHARSET
1179+
Font.Color = clGray
1180+
Font.Height = -15
1181+
Font.Name = 'Segoe UI'
1182+
Font.Style = [fsUnderline]
1183+
ParentFont = False
1184+
StyleElements = [seClient, seBorder]
1185+
end
11641186
object ComboBox2: TComboBox
11651187
Left = 148
1166-
Top = -138
1188+
Top = -408
11671189
Width = 173
11681190
Height = 30
11691191
Style = csOwnerDrawFixed
@@ -1188,7 +1210,7 @@ object Form1: TForm1
11881210
end
11891211
object MaskEdit1: TMaskEdit
11901212
Left = 148
1191-
Top = -60
1213+
Top = -330
11921214
Width = 173
11931215
Height = 26
11941216
TabOrder = 1
@@ -1197,7 +1219,7 @@ object Form1: TForm1
11971219
end
11981220
object MaskEdit2: TMaskEdit
11991221
Left = 148
1200-
Top = -20
1222+
Top = -290
12011223
Width = 173
12021224
Height = 26
12031225
TabOrder = 2
@@ -1206,7 +1228,7 @@ object Form1: TForm1
12061228
end
12071229
object ComboBox3: TComboBox
12081230
Left = 148
1209-
Top = 113
1231+
Top = -157
12101232
Width = 173
12111233
Height = 28
12121234
Hint = 'Models that support both the file_search and web_search tools.'
@@ -1225,7 +1247,7 @@ object Form1: TForm1
12251247
end
12261248
object ComboBox4: TComboBox
12271249
Left = 148
1228-
Top = 238
1250+
Top = -32
12291251
Width = 173
12301252
Height = 28
12311253
Hint = 'Models that support both the file_search and web_search tools.'
@@ -1244,7 +1266,7 @@ object Form1: TForm1
12441266
end
12451267
object ComboBox5: TComboBox
12461268
Left = 148
1247-
Top = 278
1269+
Top = 8
12481270
Width = 173
12491271
Height = 28
12501272
Hint = 'Models that support both the file_search and web_search tools.'
@@ -1263,7 +1285,7 @@ object Form1: TForm1
12631285
end
12641286
object ComboBox6: TComboBox
12651287
Left = 149
1266-
Top = 318
1288+
Top = 48
12671289
Width = 173
12681290
Height = 28
12691291
Hint = 'Models that support both the file_search and web_search tools.'
@@ -1282,7 +1304,7 @@ object Form1: TForm1
12821304
end
12831305
object ComboBox7: TComboBox
12841306
Left = 149
1285-
Top = 428
1307+
Top = 158
12861308
Width = 173
12871309
Height = 28
12881310
Hint = 'Models that support both the file_search and web_search tools.'
@@ -1301,7 +1323,7 @@ object Form1: TForm1
13011323
end
13021324
object MaskEdit8: TMaskEdit
13031325
Left = 148
1304-
Top = 468
1326+
Top = 198
13051327
Width = 173
13061328
Height = 26
13071329
TabOrder = 8
@@ -1310,7 +1332,7 @@ object Form1: TForm1
13101332
end
13111333
object MaskEdit9: TMaskEdit
13121334
Left = 148
1313-
Top = 508
1335+
Top = 238
13141336
Width = 173
13151337
Height = 26
13161338
TabOrder = 9
@@ -1319,7 +1341,7 @@ object Form1: TForm1
13191341
end
13201342
object ComboBox8: TComboBox
13211343
Left = 149
1322-
Top = 618
1344+
Top = 348
13231345
Width = 173
13241346
Height = 28
13251347
Hint = 'Models that support both the file_search and web_search tools.'

Main.pas

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ TForm1 = class(TForm)
128128
Label31: TLabel;
129129
SpeedButton10: TSpeedButton;
130130
Panel26: TPanel;
131+
SpeedButton11: TSpeedButton;
132+
Label32: TLabel;
131133
procedure FormCreate(Sender: TObject);
132134
procedure FormShow(Sender: TObject);
133135
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
@@ -301,7 +303,9 @@ procedure TForm1.RegisterIniAndSettings;
301303
.SetWebContextSize(Combobox7)
302304
.SetTimeOut(Combobox8)
303305
.SetCountry(MaskEdit8)
304-
.SetCity(MaskEdit9);
306+
.SetCity(MaskEdit9)
307+
.SetClearResponseButton(SpeedButton11)
308+
.SetDashBoardLabel(Label32);
305309
Result := TSettingsVCL.Create(Introducer);
306310
end,
307311
TLifetime.Singleton

0 commit comments

Comments
 (0)