diff --git a/CodeDroidAI.dproj b/CodeDroidAI.dproj index 1dc0b97..b67d1f1 100644 --- a/CodeDroidAI.dproj +++ b/CodeDroidAI.dproj @@ -271,8 +271,8 @@ PerMonitorV2 true 1033 - 1 - CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.1.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.1.0;Comments= + 2 + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.2.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.2.0;Comments= PerMonitorV2 diff --git a/uMainForm.fmx b/uMainForm.fmx index 45ccc49..33d5dbc 100644 --- a/uMainForm.fmx +++ b/uMainForm.fmx @@ -1,7 +1,7 @@ object MainForm: TMainForm Left = 0 Top = 0 - ClientHeight = 831 + ClientHeight = 888 ClientWidth = 1197 StyleBook = MaterialOxfordBlueSB FormFactor.Width = 320 @@ -97,7 +97,11 @@ object MainForm: TMainForm 'llama70b-v2-chat' 'llama13b-v2-chat' 'freewilly2' - 'fastervicuna_13b') + 'fastervicuna_13b' + 'codellama-13b' + 'codellama-34b' + 'wizardcoder-34b' + 'codellama-7b') ItemIndex = 0 Size.Width = 233.000000000000000000 Size.Height = 38.000000000000000000 @@ -107,7 +111,7 @@ object MainForm: TMainForm end end object StatusBar1: TStatusBar - Position.Y = 809.000000000000000000 + Position.Y = 866.000000000000000000 ShowSizeGrip = True Size.Width = 1197.000000000000000000 Size.Height = 22.000000000000000000 @@ -96366,20 +96370,20 @@ object MainForm: TMainForm Align = Client FullSize = True Size.Width = 1197.000000000000000000 - Size.Height = 761.000000000000000000 + Size.Height = 818.000000000000000000 Size.PlatformDefault = False TabIndex = 0 TabOrder = 20 TabPosition = Bottom Sizes = ( 1197s - 737s + 794s 1197s - 737s + 794s 1197s - 737s + 794s 1197s - 737s) + 794s) object TabItem6: TTabItem CustomIcon = < item @@ -96396,15 +96400,15 @@ object MainForm: TMainForm object CardsVSB: TVertScrollBox Align = Client Size.Width = 1197.000000000000000000 - Size.Height = 737.000000000000000000 + Size.Height = 794.000000000000000000 Size.PlatformDefault = False TabOrder = 0 Viewport.Width = 1197.000000000000000000 - Viewport.Height = 737.000000000000000000 + Viewport.Height = 794.000000000000000000 object FlowLayout: TFlowLayout Align = Top Size.Width = 1197.000000000000000000 - Size.Height = 737.000000000000000000 + Size.Height = 793.000000000000000000 Size.PlatformDefault = False TabOrder = 0 Justify = Left @@ -96487,7 +96491,7 @@ object MainForm: TMainForm Align = Left Position.Y = 168.000000000000000000 Size.Width = 345.000000000000000000 - Size.Height = 569.000000000000000000 + Size.Height = 626.000000000000000000 Size.PlatformDefault = False TabOrder = 5 object InputCB: TComboBox @@ -96534,7 +96538,7 @@ object MainForm: TMainForm object Layout14: TLayout Align = Client Size.Width = 345.000000000000000000 - Size.Height = 547.000000000000000000 + Size.Height = 562.000000000000000000 Size.PlatformDefault = False TabOrder = 1 object InputMemo: TMemo @@ -96543,11 +96547,11 @@ object MainForm: TMainForm OnChangeTracking = InputMemoChangeTracking Align = Contents Size.Width = 345.000000000000000000 - Size.Height = 547.000000000000000000 + Size.Height = 562.000000000000000000 Size.PlatformDefault = False TabOrder = 0 Viewport.Width = 341.000000000000000000 - Viewport.Height = 543.000000000000000000 + Viewport.Height = 558.000000000000000000 object HintLabel: TLabel Align = Contents Opacity = 0.500000000000000000 @@ -96556,15 +96560,16 @@ object MainForm: TMainForm Margins.Right = 25.000000000000000000 Margins.Bottom = 25.000000000000000000 Size.Width = 291.000000000000000000 - Size.Height = 493.000000000000000000 + Size.Height = 508.000000000000000000 Size.PlatformDefault = False TextSettings.VertAlign = Leading TabOrder = 0 end end object Layout11: TLayout - Align = Top + Align = Bottom Opacity = 0.250000000000000000 + Position.Y = 505.000000000000000000 Size.Width = 345.000000000000000000 Size.Height = 57.000000000000000000 Size.PlatformDefault = False @@ -96605,11 +96610,47 @@ object MainForm: TMainForm end end end + object Layout16: TLayout + Align = Bottom + Position.Y = 584.000000000000000000 + Size.Width = 345.000000000000000000 + Size.Height = 42.000000000000000000 + Size.PlatformDefault = False + TabOrder = 2 + object FilePathEdit: TEdit + Touch.InteractiveGestures = [LongTap, DoubleTap] + Align = Client + TabOrder = 0 + Margins.Left = 3.000000000000000000 + Margins.Top = 3.000000000000000000 + Margins.Right = 3.000000000000000000 + Margins.Bottom = 3.000000000000000000 + Size.Width = 253.000000000000000000 + Size.Height = 36.000000000000000000 + Size.PlatformDefault = False + TextPrompt = 'Attach a file to the prompt...' + end + object OpenButton: TButton + Align = Right + Margins.Left = 3.000000000000000000 + Margins.Top = 3.000000000000000000 + Margins.Right = 3.000000000000000000 + Margins.Bottom = 3.000000000000000000 + Position.X = 262.000000000000000000 + Position.Y = 3.000000000000000000 + Size.Width = 80.000000000000000000 + Size.Height = 36.000000000000000000 + Size.PlatformDefault = False + TabOrder = 1 + Text = 'Open' + OnClick = OpenButtonClick + end + end end object Layout2: TLayout Align = Client Size.Width = 537.000000000000000000 - Size.Height = 569.000000000000000000 + Size.Height = 626.000000000000000000 Size.PlatformDefault = False TabOrder = 6 object OutputCB: TComboBox @@ -96656,7 +96697,7 @@ object MainForm: TMainForm end object Layout8: TLayout Align = Bottom - Position.Y = 527.000000000000000000 + Position.Y = 584.000000000000000000 Size.Width = 537.000000000000000000 Size.Height = 42.000000000000000000 Size.PlatformDefault = False @@ -96708,7 +96749,7 @@ object MainForm: TMainForm object Layout15: TLayout Align = Client Size.Width = 537.000000000000000000 - Size.Height = 505.000000000000000000 + Size.Height = 562.000000000000000000 Size.PlatformDefault = False TabOrder = 2 object OutputMemo: TMemo @@ -96717,15 +96758,16 @@ object MainForm: TMainForm OnChange = OutputMemoChange Align = Contents Size.Width = 537.000000000000000000 - Size.Height = 505.000000000000000000 + Size.Height = 562.000000000000000000 Size.PlatformDefault = False TabOrder = 0 Viewport.Width = 533.000000000000000000 - Viewport.Height = 501.000000000000000000 + Viewport.Height = 558.000000000000000000 end object Layout12: TLayout - Align = Top + Align = Bottom Opacity = 0.250000000000000000 + Position.Y = 505.000000000000000000 Size.Width = 537.000000000000000000 Size.Height = 57.000000000000000000 Size.PlatformDefault = False @@ -96777,18 +96819,18 @@ object MainForm: TMainForm Position.X = 895.000000000000000000 Position.Y = 171.000000000000000000 Size.Width = 299.000000000000000000 - Size.Height = 563.000000000000000000 + Size.Height = 620.000000000000000000 Size.PlatformDefault = False TabIndex = 2 TabOrder = 0 TabPosition = Bottom Sizes = ( 299s - 539s + 596s 299s - 539s + 596s 299s - 539s) + 596s) object TabItem1: TTabItem CustomIcon = < item @@ -96814,7 +96856,7 @@ object MainForm: TMainForm Margins.Right = 3.000000000000000000 Margins.Bottom = 3.000000000000000000 Size.Width = 293.000000000000000000 - Size.Height = 483.000000000000000000 + Size.Height = 540.000000000000000000 Size.PlatformDefault = False TabOrder = 0 end @@ -96898,11 +96940,11 @@ object MainForm: TMainForm Margins.Right = 3.000000000000000000 Margins.Bottom = 3.000000000000000000 Size.Width = 293.000000000000000000 - Size.Height = 533.000000000000000000 + Size.Height = 590.000000000000000000 Size.PlatformDefault = False TabOrder = 0 Viewport.Width = 293.000000000000000000 - Viewport.Height = 533.000000000000000000 + Viewport.Height = 590.000000000000000000 object Layout4: TLayout Align = Top Size.Width = 293.000000000000000000 @@ -97123,15 +97165,16 @@ object MainForm: TMainForm Margins.Right = 3.000000000000000000 Margins.Bottom = 3.000000000000000000 Size.Width = 293.000000000000000000 - Size.Height = 533.000000000000000000 + Size.Height = 590.000000000000000000 Size.PlatformDefault = False TabOrder = 0 Viewport.Width = 289.000000000000000000 - Viewport.Height = 529.000000000000000000 + Viewport.Height = 586.000000000000000000 end object Layout13: TLayout - Align = Top + Align = Bottom Opacity = 0.250000000000000000 + Position.Y = 539.000000000000000000 Size.Width = 299.000000000000000000 Size.Height = 57.000000000000000000 Size.PlatformDefault = False @@ -97194,7 +97237,7 @@ object MainForm: TMainForm Position.X = 345.000000000000000000 Position.Y = 168.000000000000000000 Size.Width = 5.000000000000000000 - Size.Height = 569.000000000000000000 + Size.Height = 626.000000000000000000 Size.PlatformDefault = False end object Splitter2: TSplitter @@ -97204,7 +97247,7 @@ object MainForm: TMainForm Position.X = 887.000000000000000000 Position.Y = 168.000000000000000000 Size.Width = 5.000000000000000000 - Size.Height = 569.000000000000000000 + Size.Height = 626.000000000000000000 Size.PlatformDefault = False end end @@ -97230,18 +97273,18 @@ object MainForm: TMainForm Margins.Right = 3.000000000000000000 Margins.Bottom = 3.000000000000000000 Size.Width = 1191.000000000000000000 - Size.Height = 706.000000000000000000 + Size.Height = 763.000000000000000000 Size.PlatformDefault = False TabOrder = 0 RowCount = 0 Options = [AlternatingRowBackground, ColumnResize, ColumnMove, ColLines, RowLines, RowSelect, Tabs, Header, HeaderClick, AutoDisplacement] OnSelChanged = HistoryGridSelChanged Viewport.Width = 1187.000000000000000000 - Viewport.Height = 681.000000000000000000 + Viewport.Height = 738.000000000000000000 end object BindNavigator1: TBindNavigator Align = Bottom - Position.Y = 712.000000000000000000 + Position.Y = 769.000000000000000000 Size.Width = 1197.000000000000000000 Size.Height = 25.000000000000000000 Size.PlatformDefault = False @@ -97295,7 +97338,7 @@ object MainForm: TMainForm end object BindNavigator2: TBindNavigator Align = Bottom - Position.Y = 672.000000000000000000 + Position.Y = 729.000000000000000000 Size.Width = 1197.000000000000000000 Size.Height = 25.000000000000000000 Size.PlatformDefault = False @@ -97491,7 +97534,7 @@ object MainForm: TMainForm end object Button1: TButton Align = Bottom - Position.Y = 697.000000000000000000 + Position.Y = 754.000000000000000000 Size.Width = 1197.000000000000000000 Size.Height = 40.000000000000000000 Size.PlatformDefault = False @@ -98136,7 +98179,7 @@ object MainForm: TMainForm Left = 368 Top = 320 Content = { - 414442531000000079500000FF00010001FF02FF03040016000000540065006D + 414442531000000073600000FF00010001FF02FF03040016000000540065006D 0070006C0061007400650073004D005400050016000000540065006D0070006C 0061007400650073004D005400060000000000070000080032000000090000FF 0AFF0B04000400000069006400050004000000690064000C00010000000E000D @@ -98779,31 +98822,159 @@ object MainForm: TMainForm 6D00700069006C0065002000440065006C0070006800690020004F0062006A00 6500630074002000500061007300630061006C00200063006F00640065002000 6100660074006500720020007400720061006E0073006C006100740069006F00 - 6E002E00FEFEFEFEFEFF22FEFF2324004E000000FF25FEFEFE0E004D0061006E - 0061006700650072001E00550070006400610074006500730052006500670069 - 00730074007200790012005400610062006C0065004C006900730074000A0054 - 00610062006C00650008004E0061006D006500140053006F0075007200630065 - 004E0061006D0065000A0054006100620049004400240045006E0066006F0072 - 006300650043006F006E00730074007200610069006E00740073001E004D0069 - 006E0069006D0075006D00430061007000610063006900740079001800430068 - 00650063006B004E006F0074004E0075006C006C00140043006F006C0075006D - 006E004C006900730074000C0043006F006C0075006D006E00100053006F0075 - 00720063006500490044000E006400740049006E007400330032001000440061 - 007400610054007900700065001400530065006100720063006800610062006C - 006500120041006C006C006F0077004E0075006C006C00080042006100730065 - 0014004F0041006C006C006F0077004E0075006C006C0012004F0049006E0055 - 007000640061007400650010004F0049006E00570068006500720065001A004F - 0072006900670069006E0043006F006C004E0061006D00650018006400740057 - 0069006400650053007400720069006E0067000800530069007A006500140053 - 006F007500720063006500530069007A006500100042006C006F006200440061 - 00740061001C0043006F006E00730074007200610069006E0074004C00690073 - 007400100056006900650077004C006900730074000E0052006F0077004C0069 - 0073007400060052006F0077000A0052006F0077004900440016007200730055 - 006E006300680061006E006700650064001A0052006F0077005000720069006F - 0072005300740061007400650010004F0072006900670069006E0061006C0018 - 00520065006C006100740069006F006E004C006900730074001C005500700064 - 0061007400650073004A006F00750072006E0061006C00120053006100760065 - 0050006F0069006E0074000E004300680061006E00670065007300} + 6E002E00FEFEFF1D1E000C00000020001F00FF2100000D000000010004000000 + 3ED816DD020020000000430072006500610074006500200055006E0069007400 + 200054006500730074000300700000004100750074006F006D00610074006900 + 630061006C006C00790020006300720065006100740065002000610020007300 + 68006F0072007400200075006E00690074002000740065007300740020006600 + 6F007200200061002000730068006F0072007400200075006E00690074002E00 + 0400D80E000059006F0075002000610072006500200074006800650020006200 + 650073007400200061006E00640020006D006F00730074002000650078007000 + 65007200690065006E0063006500640020003100300078002000700072006F00 + 6700720061006D006D0065007200200069006E00200061006C006C0020007000 + 72006F006700720061006D006D0069006E00670020006C0061006E0067007500 + 61006700650073002E0020004300720065006100740065002000610020007500 + 6E006900740020007400650073007400200075006E0069007400200075007300 + 69006E00670020007400680065002000440055006E0069007400580020006C00 + 690062007200610072007900200069006E002000220025006F00750074007000 + 750074006C0061006E00670025002200200063006F00640065002E0020004E00 + 650076006500720020006500780070006C00610069006E002000740068006500 + 200063006F00640065002E00200044006F0020006E006F007400200069006E00 + 63006C0075006400650020005C0060005C0060005C0060002E00200048006500 + 720065002000690073002000740068006500200075006E006900740020007400 + 6F00200063007200650061007400650020006100200074006500730074002000 + 66006F007200200022002500700072006F006D0070007400250022002E000D00 + 0A000D000A004800650072006500200069007300200061006E00200065007800 + 61006D0070006C006500200075006E00690074003A000D000A000D000A002000 + 75006E00690074002000430061006C00630055006E00690074003B000D000A00 + 20000D000A00200069006E0074006500720066006100630065000D000A002000 + 0D000A00200074007900700065000D000A0020000D000A0020007B0020005400 + 430061006C00630020007D000D000A0020000D000A0020002000200054004300 + 61006C00630020003D00200063006C006100730073000D000A00200020002000 + 7000750062006C00690063000D000A0020002000200020002000660075006E00 + 6300740069006F006E002000410064006400280078002C00200079003A002000 + 49006E007400650067006500720029003A00200049006E007400650067006500 + 72003B000D000A0020002000200020002000660075006E006300740069006F00 + 6E002000530075006200280078002C00200079003A00200049006E0074006500 + 67006500720029003A00200049006E00740065006700650072003B000D000A00 + 20002000200065006E0064003B000D000A0020000D000A00200069006D007000 + 6C0065006D0065006E0074006100740069006F006E000D000A0020000D000A00 + 20007B0020005400430061006C00630020007D000D000A0020000D000A002000 + 660075006E006300740069006F006E0020005400430061006C0063002E004100 + 64006400280078002C00200079003A00200049006E0074006500670065007200 + 29003A00200049006E00740065006700650072003B000D000A00200062006500 + 670069006E000D000A0020002000200052006500730075006C00740020003A00 + 3D002000780020002B00200079003B000D000A00200065006E0064003B000D00 + 0A0020000D000A002000660075006E006300740069006F006E00200054004300 + 61006C0063002E00530075006200280058002C00200059003A00200049006E00 + 7400650067006500720029003A00200049006E00740065006700650072003B00 + 0D000A00200062006500670069006E000D000A00200020002000520065007300 + 75006C00740020003A003D002000780020002D00200079003B000D000A002000 + 65006E0064003B000D000A0020000D000A00200065006E0064002E000D000A00 + 0D000A004800650072006500200069007300200061006E002000650078006100 + 6D0070006C006500200075006E00690074002000740065007300740069006E00 + 67002000440055006E00690074005800200075006E00690074003A000D000A00 + 0D000A0075006E006900740020005400650073007400430061006C0063005500 + 6E00690074003B000D000A000D000A0069006E00740065007200660061006300 + 65000D000A0075007300650073000D000A0020002000440055006E0069007400 + 58002E0054006500730074004600720061006D00650077006F0072006B002C00 + 2000430061006C00630055006E00690074003B000D000A000D000A0074007900 + 700065000D000A000D000A00200020005B005400650073007400460069007800 + 74007500720065005D000D000A00200020005400650073007400540043006100 + 6C00630020003D00200063006C00610073007300280054004F0062006A006500 + 6300740029000D000A0020002000730074007200690063007400200070007200 + 690076006100740065000D000A00200020002000200061005400430061006C00 + 63003A0020005400430061006C0063003B000D000A0020002000700075006200 + 6C00690063000D000A0020002000200020005B00530065007400750070005D00 + 0D000A002000200020002000700072006F006300650064007500720065002000 + 530065007400750070003B000D000A0020002000200020005B00540065006100 + 720044006F0077006E005D000D000A002000200020002000700072006F006300 + 650064007500720065002000540065006100720044006F0077006E003B000D00 + 0A0020002000200020002F002F002000530061006D0070006C00650020004D00 + 6500740068006F00640073000D000A0020002000200020002F002F0020005400 + 6500730074002000770069007400680020005400650073007400430061007300 + 6500200041007400720069006200750074006500200074006F00200073007500 + 700070006C007900200070006100720061006D00650074006500720073002E00 + 0D000A0020002000200020005B00540065007300740043006100730065002800 + 27005400650073007400410027002C00270038002C0032002C00310030002700 + 29005D000D000A002000200020002000700072006F0063006500640075007200 + 6500200054006500730074004100640064002800560061006C00750065003100 + 2C002000560061006C007500650032002C0020005F0052006500730075006C00 + 74003A00200049006E007400650067006500720029003B000D000A0020002000 + 200020002F002F00200054006500730074002000770069007400680020005400 + 6500730074004300610073006500200041007400720069006200750074006500 + 200074006F00200073007500700070006C007900200070006100720061006D00 + 650074006500720073002E000D000A0020002000200020005B00540065007300 + 74004300610073006500280027005400650073007400420027002C0027003300 + 2C0034002C002D003100270029005D000D000A00200020002000200070007200 + 6F00630065006400750072006500200054006500730074005300750062002800 + 560061006C007500650031002C002000560061006C007500650032002C002000 + 5F0052006500730075006C0074003A00200049006E0074006500670065007200 + 29003B000D000A002000200065006E0064003B000D000A000D000A0069006D00 + 70006C0065006D0065006E0074006100740069006F006E000D000A000D000A00 + 700072006F006300650064007500720065002000540065007300740054004300 + 61006C0063002E00530065007400750070003B000D000A006200650067006900 + 6E000D000A002000200061005400430061006C00630020003A003D0020005400 + 430061006C0063002E004300720065006100740065003B000D000A0065006E00 + 64003B000D000A000D000A00700072006F006300650064007500720065002000 + 54006500730074005400430061006C0063002E00540065006100720044006F00 + 77006E003B000D000A0062006500670069006E000D000A002000200061005400 + 430061006C00630020003A003D0020006E0069006C003B000D000A0065006E00 + 64003B000D000A000D000A00700072006F006300650064007500720065002000 + 54006500730074005400430061006C0063002E00540065007300740041006400 + 64002800560061006C007500650031002C002000560061006C00750065003200 + 2C0020005F0052006500730075006C0074003A00200049006E00740065006700 + 6500720029003B000D000A007600610072000D000A002000200052003A002000 + 49006E00740065006700650072003B000D000A0062006500670069006E000D00 + 0A0020002000520020003A003D00200061005400430061006C0063002E004100 + 640064002800560061006C007500650031002C002000560061006C0075006500 + 320029003B000D000A00200020004100730073006500720074002E0041007200 + 650045007100750061006C00280052002C0020005F0052006500730075006C00 + 740029003B002000200020002F002F002000740065007300740063006F006400 + 65000D000A0065006E0064003B000D000A000D000A00700072006F0063006500 + 6400750072006500200054006500730074005400430061006C0063002E005400 + 6500730074005300750062002800560061006C007500650031002C0020005600 + 61006C007500650032002C0020005F0052006500730075006C0074003A002000 + 49006E007400650067006500720029003B000D000A007600610072000D000A00 + 2000200052003A00200049006E00740065006700650072003B000D000A006200 + 6500670069006E000D000A0020002000520020003A003D002000610054004300 + 61006C0063002E005300750062002800560061006C007500650031002C002000 + 560061006C0075006500320029003B000D000A00200020004100730073006500 + 720074002E0041007200650045007100750061006C00280052002C0020005F00 + 52006500730075006C00740029003B00200020002F002F002000740065007300 + 740063006F00640065000D000A00200065006E0064003B000D000A000D000A00 + 69006E0069007400690061006C0069007A006100740069006F006E000D000A00 + 200020005400440055006E006900740058002E00520065006700690073007400 + 6500720054006500730074004600690078007400750072006500280054006500 + 730074005400430061006C00630029003B000D000A0065006E0064002E000500 + 5A00000045006E007400650072002000740068006500200063006F0064006500 + 200066006F007200200079006F0075007200200075006E006900740020006900 + 6E0074006F0020007400680065002000700072006F006D00700074002E00FEFE + FEFEFEFF22FEFF23240056000000FF25FEFEFE0E004D0061006E006100670065 + 0072001E00550070006400610074006500730052006500670069007300740072 + 00790012005400610062006C0065004C006900730074000A005400610062006C + 00650008004E0061006D006500140053006F0075007200630065004E0061006D + 0065000A0054006100620049004400240045006E0066006F0072006300650043 + 006F006E00730074007200610069006E00740073001E004D0069006E0069006D + 0075006D0043006100700061006300690074007900180043006800650063006B + 004E006F0074004E0075006C006C00140043006F006C0075006D006E004C0069 + 00730074000C0043006F006C0075006D006E00100053006F0075007200630065 + 00490044000E006400740049006E007400330032001000440061007400610054 + 007900700065001400530065006100720063006800610062006C006500120041 + 006C006C006F0077004E0075006C006C000800420061007300650014004F0041 + 006C006C006F0077004E0075006C006C0012004F0049006E0055007000640061 + 007400650010004F0049006E00570068006500720065001A004F007200690067 + 0069006E0043006F006C004E0061006D00650018006400740057006900640065 + 0053007400720069006E0067000800530069007A006500140053006F00750072 + 0063006500530069007A006500100042006C006F00620044006100740061001C + 0043006F006E00730074007200610069006E0074004C00690073007400100056 + 006900650077004C006900730074000E0052006F0077004C0069007300740006 + 0052006F0077000A0052006F0077004900440016007200730055006E00630068 + 0061006E006700650064001A0052006F0077005000720069006F007200530074 + 0061007400650010004F0072006900670069006E0061006C001800520065006C + 006100740069006F006E004C006900730074001C005500700064006100740065 + 0073004A006F00750072006E0061006C001200530061007600650050006F0069 + 006E0074000E004300680061006E00670065007300} end object BindSourceDB8: TBindSourceDB DataSet = TemplatesMT @@ -99026,7 +99197,7 @@ object MainForm: TMainForm Left = 275 Top = 323 Content = { - 4144425310000000290A0000FF00010001FF02FF030400100000004D006F0064 + 41444253100000002E0D0000FF00010001FF02FF030400100000004D006F0064 0065006C0073004D0054000500100000004D006F00640065006C0073004D0054 00060000000000070000080032000000090000FF0AFF0B0400080000004E0061 006D0065000500080000004E0061006D0065000C00010000000E000D000F0080 @@ -99106,32 +99277,56 @@ object MainForm: TMainForm 3500390064003600320033003800620030006600630061006300320034003800 3300350038003900610061003600380039006300650065003600610062006500 6300390038006200310064006400630036003400380035003700380002001200 - 00007200650070006C0069006300610074006500FEFEFEFEFEFF21FEFF222300 - 28000000FF24FEFEFE0E004D0061006E0061006700650072001E005500700064 - 0061007400650073005200650067006900730074007200790012005400610062 - 006C0065004C006900730074000A005400610062006C00650008004E0061006D - 006500140053006F0075007200630065004E0061006D0065000A005400610062 - 0049004400240045006E0066006F0072006300650043006F006E007300740072 - 00610069006E00740073001E004D0069006E0069006D0075006D004300610070 - 0061006300690074007900180043006800650063006B004E006F0074004E0075 - 006C006C00140043006F006C0075006D006E004C006900730074000C0043006F - 006C0075006D006E00100053006F007500720063006500490044001800640074 - 0041006E007300690053007400720069006E0067001000440061007400610054 - 007900700065000800530069007A006500140053006500610072006300680061 - 0062006C006500120041006C006C006F0077004E0075006C006C000800420061 - 007300650014004F0041006C006C006F0077004E0075006C006C0012004F0049 - 006E0055007000640061007400650010004F0049006E00570068006500720065 - 001A004F0072006900670069006E0043006F006C004E0061006D006500140053 - 006F007500720063006500530069007A00650018006400740057006900640065 - 0053007400720069006E0067001C0043006F006E00730074007200610069006E - 0074004C00690073007400100056006900650077004C006900730074000E0052 - 006F0077004C00690073007400060052006F0077000A0052006F007700490044 - 0016007200730055006E006300680061006E006700650064001A0052006F0077 - 005000720069006F0072005300740061007400650010004F0072006900670069 - 006E0061006C001800520065006C006100740069006F006E004C006900730074 - 001C0055007000640061007400650073004A006F00750072006E0061006C0012 - 00530061007600650050006F0069006E0074000E004300680061006E00670065 - 007300} + 00007200650070006C0069006300610074006500FEFEFF1C1D00100000001F00 + 1E00FF2000000D000000636F64656C6C616D612D313362010080000000310063 + 0039003100340064003800340034003300300037006200300035003800380035 + 0039003900620038003300390033003400380030006100330062006100390031 + 0037006200360036003000630037006500390064006600610065003600380031 + 0035003400320062003500330032003500660032003200380064006200020012 + 0000007200650070006C0069006300610074006500FEFEFF1C1D00110000001F + 001E00FF2000000D000000636F64656C6C616D612D3334620100800000003000 + 3600360036003700310037006500350065006100640038003500350037006400 + 6600660035003500650065003800660031003100390032003400620035006300 + 3000330030003900660035006600310063006100350032006600360034006200 + 6200380065006500630034003000350066006400620033003800610037000200 + 120000007200650070006C0069006300610074006500FEFEFF1C1D0012000000 + 1F001E00FF2000000F00000077697A617264636F6465722D3334620100800000 + 0062006100650039003000320062006400380061003400300033003200660063 + 0066003200320039003500350032003300620033003800640061003900300061 + 0061006500370063006300380063006100320032003600300065003700630061 + 0039006200380034003300340061003900380031006400330032003200370038 + 000200120000007200650070006C0069006300610074006500FEFEFF1C1D0013 + 0000001F001E00FF2000000C000000636F64656C6C616D612D37620100800000 + 0036003800380030006200310030003300360031003300610039006300640032 + 0033003900350030006300350066006400360063003100340030003100390037 + 0065003500310039003900300035006200640030006400640030003000650034 + 0034003800630034003800350038006200640064003000360030003900300061 + 000200120000007200650070006C0069006300610074006500FEFEFEFEFEFF21 + FEFF22230034000000FF24FEFEFE0E004D0061006E0061006700650072001E00 + 5500700064006100740065007300520065006700690073007400720079001200 + 5400610062006C0065004C006900730074000A005400610062006C0065000800 + 4E0061006D006500140053006F0075007200630065004E0061006D0065000A00 + 54006100620049004400240045006E0066006F0072006300650043006F006E00 + 730074007200610069006E00740073001E004D0069006E0069006D0075006D00 + 43006100700061006300690074007900180043006800650063006B004E006F00 + 74004E0075006C006C00140043006F006C0075006D006E004C00690073007400 + 0C0043006F006C0075006D006E00100053006F00750072006300650049004400 + 18006400740041006E007300690053007400720069006E006700100044006100 + 7400610054007900700065000800530069007A00650014005300650061007200 + 63006800610062006C006500120041006C006C006F0077004E0075006C006C00 + 0800420061007300650014004F0041006C006C006F0077004E0075006C006C00 + 12004F0049006E0055007000640061007400650010004F0049006E0057006800 + 6500720065001A004F0072006900670069006E0043006F006C004E0061006D00 + 6500140053006F007500720063006500530069007A0065001800640074005700 + 69006400650053007400720069006E0067001C0043006F006E00730074007200 + 610069006E0074004C00690073007400100056006900650077004C0069007300 + 74000E0052006F0077004C00690073007400060052006F0077000A0052006F00 + 77004900440016007200730055006E006300680061006E006700650064001A00 + 52006F0077005000720069006F0072005300740061007400650010004F007200 + 6900670069006E0061006C001800520065006C006100740069006F006E004C00 + 6900730074001C0055007000640061007400650073004A006F00750072006E00 + 61006C001200530061007600650050006F0069006E0074000E00430068006100 + 6E00670065007300} end object BindSourceDB9: TBindSourceDB DataSet = ModelsMT @@ -99139,4 +99334,10 @@ object MainForm: TMainForm Left = 544 Top = 400 end + object OpenDialog: TOpenDialog + Filter = 'Pascal Files (*.pas)|*.pas' + Options = [ofHideReadOnly, ofFileMustExist, ofEnableSizing] + Left = 299 + Top = 609 + end end diff --git a/uMainForm.pas b/uMainForm.pas index fdcd646..3fc2765 100644 --- a/uMainForm.pas +++ b/uMainForm.pas @@ -161,6 +161,10 @@ TMainForm = class(TForm) ClearErrorButton: TButton; Layout14: TLayout; Layout15: TLayout; + Layout16: TLayout; + FilePathEdit: TEdit; + OpenButton: TButton; + OpenDialog: TOpenDialog; procedure APIKeyButtonClick(Sender: TObject); procedure GenerateButtonClick(Sender: TObject); procedure BuildButtonClick(Sender: TObject); @@ -181,6 +185,7 @@ TMainForm = class(TForm) procedure CopyOutputButtonClick(Sender: TObject); procedure CopyErrorButtonClick(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure OpenButtonClick(Sender: TObject); private { Private declarations } FCard: Integer; @@ -470,6 +475,14 @@ procedure TMainForm.InputMemoChangeTracking(Sender: TObject); if HintLabel.Visible=True then HintLabel.Visible := False; end; +procedure TMainForm.OpenButtonClick(Sender: TObject); +begin + if OpenDialog.Execute then + begin + FilePathEdit.Text := OpenDialog.FileName; + end; +end; + procedure TMainForm.OutputCBChange(Sender: TObject); begin OutputMemoChange(Sender); @@ -756,12 +769,23 @@ procedure TMainForm.GenerateButtonClick(Sender: TObject); Timer.Enabled := True; TTask.Run(procedure begin + var InputText := InputMemo.Lines.Text; + + if (FilePathEdit.Text<>'') then + begin + var SL := TStringList.Create; + SL.LoadFromFile(FilePathEdit.Text); + InputText := InputText + ' And this file "' + ExtractFilePath(FilePathEdit.Text) + '" containing: ' + SL.Text; + SL.Free; + end; + if ModelsMT.FieldByName('provider').AsWideString='openai' then begin + RESTRequest1.Params[0].Value := 'Bearer ' + OAAPIKeyEdit.Text; RESTRequest1.Params[1].Value := CreateOpenAIChatJSON(ModelsMT.FieldByName('model').AsWideString, PromptMemo.Lines.Text.Replace('%inputlang%',InputCB.Selected.Text) .Replace('%outputlang%',OutputCB.Selected.Text) - .Replace('%prompt%',InputMemo.Lines.Text), 2000); + .Replace('%prompt%',InputText), 2000); RESTRequest1.Execute; if FDMemTable1.FindField('choices')<>nil then @@ -790,7 +814,7 @@ procedure TMainForm.GenerateButtonClick(Sender: TObject); RESTRequest2.Params[0].Value := 'Token ' + APIKeyEdit.Text; RESTRequest2.Params[1].Value := CreateReplicateJSON(ModelsMT.FieldByName('model').AsWideString, PromptMemo.Lines.Text.Replace('%inputlang%',InputCB.Selected.Text) .Replace('%outputlang%',OutputCB.Selected.Text) - .Replace('%prompt%',InputMemo.Lines.Text)); + .Replace('%prompt%',InputText)); RESTRequest2.Execute; if FDMemTable2.FindField('id')<>nil then