This repository has been archived by the owner on May 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
OpenAIPG.Frame.Code.fmx
95 lines (94 loc) · 3.08 KB
/
OpenAIPG.Frame.Code.fmx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
object FrameCode: TFrameCode
Size.Width = 450.000000000000000000
Size.Height = 269.000000000000000000
Size.PlatformDefault = False
object Rectangle1: TRectangle
Align = Client
Fill.Color = xFF202123
Size.Width = 450.000000000000000000
Size.Height = 269.000000000000000000
Size.PlatformDefault = False
Stroke.Kind = None
XRadius = 4.000000000000000000
YRadius = 4.000000000000000000
object Rectangle2: TRectangle
Align = Top
Corners = [TopLeft, TopRight]
Fill.Color = xFF353740
Padding.Left = 12.000000000000000000
Padding.Top = 6.000000000000000000
Padding.Right = 12.000000000000000000
Padding.Bottom = 6.000000000000000000
Size.Width = 450.000000000000000000
Size.Height = 36.000000000000000000
Size.PlatformDefault = False
Stroke.Kind = None
XRadius = 4.000000000000000000
YRadius = 4.000000000000000000
object LabelTitle: TLabel
Align = Client
StyledSettings = [Style]
Size.Width = 354.000000000000000000
Size.Height = 24.000000000000000000
Size.PlatformDefault = False
TextSettings.Font.Family = 'Roboto'
TextSettings.Font.Size = 14.000000000000000000
TextSettings.FontColor = xFFC5C5D2
Text = 'Example code'
TabOrder = 0
end
object ButtonCopy: TButton
Align = Right
Position.X = 366.000000000000000000
Position.Y = 6.000000000000000000
Size.Width = 72.000000000000000000
Size.Height = 24.000000000000000000
Size.PlatformDefault = False
StyleLookup = 'button_dark_clear'
TabOrder = 1
Text = 'Copy'
OnClick = ButtonCopyClick
end
end
object MemoCode: TMemo
Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]
Caret.Color = x00FFFFFF
DataDetectorTypes = []
DisableMouseWheel = True
Lines.Strings = (
'var Completions := OpenAI.Completion.Create('
' procedure(Params: TCompletionParams)'
' begin'
' Params.Prompt(MemoPrompt.Text);'
' Params.MaxTokens(2048);'
' end);'
'try'
' for var Choice in Completions.Choices do'
' MemoChat.Lines.Add(Choice.Index.ToString + '#39' '#39' + Choice.Text' +
');'
'finally'
' Completions.Free;'
'end;')
ReadOnly = True
ShowScrollBars = False
StyledSettings = [Style]
TextSettings.Font.Family = 'Consolas'
TextSettings.Font.Size = 15.000000000000000000
TextSettings.FontColor = xFFC6C6C6
Align = Client
Cursor = crArrow
EnabledScroll = False
Margins.Left = 5.000000000000000000
Margins.Top = 5.000000000000000000
Margins.Right = 5.000000000000000000
Margins.Bottom = 5.000000000000000000
Size.Width = 440.000000000000000000
Size.Height = 223.000000000000000000
Size.PlatformDefault = False
StyleLookup = 'memo_style'
TabOrder = 1
Viewport.Width = 440.000000000000000000
Viewport.Height = 223.000000000000000000
end
end
end