Skip to content

Commit

Permalink
Version 1.0.18, Remove Auto translate feature, add timeout parameter,…
Browse files Browse the repository at this point in the history
… timeout error hint, fix TopP and AutoExecFuncs for new chats, update OpenAI
  • Loading branch information
HemulGM committed Sep 15, 2023
1 parent ea64b12 commit 45979a4
Show file tree
Hide file tree
Showing 11 changed files with 272 additions and 321 deletions.
133 changes: 36 additions & 97 deletions ChatGPT.ChatSettings.fmx
Original file line number Diff line number Diff line change
Expand Up @@ -94,49 +94,6 @@ inherited FrameChatSettings: TFrameChatSettings
Size.Height = 33.000000000000000000
Size.PlatformDefault = False
end
object EditLangSrc: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
Align = Top
StyleLookup = 'editstyle_clear'
TabOrder = 6
KeyboardType = Alphabet
Position.Y = 617.000000000000000000
Margins.Top = 5.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 33.000000000000000000
Size.PlatformDefault = False
TextPrompt = 'Example: "ru" or "de"'
object ClearEditButton1: TClearEditButton
CanFocus = False
Cursor = crArrow
Hint = 'Clear'
Size.Width = 28.000000000000000000
Size.Height = 29.000000000000000000
Size.PlatformDefault = False
StyleLookup = 'buttonstyle_clearmini'
TabOrder = 0
Text = 'buttonstyle_clearmini'
object Path4: TPath
Align = Center
Data.Path = {
0E00000000000000000060413333B33F010000009A9949410000000001000000
0000E0403333B340010000003333B33F0000000001000000000000003333B33F
010000003333B3400000E04001000000000000009A994941010000003333B33F
00006041010000000000E04066660641010000009A9949410000604101000000
000060419A99494101000000666606410000E04001000000000060413333B33F
03000000000060413333B33F}
Fill.Color = xFFACACBE
Locked = True
HitTest = False
Margins.Left = 2.000000000000000000
Size.Width = 13.000000000000000000
Size.Height = 13.000000000000000000
Size.PlatformDefault = False
Stroke.Kind = None
WrapMode = Fit
end
end
end
object EditMaxTokens: TEdit
Touch.InteractiveGestures = [LongTap, DoubleTap]
Align = Top
Expand Down Expand Up @@ -241,7 +198,7 @@ inherited FrameChatSettings: TFrameChatSettings
TextSettings.HorzAlign = Center
TextSettings.WordWrap = False
Text = 'Chat Settings'
TabOrder = 23
TabOrder = 21
TabStop = False
end
object Label16: TLabel
Expand All @@ -258,7 +215,7 @@ inherited FrameChatSettings: TFrameChatSettings
TextSettings.Font.Size = 14.000000000000000000
TextSettings.FontColor = xB4FFFFFF
Text = 'Query max tokens (default: 1024)'
TabOrder = 26
TabOrder = 24
TabStop = False
end
object Label17: TLabel
Expand All @@ -277,7 +234,7 @@ inherited FrameChatSettings: TFrameChatSettings
TextSettings.Font.Family = 'Roboto'
TextSettings.FontColor = x78FFFFFF
Text = 'Limit of the selected model'
TabOrder = 14
TabOrder = 13
TabStop = False
end
object Label18: TLabel
Expand All @@ -296,7 +253,7 @@ inherited FrameChatSettings: TFrameChatSettings
TextSettings.Font.Family = 'Roboto'
TextSettings.FontColor = x78FFFFFF
Text = 'Max number of tokens per request'
TabOrder = 11
TabOrder = 10
TabStop = False
end
object Label19: TLabel
Expand All @@ -318,25 +275,7 @@ inherited FrameChatSettings: TFrameChatSettings
'GPT-4 is currently in a limited beta and only accessible to thos' +
'e who have been granted access. Please join the waitlist to get ' +
'access when capacity is available.'
TabOrder = 13
TabStop = False
end
object Label2: TLabel
Align = Top
AutoSize = True
StyledSettings = [Style]
Margins.Top = 20.000000000000000000
Margins.Bottom = 5.000000000000000000
Position.Y = 590.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 17.000000000000000000
Size.PlatformDefault = False
TextSettings.Font.Family = 'Roboto'
TextSettings.Font.Size = 14.000000000000000000
TextSettings.FontColor = xB4FFFFFF
TextSettings.WordWrap = False
Text = 'Translate to English from your lang'
TabOrder = 21
TabOrder = 12
TabStop = False
end
object Label3: TLabel
Expand All @@ -345,7 +284,7 @@ inherited FrameChatSettings: TFrameChatSettings
StyledSettings = [Style]
Margins.Top = 20.000000000000000000
Margins.Bottom = 5.000000000000000000
Position.Y = 670.000000000000000000
Position.Y = 590.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 17.000000000000000000
Size.PlatformDefault = False
Expand All @@ -354,7 +293,7 @@ inherited FrameChatSettings: TFrameChatSettings
TextSettings.FontColor = xB4FFFFFF
TextSettings.WordWrap = False
Text = 'Temperature (default: 1.0)'
TabOrder = 15
TabOrder = 14
TabStop = False
end
object Label4: TLabel
Expand All @@ -363,7 +302,7 @@ inherited FrameChatSettings: TFrameChatSettings
StyledSettings = [Style]
Margins.Top = 10.000000000000000000
Margins.Bottom = 5.000000000000000000
Position.Y = 722.000000000000000000
Position.Y = 642.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 15.000000000000000000
Size.PlatformDefault = False
Expand All @@ -372,7 +311,7 @@ inherited FrameChatSettings: TFrameChatSettings
Text =
'The higher, the more creativity will be in the answers (less acc' +
'urate)'
TabOrder = 12
TabOrder = 11
TabStop = False
end
object Label8: TLabel
Expand All @@ -389,7 +328,7 @@ inherited FrameChatSettings: TFrameChatSettings
TextSettings.Font.Size = 14.000000000000000000
TextSettings.FontColor = xB4FFFFFF
Text = 'Model (default: gpt-3.5-turbo)'
TabOrder = 28
TabOrder = 26
TabStop = False
end
object Label9: TLabel
Expand All @@ -406,16 +345,16 @@ inherited FrameChatSettings: TFrameChatSettings
TextSettings.Font.Size = 14.000000000000000000
TextSettings.FontColor = xB4FFFFFF
Text = 'Model max tokens (default: 4096)'
TabOrder = 30
TabOrder = 28
TabStop = False
end
object Layout3: TLayout
Align = Top
Position.Y = 692.000000000000000000
Position.Y = 612.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 7
TabOrder = 6
TabStop = False
object TrackBarTemp: TTrackBar
Align = Client
Expand All @@ -424,7 +363,7 @@ inherited FrameChatSettings: TFrameChatSettings
Max = 20.000000000000000000
Orientation = Horizontal
Size.Width = 370.000000000000000000
Size.Height = 20.000000000000000000
Size.Height = 19.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
Value = 10.000000000000000000
Expand All @@ -450,11 +389,11 @@ inherited FrameChatSettings: TFrameChatSettings
end
object Layout1: TLayout
Align = Top
Position.Y = 784.000000000000000000
Position.Y = 704.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 8
TabOrder = 7
TabStop = False
object TrackBarPP: TTrackBar
Align = Client
Expand All @@ -464,7 +403,7 @@ inherited FrameChatSettings: TFrameChatSettings
Min = -20.000000000000000000
Orientation = Horizontal
Size.Width = 370.000000000000000000
Size.Height = 20.000000000000000000
Size.Height = 19.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
OnTracking = TrackBarPPTracking
Expand Down Expand Up @@ -493,7 +432,7 @@ inherited FrameChatSettings: TFrameChatSettings
StyledSettings = [Style]
Margins.Top = 20.000000000000000000
Margins.Bottom = 5.000000000000000000
Position.Y = 762.000000000000000000
Position.Y = 682.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 17.000000000000000000
Size.PlatformDefault = False
Expand All @@ -502,7 +441,7 @@ inherited FrameChatSettings: TFrameChatSettings
TextSettings.FontColor = xB4FFFFFF
TextSettings.WordWrap = False
Text = 'Presence penalty (default: 0.0)'
TabOrder = 25
TabOrder = 23
TabStop = False
end
object Label11: TLabel
Expand All @@ -514,7 +453,7 @@ inherited FrameChatSettings: TFrameChatSettings
Margins.Right = 5.000000000000000000
Margins.Bottom = 5.000000000000000000
Position.X = 5.000000000000000000
Position.Y = 814.000000000000000000
Position.Y = 734.000000000000000000
Size.Width = 394.000000000000000000
Size.Height = 44.000000000000000000
Size.PlatformDefault = False
Expand All @@ -524,7 +463,7 @@ inherited FrameChatSettings: TFrameChatSettings
'Number between -2.0 and 2.0. Positive values penalize new tokens' +
' based on whether they appear in the text so far, increasing the' +
' model'#39's likelihood to talk about new topics.'
TabOrder = 20
TabOrder = 19
TabStop = False
end
object Label15: TLabel
Expand All @@ -533,7 +472,7 @@ inherited FrameChatSettings: TFrameChatSettings
StyledSettings = [Style]
Margins.Top = 20.000000000000000000
Margins.Bottom = 5.000000000000000000
Position.Y = 883.000000000000000000
Position.Y = 803.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 17.000000000000000000
Size.PlatformDefault = False
Expand All @@ -542,16 +481,16 @@ inherited FrameChatSettings: TFrameChatSettings
TextSettings.FontColor = xB4FFFFFF
TextSettings.WordWrap = False
Text = 'Frequency penalty (default: 0.0)'
TabOrder = 22
TabOrder = 20
TabStop = False
end
object Layout5: TLayout
Align = Top
Position.Y = 905.000000000000000000
Position.Y = 825.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 9
TabOrder = 8
TabStop = False
object TrackBarFP: TTrackBar
Align = Client
Expand Down Expand Up @@ -593,7 +532,7 @@ inherited FrameChatSettings: TFrameChatSettings
Margins.Right = 5.000000000000000000
Margins.Bottom = 5.000000000000000000
Position.X = 5.000000000000000000
Position.Y = 935.000000000000000000
Position.Y = 855.000000000000000000
Size.Width = 394.000000000000000000
Size.Height = 44.000000000000000000
Size.PlatformDefault = False
Expand All @@ -603,7 +542,7 @@ inherited FrameChatSettings: TFrameChatSettings
'Number between -2.0 and 2.0. Positive values penalize new tokens' +
' based on their existing frequency in the text so far, decreasin' +
'g the model'#39's likelihood to repeat the same line verbatim.'
TabOrder = 17
TabOrder = 16
TabStop = False
end
object Label28: TLabel
Expand All @@ -615,7 +554,7 @@ inherited FrameChatSettings: TFrameChatSettings
Margins.Right = 5.000000000000000000
Margins.Bottom = 5.000000000000000000
Position.X = 5.000000000000000000
Position.Y = 1056.000000000000000000
Position.Y = 976.000000000000000000
Size.Width = 394.000000000000000000
Size.Height = 73.000000000000000000
Size.PlatformDefault = False
Expand All @@ -627,16 +566,16 @@ inherited FrameChatSettings: TFrameChatSettings
'op_p probability mass. So 0.1 means only the tokens comprising t' +
'he top 10% probability mass are considered.'#13#10'We generally recomm' +
'end altering this or temperature but not both.'
TabOrder = 16
TabOrder = 15
TabStop = False
end
object Layout6: TLayout
Align = Top
Position.Y = 1026.000000000000000000
Position.Y = 946.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 10
TabOrder = 9
TabStop = False
object TrackBarTopP: TTrackBar
Align = Client
Expand Down Expand Up @@ -675,7 +614,7 @@ inherited FrameChatSettings: TFrameChatSettings
StyledSettings = [Style]
Margins.Top = 20.000000000000000000
Margins.Bottom = 5.000000000000000000
Position.Y = 1004.000000000000000000
Position.Y = 924.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 17.000000000000000000
Size.PlatformDefault = False
Expand All @@ -684,7 +623,7 @@ inherited FrameChatSettings: TFrameChatSettings
TextSettings.FontColor = xB4FFFFFF
TextSettings.WordWrap = False
Text = 'Top P (default: 1.0)'
TabOrder = 19
TabOrder = 18
TabStop = False
end
object LabelAppearance: TLabel
Expand Down Expand Up @@ -762,7 +701,7 @@ inherited FrameChatSettings: TFrameChatSettings
Text =
'In an API call, you can describe functions to gpt-3.5-turbo-0613' +
', gpt-3.5-turbo-16k and gpt-4-0613'
TabOrder = 18
TabOrder = 17
TabStop = False
end
object Layout9: TLayout
Expand Down Expand Up @@ -805,11 +744,11 @@ inherited FrameChatSettings: TFrameChatSettings
end
object Layout2: TLayout
Align = Top
Position.Y = 1134.000000000000000000
Position.Y = 1054.000000000000000000
Size.Width = 404.000000000000000000
Size.Height = 20.000000000000000000
Size.PlatformDefault = False
TabOrder = 32
TabOrder = 30
end
end
end
Expand Down
4 changes: 0 additions & 4 deletions ChatGPT.ChatSettings.pas
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ TFrameChatSettings = class(TFrameOveraly)
ButtonOk: TButton;
VertScrollBox: TVertScrollBox;
ComboEditModel: TComboEdit;
EditLangSrc: TEdit;
ClearEditButton1: TClearEditButton;
Path4: TPath;
EditMaxTokens: TEdit;
ClearEditButton3: TClearEditButton;
Path2: TPath;
Expand All @@ -31,7 +28,6 @@ TFrameChatSettings = class(TFrameOveraly)
Label17: TLabel;
Label18: TLabel;
Label19: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label8: TLabel;
Expand Down
6 changes: 3 additions & 3 deletions ChatGPT.FrameChat.fmx
Original file line number Diff line number Diff line change
Expand Up @@ -941,14 +941,14 @@ object FrameChat: TFrameChat
OnKeyUp = MemoQueryKeyUp
OnKeyDown = MemoQueryKeyDown
OnViewportPositionChange = MemoQueryViewportPositionChange
Viewport.Width = 620.000000000000000000
Viewport.Width = 610.000000000000000000
Viewport.Height = 26.000000000000000000
object LabelSendTip: TLabel
Align = Client
StyledSettings = [Family, Style]
Opacity = 0.800000011920929000
Size.Width = 50.000000000000000000
Size.Height = 50.000000000000000000
Size.Width = 610.000000000000000000
Size.Height = 26.000000000000000000
Size.PlatformDefault = False
TextSettings.Font.Size = 16.000000000000000000
TextSettings.FontColor = xFFACACBE
Expand Down
Loading

0 comments on commit 45979a4

Please sign in to comment.