Skip to content

Python: Bug: Inconsistent behavior of function calling from agent class #12403

Closed
@NirajC-Microsoft

Description

@NirajC-Microsoft

Describe the bug
I'm experiencing an issue where calling a new function from an agent class returns the output of a previously invoked function, leading to inconsistent agent responses.

Expected behavior
When a specific function is called from an agent class, the response should accurately reflect the output of that function, not a previously invoked function. Each function call should produce a fresh, contextually relevant response based on the current invocation

Screenshots
Correct Scenario:
Here assign_mentor gets called and giving correct response
Image

Bug:
Here assign_mentor gets called but giving incorrect response, that response is from previous function called from same agent class.
Image

Platform

  • Language: Python
  • Source: pip 25.0.1
  • AI model: OpenAI:GPT-4o
  • IDE: [e.g. Visual Studio, VS Code]
  • OS: Windows

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

agentsbugSomething isn't workingpythonPull requests for the Python Semantic Kernel

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions