Skip to content

OpenAI Chat Service classes should support function calling and other API updates #1450

Description

OpenAI just released new features to the chat completion API.

https://openai.com/blog/function-calling-and-other-api-updates

Our chat services objects should accommodate these updates.

### Tasks
- [ ] https://github.com/microsoft/semantic-kernel/issues/2315
- [ ] https://github.com/microsoft/semantic-kernel/issues/2932
- [ ] https://github.com/microsoft/semantic-kernel/issues/3017
- [ ] Explore kernel integration with function calling execution
- [ ] Add telemetry for function calling feature

Activity

  1. converted this from a draft issue on Jun 13, 2023
  2. added
    .NETIssue or Pull requests regarding .NET code
    pythonPull requests for the Python Semantic Kernel
    javaIssue or PR regarding Java code
    on Jun 13, 2023
  3. moved this to Backlog - New features in Semantic Kernelon Jun 13, 2023
  4. moved this from Backlog - Telemetry/Hooks/Transparency to Backlog - New features in Python Semantic Kernelon Jun 13, 2023
  5. moved this from Backlog - New features to Backlog - Telemetry/Hooks/Transparency in Semantic Kernelon Jun 13, 2023
  6. moved this from Backlog - New features to Backlog - Telemetry/Hooks/Transparency in Java Semantic Kernelon Jun 13, 2023
  7. moved this from Backlog - New features to Backlog - Telemetry/Hooks/Transparency in Python Semantic Kernelon Jun 13, 2023
  8. xbotter commented on Jun 14, 2023

    @xbotter
    Contributor

    Function Calling seems to be able to serve as a new ActionPlanner, or it can also function as an extractor for Json data.

  9. gmilano commented on Jun 21, 2023

    @gmilano

    Do you have some plan on how to implement this ?

    The sk has a dependency with azure sdk, the current implementation rely on Azure SDK event for abstract chat concepts, for example on the Azure.AI.OpenAI.ChatRole class, are you thinking to wait for this Azure/azure-sdk-for-net#37013 ?

    I think that should be better to have the model for chatting without dependencies with any other external library, so that different services provider (OpenAI, Azure Open AI or any other provider) can evolve at their own rythm.

  10. 44 remaining items

  11. bgbbmm commented on Oct 4, 2023

    @bgbbmm

    Using today's nightly build I was looking at the example Example59_OpenAIFunctionCalling.

    Locally I tried to copy and run this to see how it worked, however the method "ImportPluginFunctionsAsync" doesn't appear to exist. There is a function "ImportAIPluginAsync" which seems similar, but if I try to use that then I see a compile error stating: "Reference to type 'ISKFunction' claims it is defined in 'Microsoft.SemanticKernel.Abstractions', but it could not be found"

    Anyone have thoughts on this?

  12. gitri-ms commented on Oct 4, 2023

    @gitri-ms
    Contributor

    bgbbmm This sample takes a dependency on the Microsoft.SemanticKernel.Functions.OpenAPI package since it imports the Klarna plugin to use in the example. In the latest package, ImportPluginFunctionsAsync replaces ImportAIPluginAsync, as the latter is being deprecated to align to our new naming scheme. It seems like you might not have the latest version of that package.

    To fix this, you have a few options:

    1. Get the latest nightly build of Microsoft.SemanticKernel.Functions.OpenAPI
    2. Keep the version you have, and replace ImportPluginFunctionsAsync with ImportAIPluginAsync in the example code (the functionality is the same)
    3. Remove the dependency on Microsoft.SemanticKernel.Functions.OpenAPI by commenting out the line that imports the Klarna plugin

    Hope that helps.

  13. bgbbmm commented on Oct 4, 2023

    @bgbbmm

    bgbbmm This sample takes a dependency on the Microsoft.SemanticKernel.Functions.OpenAPI package since it imports the Klarna plugin to use in the example. In the latest package, ImportPluginFunctionsAsync replaces ImportAIPluginAsync, as the latter is being deprecated to align to our new naming scheme. It seems like you might not have the latest version of that package.

    To fix this, you have a few options:

    1. Get the latest nightly build of Microsoft.SemanticKernel.Functions.OpenAPI
    2. Keep the version you have, and replace ImportPluginFunctionsAsync with ImportAIPluginAsync in the example code (the functionality is the same)
    3. Remove the dependency on Microsoft.SemanticKernel.Functions.OpenAPI by commenting out the line that imports the Klarna plugin

    Hope that helps.

    Yes thank you, I did not realize there was a missing dependency. Thank you for the explanation and clarification on the updated naming conventions.

  14. removed
    pythonPull requests for the Python Semantic Kernel
    javaIssue or PR regarding Java code
    on Oct 12, 2023
  15. moved this from Sprint: Done to Backlog - New features in Semantic Kernelon Oct 12, 2023
  16. moved this from Backlog - New features to Sprint: Done in Semantic Kernelon Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETIssue or Pull requests regarding .NET codesk team issueA tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions