Skip to content

Fix usage message, state trimming causing fncall role mismatch#42

Open
satojk wants to merge 3 commits into
mainfrom
2024-12-11-for-pr
Open

Fix usage message, state trimming causing fncall role mismatch#42
satojk wants to merge 3 commits into
mainfrom
2024-12-11-for-pr

Conversation

@satojk

@satojk satojk commented Feb 5, 2025

Copy link
Copy Markdown
Contributor

Closes #41

Also fixes an issue where state trimming may cause a function message mismatch: If there is a function call that is not followed by a function message, or a function message that is not preceded by a function call, the OpenAI API will complain. But this situation was arising sometimes during state trimming. This PR fixes that.

If there is a function call that is not followed by a function message,
or a function message that is not preceded by a function call, the
OpenAI API will complain. But this situation was arising sometimes
during state trimming. This commit fixes that
@satojk satojk requested a review from CosmicGans February 5, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Token usage computation isn't correct

2 participants