-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
.Net: Removed Azure and OpenAI text generation services #4246
.Net: Removed Azure and OpenAI text generation services #4246
Conversation
dotnet/src/IntegrationTests/Connectors/OpenAI/OpenAICompletionTests.cs
Outdated
Show resolved
Hide resolved
This reverts commit d974885.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking until I've had a chance to review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion
@@ -435,7 +438,7 @@ public async Task MultipleServiceLoadPromptConfigTestAsync() | |||
@"{ | |||
""name"": ""FishMarket2"", | |||
""execution_settings"": { | |||
""azure-open-ai"": { | |||
""azure-text-davinci-003"": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
@@ -101,6 +101,7 @@ private void ConfigureAzureOpenAI(IKernelBuilder kernelBuilder) | |||
|
|||
kernelBuilder.AddAzureOpenAIChatCompletion( | |||
deploymentName: azureOpenAIConfiguration.DeploymentName, | |||
modelId: azureOpenAIConfiguration.ModelId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modelId: azureOpenAIConfiguration.ModelId, | |
modelId: azureOpenAIConfiguration.ChatModelId, |
@@ -12,16 +12,25 @@ internal sealed class AzureOpenAIConfiguration | |||
|
|||
public string DeploymentName { get; set; } | |||
|
|||
public string ModelId { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public string ModelId { get; set; } |
{ | ||
this.ServiceId = serviceId; | ||
this.DeploymentName = deploymentName; | ||
this.ModelId = modelId ?? deploymentName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.ModelId = modelId ?? deploymentName; |
@@ -10,12 +10,14 @@ internal sealed class OpenAIConfiguration | |||
{ | |||
public string ServiceId { get; set; } | |||
public string ModelId { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public string ModelId { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RogerBarreto this change won't work because there is another settings for embeddings which uses ModelId
and we use the same C# class for all the settings:
"OpenAIEmbeddings": {
"ServiceId": "text-embedding-ada-002",
"ModelId": "text-embedding-ada-002",
"ApiKey": ""
},
That's why I removed Chat
prefix initially, reverted it back and proposed to keep it as it is for now as alternative, because settings and testing infrastructure need to be revisited completely.
public string ApiKey { get; set; } | ||
|
||
public OpenAIConfiguration(string serviceId, string modelId, string apiKey) | ||
public OpenAIConfiguration(string serviceId, string modelId, string apiKey, string chatModelId) | ||
{ | ||
this.ServiceId = serviceId; | ||
this.ModelId = modelId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.ModelId = modelId; |
@@ -1,12 +1,14 @@ | |||
{ | |||
"OpenAI": { | |||
"ServiceId": "open-ai", | |||
"ModelId": "gpt-3.5-turbo", | |||
"ModelId": "text-davinci-003", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ModelId": "text-davinci-003", |
"ApiKey": "" | ||
}, | ||
"AzureOpenAI": { | ||
"ServiceId": "azure-open-ai", | ||
"DeploymentName": "gpt-35-turbo", | ||
"DeploymentName": "text-davinci-003", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"DeploymentName": "text-davinci-003", |
Closing this PR as text generation services can work with |
The ITextGenerationService implementation in OpenAIChatCompletionService doesn't work with it? Isn't it identical to the implementation used by OpenAITextGenerationService? |
When you use kernel with
That's because semantic-kernel/dotnet/src/SemanticKernel.Core/Functions/KernelFunctionFromPrompt.cs Lines 145 to 157 in d3773b2
So, in order to use But I think ideally |
The reason why |
I see, thanks. Yeah, that's a fairly unfortunate combination, but I get it. |
Motivation and Context
Resolves: #3154
Removed Azure and OpenAI text generation services in favor of chat completion services.
Contribution Checklist