Skip to content
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

Python: Kernel Function Selection Strategy Assertion Error #10004

Open
corytomlinson opened this issue Dec 17, 2024 · 3 comments
Open

Python: Kernel Function Selection Strategy Assertion Error #10004

corytomlinson opened this issue Dec 17, 2024 · 3 comments
Assignees
Labels
bug Something isn't working python Pull requests for the Python Semantic Kernel

Comments

@corytomlinson
Copy link

Not sure if this one is a bug or by design or just functionality not there yet in SK.

I am trying to use a custom KernelFunctionSelectionStrategy and bumping up against an assertion error related to assert isinstance(self.items[0], FunctionResultContent)

It seems that SK is expecting assistant messages to only be function call results (rather than text content).

The context is I have an orchestration kernel with an AzureChatCompletion service. I'm creating a KernelFunctionFromPrompt that contains the custom selection strategy for multiple AzureAssistantAgents.

The first 2 turns of the selection strategy work as expected, but then I run into this assertion error. Any help or guidance with custom selection strategies would be appreciated. Or if this is a bug or missing functionality, I will stop banging my head against the wall trying to make it work.

@corytomlinson corytomlinson added the bug Something isn't working label Dec 17, 2024
@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel triage labels Dec 17, 2024
@sphenry sphenry removed the triage label Dec 19, 2024
@sphenry
Copy link
Member

sphenry commented Dec 19, 2024

@crickman Can you take a look?

@moonbox3 moonbox3 self-assigned this Dec 21, 2024
@moonbox3
Copy link
Contributor

@sphenry, @crickman I can take a look.

@moonbox3
Copy link
Contributor

Hi @corytomlinson, could you give a little more context as to where this is happening? A stack trace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

No branches or pull requests

5 participants