Repository navigation
The integration of chat and text completion services into the context does not utilize the models as expected #3103
Answered
by
evchaki
Guillermo Subirán (gsubiran)
asked this question in
Q&A
|
I'm developing an Azure Function and I've integrated SK to it injecting the kernel as seen in many starter projects. //Microsoft Semantic Kernel configuration build
var skBuild = Kernel.Builder
.WithLoggerFactory(loggerFactory)
.WithAzureTextEmbeddingGenerationService("text-embedding-ada-002", azureOpenAIOptions.Endpoint, azureOpenAIOptions.ApiKey)
.WithAzureTextCompletionService("gpt-35-turbo-instruct", azureOpenAIOptions.Endpoint, azureOpenAIOptions.ApiKey)
.WithAzureChatCompletionService("gpt-35-turbo", azureOpenAIOptions.Endpoint, azureOpenAIOptions.ApiKey)
.WithMemoryStorage(memoryStore)
.Build();Even I specified different models for each searvice .WithAzureTextCompletionService("gpt-35-turbo-instruct",... ,...)and .WithAzureChatCompletionService("gpt-35-turbo",... ,...)SK is only using the model specified for chat completion service. For example: var result = await kernel.RunAsync(context, skill["Joke"]);
Console.WriteLine(result);and gpt-35-turbo when implementing var chat = chatCompletionService.CreateNewChat("You are an AI assistant that helps people find information.");
chat.AddMessage(AuthorRole.User, "Hi, what information can you provide for me?");
string response = await chatCompletionService.GenerateMessageAsync(chat, new ChatRequestSettings());
Console.WriteLine(response);I'm missing something? |
Answered by
evchaki
Jan 3, 2024
Replies: 1 comment
|
Check this example out to see if it helps - https://github.com/microsoft/semantic-kernel-starters/tree/main/sk-csharp-chatgpt-plugin |
0 replies
Answer selected by
sophialagerkranspandey
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check this example out to see if it helps - https://github.com/microsoft/semantic-kernel-starters/tree/main/sk-csharp-chatgpt-plugin