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

fix(core): Move the last user's information to the end #960

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

vvycaaa
Copy link
Contributor

@vvycaaa vvycaaa commented Dec 21, 2023

When there are multiple repeated user inputs in the message history, there is a bug in this piece of code.
example
history
user: hello
assistant: hi
user: hello
after remove & append:
history
assistant: hi
user: hello
user: hello

@fangyinc
Copy link
Collaborator

Thanks for your PR. Can you add some unit tests for to_openai_messages ?

@vvycaaa
Copy link
Contributor Author

vvycaaa commented Dec 21, 2023

Thanks for your PR. Can you add some unit tests for to_openai_messages ?

done

@fangyinc fangyinc changed the title bugfix: Move the last user's information to the end fix(core): Move the last user's information to the end Dec 22, 2023
@github-actions github-actions bot added core Module: core fix Bug fixes labels Dec 22, 2023
Copy link
Collaborator

@fangyinc fangyinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Collaborator

@csunny csunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks,LGTM

@csunny csunny merged commit d906522 into eosphoros-ai:main Dec 22, 2023
5 checks passed
vshy108 pushed a commit to vshy108/DB-GPT that referenced this pull request Jan 18, 2024
Hopshine pushed a commit to Hopshine/DB-GPT that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Module: core fix Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants