tryAGI / LangChain

C# implementation of LangChain. We try to be as close to the original as possible in terms of abstractions, but are open to new entities.
https://tryagi.github.io/LangChain/
MIT License
527 stars 82 forks source link

LLamaSharpEmbeddings Exception: EmbeddingMode must be true. #343

Closed OctavioUlla closed 3 months ago

OctavioUlla commented 3 months ago

Describe the bug

When creating a LlamaSharpEmbeddings the LlamaEmbedder expects the property EmbeddingMode to be true, even if i set it to true in the LlamaSharpConfiguration it is not beign passed to the model params. image image This is the LlamaSharp code that throws the exception: image

Steps to reproduce the bug

  1. Create a LLamaSharpEmbeddings

Expected behavior

Adding this line of code should fix the problem: image

Screenshots

No response

NuGet package version

No response

Additional context

No response

HavenDV commented 3 months ago

Hello. Thanks, I think this problem is due to the fact that the LLamaSharp provider was originally written for version 0.8, but after that it was incorrectly updated to new versions I'll be happy to accept PR on this or take a look at it this weekend