Skip to content

Commit 24059e9

Browse files
committed
Take properties out of ollamaChat that do not apply: Tools and API key
1 parent 466460d commit 24059e9

File tree

5 files changed

+23
-5
lines changed

5 files changed

+23
-5
lines changed

+llms/+internal/hasTools.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
classdef (Abstract) hasTools
2+
% This class is undocumented and will change in a future release
3+
4+
% Copyright 2023-2024 The MathWorks, Inc.
5+
6+
properties (Access=protected)
7+
Tools
8+
FunctionsStruct
9+
end
10+
end

+llms/+internal/needsAPIKey.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
classdef (Abstract) needsAPIKey
2+
% This class is undocumented and will change in a future release
3+
4+
% Copyright 2023-2024 The MathWorks, Inc.
5+
6+
properties (Access=protected)
7+
APIKey
8+
end
9+
end

+llms/+internal/textGenerator.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
end
3030

3131
properties (Access=protected)
32-
Tools
33-
FunctionsStruct
34-
APIKey
3532
StreamFun
3633
end
3734
end

azureChat.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
classdef(Sealed) azureChat < llms.internal.textGenerator & llms.internal.gptPenalties
1+
classdef(Sealed) azureChat < llms.internal.textGenerator & ...
2+
llms.internal.gptPenalties & llms.internal.hasTools & llms.internal.needsAPIKey
23
%azureChat Chat completion API from Azure.
34
%
45
% CHAT = azureChat(endpoint, deploymentID) creates an azureChat object with

openAIChat.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
classdef(Sealed) openAIChat < llms.internal.textGenerator & llms.internal.gptPenalties
1+
classdef(Sealed) openAIChat < llms.internal.textGenerator & ...
2+
llms.internal.gptPenalties & llms.internal.hasTools & llms.internal.needsAPIKey
23
%openAIChat Chat completion API from OpenAI.
34
%
45
% CHAT = openAIChat(systemPrompt) creates an openAIChat object with the

0 commit comments

Comments
 (0)