Skip to content

Commit 0f21bc0

Browse files
committed
Merge branch 'develop'
2 parents a0e0528 + ab8c6bc commit 0f21bc0

7 files changed

Lines changed: 1566 additions & 14 deletions

File tree

Samples/IANaPraticaGroup.groupproj

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
<Projects Include="ToolsetsPOO\ToolsetsPOO.dproj">
3737
<Dependencies/>
3838
</Projects>
39+
<Projects Include="Ollama\Ollama.dproj">
40+
<Dependencies/>
41+
</Projects>
3942
</ItemGroup>
4043
<ProjectExtensions>
4144
<Borland.Personality>Default.Personality.12</Borland.Personality>
@@ -143,14 +146,23 @@
143146
<Target Name="ToolsetsPOO:Make">
144147
<MSBuild Projects="ToolsetsPOO\ToolsetsPOO.dproj" Targets="Make"/>
145148
</Target>
149+
<Target Name="Ollama">
150+
<MSBuild Projects="Ollama\Ollama.dproj"/>
151+
</Target>
152+
<Target Name="Ollama:Clean">
153+
<MSBuild Projects="Ollama\Ollama.dproj" Targets="Clean"/>
154+
</Target>
155+
<Target Name="Ollama:Make">
156+
<MSBuild Projects="Ollama\Ollama.dproj" Targets="Make"/>
157+
</Target>
146158
<Target Name="Build">
147-
<CallTarget Targets="IAChat;Models;APIKey;FunctionCalling;Images;RAG;TTS_STT;TTS_STT_Map;Toolsets;ToolsetsRAD;ToolsetsPOO"/>
159+
<CallTarget Targets="IAChat;Models;APIKey;FunctionCalling;Images;RAG;TTS_STT;TTS_STT_Map;Toolsets;ToolsetsRAD;ToolsetsPOO;Ollama"/>
148160
</Target>
149161
<Target Name="Clean">
150-
<CallTarget Targets="IAChat:Clean;Models:Clean;APIKey:Clean;FunctionCalling:Clean;Images:Clean;RAG:Clean;TTS_STT:Clean;TTS_STT_Map:Clean;Toolsets:Clean;ToolsetsRAD:Clean;ToolsetsPOO:Clean"/>
162+
<CallTarget Targets="IAChat:Clean;Models:Clean;APIKey:Clean;FunctionCalling:Clean;Images:Clean;RAG:Clean;TTS_STT:Clean;TTS_STT_Map:Clean;Toolsets:Clean;ToolsetsRAD:Clean;ToolsetsPOO:Clean;Ollama:Clean"/>
151163
</Target>
152164
<Target Name="Make">
153-
<CallTarget Targets="IAChat:Make;Models:Make;APIKey:Make;FunctionCalling:Make;Images:Make;RAG:Make;TTS_STT:Make;TTS_STT_Map:Make;Toolsets:Make;ToolsetsRAD:Make;ToolsetsPOO:Make"/>
165+
<CallTarget Targets="IAChat:Make;Models:Make;APIKey:Make;FunctionCalling:Make;Images:Make;RAG:Make;TTS_STT:Make;TTS_STT_Map:Make;Toolsets:Make;ToolsetsRAD:Make;ToolsetsPOO:Make;Ollama:Make"/>
154166
</Target>
155167
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
156168
</Project>

Samples/Ollama/Ollama.dpr

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
program Ollama;
2+
3+
uses
4+
Vcl.Forms,
5+
Ollama.Main.View in 'Src\Ollama.Main.View.pas' {OllamaMainView};
6+
7+
{$R *.res}
8+
9+
begin
10+
Application.Initialize;
11+
Application.MainFormOnTaskbar := True;
12+
Application.CreateForm(TOllamaMainView, OllamaMainView);
13+
Application.Run;
14+
end.

Samples/Ollama/Ollama.dproj

Lines changed: 1127 additions & 0 deletions
Large diffs are not rendered by default.

Samples/Ollama/Ollama.res

151 KB
Binary file not shown.
Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
object OllamaMainView: TOllamaMainView
2+
Left = 0
3+
Top = 0
4+
Caption = 'IA na pr'#225'tica: Ollama - IA Off-Line'
5+
ClientHeight = 636
6+
ClientWidth = 841
7+
Color = clBtnFace
8+
Font.Charset = DEFAULT_CHARSET
9+
Font.Color = clWindowText
10+
Font.Height = -12
11+
Font.Name = 'Segoe UI'
12+
Font.Style = []
13+
KeyPreview = True
14+
Position = poScreenCenter
15+
OnCreate = FormCreate
16+
TextHeight = 15
17+
object Splitter1: TSplitter
18+
Left = 0
19+
Top = 297
20+
Width = 841
21+
Height = 5
22+
Cursor = crVSplit
23+
Align = alTop
24+
ExplicitLeft = -8
25+
ExplicitTop = 481
26+
ExplicitWidth = 1383
27+
end
28+
object pnTop: TPanel
29+
Left = 0
30+
Top = 0
31+
Width = 841
32+
Height = 129
33+
Align = alTop
34+
TabOrder = 0
35+
ExplicitWidth = 833
36+
object Label13: TLabel
37+
Left = 677
38+
Top = 7
39+
Width = 67
40+
Height = 15
41+
Caption = 'Temperature'
42+
end
43+
object Label1: TLabel
44+
Left = 163
45+
Top = 6
46+
Width = 34
47+
Height = 15
48+
Caption = 'Model'
49+
end
50+
object Label2: TLabel
51+
Left = 13
52+
Top = 67
53+
Width = 63
54+
Height = 15
55+
Caption = 'OllamaHost'
56+
end
57+
object Label3: TLabel
58+
Left = 345
59+
Top = 67
60+
Width = 62
61+
Height = 15
62+
Caption = 'OllamaPath'
63+
end
64+
object lbPort: TLabel
65+
Left = 677
66+
Top = 67
67+
Width = 60
68+
Height = 15
69+
Caption = 'OllamaPort'
70+
end
71+
object edtTemperature: TEdit
72+
Left = 677
73+
Top = 24
74+
Width = 149
75+
Height = 23
76+
MaxLength = 3
77+
TabOrder = 0
78+
Text = '0'
79+
end
80+
object btnShowModels: TButton
81+
Left = 13
82+
Top = 23
83+
Width = 146
84+
Height = 25
85+
Cursor = crHandPoint
86+
Caption = 'Get Models Dispon'#237'veis'
87+
TabOrder = 1
88+
OnClick = btnShowModelsClick
89+
end
90+
object cBoxModel: TComboBox
91+
Left = 163
92+
Top = 24
93+
Width = 511
94+
Height = 23
95+
TabOrder = 2
96+
end
97+
object edtHost: TEdit
98+
Left = 12
99+
Top = 83
100+
Width = 329
101+
Height = 23
102+
TabOrder = 3
103+
end
104+
object edtPath: TEdit
105+
Left = 344
106+
Top = 83
107+
Width = 329
108+
Height = 23
109+
TabOrder = 4
110+
end
111+
object edtPort: TEdit
112+
Left = 676
113+
Top = 83
114+
Width = 150
115+
Height = 23
116+
NumbersOnly = True
117+
TabOrder = 5
118+
end
119+
end
120+
object pnBoth: TPanel
121+
Left = 0
122+
Top = 129
123+
Width = 841
124+
Height = 168
125+
Align = alTop
126+
Caption = 'pnBoth'
127+
TabOrder = 1
128+
ExplicitWidth = 833
129+
object gBoxQuestion: TGroupBox
130+
Left = 1
131+
Top = 1
132+
Width = 839
133+
Height = 134
134+
Align = alClient
135+
Caption = ' Prompt / question '
136+
Padding.Left = 1
137+
Padding.Right = 1
138+
Padding.Bottom = 1
139+
TabOrder = 0
140+
ExplicitWidth = 831
141+
object mmQuestion: TMemo
142+
Left = 3
143+
Top = 17
144+
Width = 833
145+
Height = 114
146+
Align = alClient
147+
BorderStyle = bsNone
148+
Lines.Strings = (
149+
'Ol'#225' quem '#233' voc'#234' e quem '#233' o seu fabricante?')
150+
TabOrder = 0
151+
ExplicitLeft = 2
152+
ExplicitTop = 19
153+
ExplicitWidth = 825
154+
end
155+
end
156+
object Panel1: TPanel
157+
Left = 1
158+
Top = 135
159+
Width = 839
160+
Height = 32
161+
Align = alBottom
162+
BevelOuter = bvNone
163+
Padding.Top = 2
164+
Padding.Right = 2
165+
Padding.Bottom = 2
166+
TabOrder = 1
167+
ExplicitWidth = 831
168+
object btnExecute: TBitBtn
169+
Left = 0
170+
Top = 2
171+
Width = 102
172+
Height = 28
173+
Align = alLeft
174+
Caption = 'Execute'
175+
TabOrder = 0
176+
OnClick = btnExecuteClick
177+
end
178+
object ProgressBar1: TProgressBar
179+
AlignWithMargins = True
180+
Left = 108
181+
Top = 6
182+
Width = 200
183+
Height = 20
184+
Margins.Left = 6
185+
Margins.Top = 4
186+
Margins.Right = 6
187+
Margins.Bottom = 4
188+
Align = alLeft
189+
Smooth = True
190+
Style = pbstMarquee
191+
SmoothReverse = True
192+
State = pbsPaused
193+
TabOrder = 1
194+
end
195+
end
196+
end
197+
object gBoxResponse: TGroupBox
198+
Left = 0
199+
Top = 302
200+
Width = 841
201+
Height = 334
202+
Align = alClient
203+
Caption = ' Response '
204+
Padding.Left = 1
205+
Padding.Right = 1
206+
Padding.Bottom = 1
207+
TabOrder = 2
208+
ExplicitTop = 303
209+
ExplicitWidth = 833
210+
ExplicitHeight = 320
211+
object mmResponse: TMemo
212+
Left = 3
213+
Top = 17
214+
Width = 835
215+
Height = 314
216+
Align = alClient
217+
BorderStyle = bsNone
218+
ScrollBars = ssVertical
219+
TabOrder = 0
220+
ExplicitLeft = 2
221+
ExplicitTop = 16
222+
ExplicitWidth = 827
223+
ExplicitHeight = 300
224+
end
225+
end
226+
object TMSMCPCloudAI1: TTMSMCPCloudAI
227+
Service = aiOpenAI
228+
Settings.GeminiModel = 'gemini-1.5-flash-latest'
229+
Settings.OpenAIModel = 'gpt-4o'
230+
Settings.OpenAISoundModel = 'gpt-4o-mini-tts'
231+
Settings.OpenAITranscribeModel = 'whisper-1'
232+
Settings.GrokModel = 'grok-3'
233+
Settings.ClaudeModel = 'claude-3-5-sonnet-20241022'
234+
Settings.OllamaModel = 'llama3.2:latest'
235+
Settings.DeepSeekModel = 'deepseek-chat'
236+
Settings.PerplexityModel = 'sonar-pro'
237+
Settings.OllamaHost = 'localhost'
238+
Settings.OllamaPath = '/api/chat'
239+
Settings.MistralModel = 'mistral-large-latest'
240+
Settings.MistralTranscribeModel = 'voxtral-mini-2507'
241+
Tools = <>
242+
OnExecuted = TMSMCPCloudAI1Executed
243+
OnGetModels = TMSMCPCloudAI1GetModels
244+
Left = 541
245+
Top = 140
246+
end
247+
end

0 commit comments

Comments
 (0)