-
Notifications
You must be signed in to change notification settings - Fork 436
Deprecate Text Completion API in AI SDK (work item 621038) #10205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e31c9a2
f90ccb9
0dd520b
7883cbb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -165,6 +165,8 @@ codeunit 7771 "Azure OpenAI" | |
| AzureOpenAIImpl.SetAuthorization(ModelType, Deployment); | ||
| end; | ||
|
|
||
| #if not CLEAN29 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Knowledge: 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.32.4 |
||
| #pragma warning disable AL0432 | ||
| /// <summary> | ||
| /// Generates a text completion given a prompt. | ||
| /// </summary> | ||
|
|
@@ -174,6 +176,7 @@ codeunit 7771 "Azure OpenAI" | |
| /// <error>The completion authentication was not configured.</error> | ||
| /// <error>The completion generation failed with status code %1.</error> | ||
| [NonDebuggable] | ||
| [Obsolete('Text completion models are retired by Azure OpenAI. Use GenerateChatCompletion instead.', '29.0')] | ||
| procedure GenerateTextCompletion(Prompt: SecretText; var AOAIOperationResponse: Codeunit "AOAI Operation Response"): Text | ||
| var | ||
| CallerModuleInfo: ModuleInfo; | ||
|
|
@@ -192,6 +195,7 @@ codeunit 7771 "Azure OpenAI" | |
| /// <error>The completion authentication was not configured.</error> | ||
| /// <error>The completion generation failed with status code %1.</error> | ||
| [NonDebuggable] | ||
| [Obsolete('Text completion models are retired by Azure OpenAI. Use GenerateChatCompletion instead.', '29.0')] | ||
| procedure GenerateTextCompletion(Prompt: SecretText; AOAICompletionParams: Codeunit "AOAI Text Completion Params"; var AOAIOperationResponse: Codeunit "AOAI Operation Response"): Text | ||
| var | ||
| CallerModuleInfo: ModuleInfo; | ||
|
|
@@ -210,6 +214,7 @@ codeunit 7771 "Azure OpenAI" | |
| /// <error>The completion authentication was not configured.</error> | ||
| /// <error>The completion generation failed with status code %1.</error> | ||
| [NonDebuggable] | ||
| [Obsolete('Text completion models are retired by Azure OpenAI. Use GenerateChatCompletion instead.', '29.0')] | ||
| procedure GenerateTextCompletion(Metaprompt: SecretText; Prompt: SecretText; var AOAIOperationResponse: Codeunit "AOAI Operation Response"): Text | ||
| var | ||
| CallerModuleInfo: ModuleInfo; | ||
|
|
@@ -229,14 +234,16 @@ codeunit 7771 "Azure OpenAI" | |
| /// <error>The completion authentication was not configured.</error> | ||
| /// <error>The completion generation failed with status code %1.</error> | ||
| [NonDebuggable] | ||
| [Obsolete('Text completion models are retired by Azure OpenAI. Use GenerateChatCompletion instead.', '29.0')] | ||
| procedure GenerateTextCompletion(Metaprompt: SecretText; Prompt: SecretText; AOAICompletionParams: Codeunit "AOAI Text Completion Params"; var AOAIOperationResponse: Codeunit "AOAI Operation Response"): Text | ||
| var | ||
| CallerModuleInfo: ModuleInfo; | ||
| begin | ||
| NavApp.GetCallerModuleInfo(CallerModuleInfo); | ||
| exit(AzureOpenAIImpl.GenerateTextCompletion(Metaprompt, Prompt, AOAICompletionParams, AOAIOperationResponse, CallerModuleInfo)); | ||
| end; | ||
|
|
||
| #pragma warning restore AL0432 | ||
| #endif | ||
|
|
||
| /// <summary> | ||
| /// Generates embeddings given an input. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| #if not CLEAN29 | ||
|
martinsrui-msft marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Codeunit 7765 "AOAI Text Completion Params" sets Knowledge: 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.32.4 |
||
| // ------------------------------------------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
|
@@ -13,6 +14,9 @@ codeunit 7765 "AOAI Text Completion Params" | |
| Access = Public; | ||
| InherentEntitlements = X; | ||
| InherentPermissions = X; | ||
| ObsoleteState = Pending; | ||
| ObsoleteReason = 'Text completion models are retired by Azure OpenAI. Use GenerateChatCompletion instead.'; | ||
| ObsoleteTag = '29.0'; | ||
|
|
||
| var | ||
| AOAITextCompletionParamsImpl: Codeunit "AOAI TextCompletionParams Impl"; | ||
|
|
@@ -140,4 +144,5 @@ codeunit 7765 "AOAI Text Completion Params" | |
| begin | ||
| AOAITextCompletionParamsImpl.AddCompletionsParametersToPayload(Payload); | ||
| end; | ||
| } | ||
| } | ||
| #endif | ||
Uh oh!
There was an error while loading. Please reload this page.