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

.Net: Bug: O3-mini doen't call again a plugin if a tool item is present in chathistory #10648

Closed
guru98 opened this issue Feb 24, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@guru98
Copy link

guru98 commented Feb 24, 2025

Describe the bug
First of all i don't know if this can be defined a bug but for sure is a different behaviour vs what appen with others model lik gpt-4o. In my scenarious i have a plugin that make query in a knowledge base. I don't use vector store at the moment becouse doen't use all the feature of Azure Search. Anyway in a new conversation (empty ChatHistory) the llm call the function correctly. but in the successive request it doen't call the function anymore. The only way to change the behaviour is to remove the tool items from the history. In my mind this is an issue that limit the use of o3 in a chatcompletion scenario when tool item in the history is necessary

Platform

  • Language: C#
  • AI model: AzureOpenAI: o3-mini ver. 2025-01-31
@guru98 guru98 added the bug Something isn't working label Feb 24, 2025
@moonbox3 moonbox3 changed the title Bug: O3-mini doen't call again a plugin if a tool item is present in chathistory .Net: Bug: O3-mini doen't call again a plugin if a tool item is present in chathistory Feb 25, 2025
@RogerBarreto
Copy link
Member

This is a behavior of the model itself, because it "smartly" sees function result in the prompt that goes to the API and reuses it.

To prevent this behavior I suggest using a ChatHistoryReducer to remove any Messages where Role=Tool, those messages are the function Results sent back to the AI, without those, the AI won't be using previous function results from the History.

Here's ChatHistoryMaxTokensReducer as one example of a ChatHistory reducer based on MaxTokens, but you can customize it or create a new one to the above scenario.

How to use it:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Sprint: Done
Development

No branches or pull requests

4 participants