Skip to content

Commit

Permalink
[releases/24.x] [Copilot] Enable Function calling for all (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
darjoo authored Mar 18, 2024
1 parent e24568a commit 9051b7f
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ codeunit 7778 "AOAI Tools Impl"
ToolIdDoesNotExistErr: Label 'Tool id does not exist.';
ToolObjectInvalidErr: Label '%1 object does not contain %2 property.', Comment = '%1 is the object name and %2 is the property that is missing.';
ToolTypeErr: Label 'Tool type must be of function type.';
CapabilityBlockedErr: Label 'Tools capability is currently blocked for non Microsoft features.';

[NonDebuggable]
procedure AddTool(NewTool: JsonObject; CallerModuleInfo: ModuleInfo)
begin
CapabilityBlocked(CallerModuleInfo);
Initialize();
if ValidateTool(NewTool) then
Tools.Add(NewTool);
Expand Down Expand Up @@ -147,15 +145,4 @@ codeunit 7778 "AOAI Tools Impl"
end;
exit(true);
end;

[NonDebuggable]
local procedure CapabilityBlocked(CallerModuleInfo: ModuleInfo)
var
CurrentModuleInfo: ModuleInfo;
begin
NavApp.GetCallerModuleInfo(CurrentModuleInfo);

if CallerModuleInfo.Publisher <> CurrentModuleInfo.Publisher then
Error(CapabilityBlockedErr);
end;
}

0 comments on commit 9051b7f

Please sign in to comment.