You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use LLMSharpEmbeddings to use a SqlLite db to setup a RAG:
varmodelPath=@"D:\LLMModels\Models\thespis-13b-v0.5.Q2_K.gguf";//Also tested with Meta-Llama-3.1-8B-Instruct-Q6_KvarvectorDatabase=newSqLiteVectorDatabase(dataSource:@"D:\LLMModels\DBs\hp.db");varembeddingModel=LLamaSharpEmbeddings.FromPath(modelPath);varfileAddress=@"D:\LLMModels\RAGResources\Books\Harry-Potter-and-the-Philosophers-Stone.pdf";vardataSource=DataSource.FromPath(fileAddress);varvectorCollection=awaitvectorDatabase.AddDocumentsFromAsync<PdfPigPdfLoader>(embeddingModel,// Used to convert text to embeddingsdimensions:5120,// Not sure about this param!dataSource:dataSource,collectionName:"harrypotter",// Can be omitted, use if you want to have multiple collectionstextSplitter:null,behavior:AddDocumentsToDatabaseBehavior.OverwriteExistingCollection);conststringquestion="What is Harry's Address?";varsimilarDocuments=awaitvectorCollection.GetSimilarDocuments(embeddingModel,question,amount:5);Console.WriteLine($"Similar Doc Count: {similarDocuments.Count}");
the following exception is thrown: System.MissingMethodException HResult=0x80131513 Message=Method not found: '!!0 Microsoft.Extensions.AI.IEmbeddingGenerator2.GetService(System.Object)'.
Source=LangChain.Providers.LLamaSharp
StackTrace:
at LangChain.Providers.LLamaSharp.LLamaSharpEmbeddings..ctor(LLamaSharpConfiguration configuration)
`
Steps to reproduce the bug
Create a console app and add required packages
Copy and paste the given code to the main method
Adjust the address of the model to your local address
Describe the bug
I'm trying to use
LLMSharpEmbeddings
to use a SqlLite db to setup a RAG:However at this line:
the following exception is thrown:
System.MissingMethodException HResult=0x80131513 Message=Method not found: '!!0 Microsoft.Extensions.AI.IEmbeddingGenerator
2.GetService(System.Object)'.Source=LangChain.Providers.LLamaSharp
StackTrace:
at LangChain.Providers.LLamaSharp.LLamaSharpEmbeddings..ctor(LLamaSharpConfiguration configuration)
`
Steps to reproduce the bug
Expected behavior
No response
Screenshots
NuGet package version
Additional context
I also tried this:
The text was updated successfully, but these errors were encountered: