semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

Can one use Skills with AddOpenAIChatCompletion?

Open Woland2k opened this issue 3 years ago • 5 comments

Describe the bug It looks like ChatCompletion was introduced in the latest checkin, however it doesn't seem to support skills. Is that by design or would that be enabled in the future?

Desktop (please complete the following information):

  • NuGet Package Version 0.9.61

Woland2k avatar Mar 28 '23 23:03 Woland2k

@Woland2k can you provide a use case for doing this? You can use the client directly also for this.

evchaki avatar Mar 30 '23 20:03 evchaki

All I really after is ability to use gpt-3.5-turbo model with skills defined same way as for text completion.

Woland2k avatar Mar 31 '23 17:03 Woland2k

@dluc can you take a look?

microsoftShannon avatar Apr 13 '23 21:04 microsoftShannon

@Woland2k can you provide a use case for doing this? You can use the client directly also for this.

A usecase in my eyes would be, so I could tell the model to

  • go create files.
  • go through files and
  • make embedings for them, and so on.

(or am I on a completly wrong path and it already can do these things?)

lightningRalf avatar Apr 18 '23 11:04 lightningRalf

@Woland2k can you provide a use case for doing this? You can use the client directly also for this.

A usecase in my eyes would be, so I could tell the model to

  • go create files.
  • go through files and
  • make embedings for them, and so on.

(or am I on a completly wrong path and it already can do these things?)

Not sure we're talking about the same thing ... it might be that chat completion is not suitable for skills definition.

Woland2k avatar Apr 18 '23 16:04 Woland2k

Why not? I think a lot of people, who are no developers would like to do some no code stuff just by talking to a chatbot. Myself included ;)

lightningRalf avatar Apr 18 '23 18:04 lightningRalf

@Woland2k this is now possible, e.g. from https://github.com/microsoft/semantic-kernel/blob/main/samples/dotnet/kernel-syntax-examples/Example26_SemanticFunctionsUsingChatGPT.cs

IKernel kernel = new KernelBuilder().WithLogger(ConsoleLogger.Log).Build();

// Note: we use Chat Completion and GPT 3.5 Turbo
kernel.Config.AddAzureChatCompletionService("id", "gpt-35-turbo", "https://....openai.azure.com/", "...KEY...");
//            ^^^

var func = kernel.CreateSemanticFunction("List the two planets closest to '{{$input}}', excluding moons, using bullet points.");

var result = await func.InvokeAsync("Jupiter");
Console.WriteLine(result);

dluc avatar Apr 19 '23 06:04 dluc