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

LLamaSharp.SemanticKernel Abnormal conversation #273

Closed
ynanech opened this issue Nov 10, 2023 · 6 comments
Closed

LLamaSharp.SemanticKernel Abnormal conversation #273

ynanech opened this issue Nov 10, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@ynanech
Copy link

ynanech commented Nov 10, 2023

Role conversion may fail due to capitalization reasons

var role = Enum.TryParse<global::LLama.Common.AuthorRole>(chat.Role.Label, out var _role) ? _role : global::LLama.Common.AuthorRole.Unknown;

Main problem: When I only send one message, it will result in multiple rounds of conversation, which I really don't understand here
QQ图片20231110114447

project reference

<ItemGroup> <PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" /> <PackageReference Include="LLamaSharp" Version="0.7.0" /> <PackageReference Include="LLamaSharp.Backend.Cpu" Version="0.7.0" /> </ItemGroup>

@AsakusaRinne
Copy link
Collaborator

Seems to be related with #186 , @xbotter any idea about it? It's most likely the problem of anti-prompt but I'm not sure how semantic-kernel makes it work.

@AsakusaRinne AsakusaRinne added the bug Something isn't working label Nov 10, 2023
@xbotter
Copy link
Collaborator

xbotter commented Nov 11, 2023

If necessary system instructions are missing in the dialogue, the output format may indeed exceed the expected results. It seems that some preliminary prompt engineering needs to be done. I will take a closer look.

@ynanech
Copy link
Author

ynanech commented Nov 13, 2023

Microsoft.SemanticKernel.Abstractions" Version="1.0.0-beta6
In the latest version of SemanticKernel, IChatStreamingResult and IChatResult changes have been made,LLamaSharp SemanticKernel library needs to be adjusted

@AsakusaRinne AsakusaRinne mentioned this issue Nov 13, 2023
8 tasks
@xbotter
Copy link
Collaborator

xbotter commented Nov 30, 2023

I noticed that the current LlamaSharpChatCompletion interface is using LlamaSharp's InteractiveExecutor model, which is not very suitable for stateless IChatCompletion. I will change it to stateless mode in the near future.

@AsakusaRinne
Copy link
Collaborator

This issue may have been solved by #341, could you please try it again with the master branch?

@martindevans
Copy link
Member

Since it's been a while and this was probably fixed by #341 I'll close this issue now. If it's still a problem please don't hesitate to re-open 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: ✅ Done
Development

No branches or pull requests

4 participants