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

[BUG]: ChatSession unnecessarily prevents arbitrary conversation interleaving #857

Open
lostmsu opened this issue Jul 19, 2024 · 0 comments

Comments

@lostmsu
Copy link

lostmsu commented Jul 19, 2024

Description

With asynchronous flows user might ask 2 questions in succession before model has time to answer the first one. This ends up in the following chat pattern:

user: multiply 2 by 3
user: then divide by -1
assistant: 6
assistant: -6

Unfortunately, for some reason ChatSession prevents this while LLAMA 3 instruct models handle such scenario without any issues.

Reproduction Steps

var history = new ChatHistory();
history.AddMessage(AuthorRole.User, "multiply 2 by 3");
history.AddMessage(AuthorRole.User, "then divide by -1");
history.AddMessage(AuthorRole.Assistant, "6");
history.AddMessage(AuthorRole.Assistant, "-6");

Throws ArgumentException twice

Environment & Configuration

  • Operating system: Win 11
  • .NET runtime version: 8
  • LLamaSharp version: 0.14
  • CUDA version (if you are using cuda backend): 12
  • CPU & GPU device: N/A

Known Workarounds

No response

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

No branches or pull requests

1 participant