From 4b2ecb684122e9c8f5598269cb3322a180e491a9 Mon Sep 17 00:00:00 2001 From: Darrick Date: Mon, 18 Mar 2024 11:08:20 +0100 Subject: [PATCH] [releases/24.0] [Copilot] Enable Function calling for all (#760) This pull request backports #751 to releases/24.0 Fixes [AB#507477](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/507477) --- .../Chat Completion/AOAIToolsImpl.Codeunit.al | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/System Application/App/AI/src/Azure OpenAI/Chat Completion/AOAIToolsImpl.Codeunit.al b/src/System Application/App/AI/src/Azure OpenAI/Chat Completion/AOAIToolsImpl.Codeunit.al index c2403f7635..1f451ed6fc 100644 --- a/src/System Application/App/AI/src/Azure OpenAI/Chat Completion/AOAIToolsImpl.Codeunit.al +++ b/src/System Application/App/AI/src/Azure OpenAI/Chat Completion/AOAIToolsImpl.Codeunit.al @@ -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); @@ -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; }