Skip to content

.Net: When using OpenAI function calling return the function response using the function role #3248

Closed

Description

The available Chat roles here do not include a 'function' role, which is required when sending the function response back to the model (docs).

In this sample it is using the "Assistant" role to do this but that's not the correct role

Activity

  1. changed the title [-]When using OpenAI function calling return the function response using the `function` role[/-] [+].Net: When using OpenAI function calling return the function response using the `function` role[/+] on Oct 23, 2023
  2. added
    sk team issueA tag to denote issues that where created by the Semantic Kernel team (i.e., not the community)
    and removed on Oct 24, 2023
  3. lavinir commented on Oct 26, 2023

    @lavinir

    Some additional notes to the function calling flow:

    • According to the spec, the message coming back from the assistant which includes details on which function to call, should be appended to the ChatHistory and sent back in the next call along with the Function response (with the function role) reference
  4. msvinth-work commented on Nov 2, 2023

    @msvinth-work

    Might have been discussed elsewhere but the function role is also using the "name" property to set the named of the function called. There is no Name property on ChatMessageBase

  5. markwallace-microsoft commented on Nov 13, 2023

    @markwallace-microsoft
    ContributorAuthor

    Resolved by #3421

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

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions