-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Error: Method not found: 'System.Threading.Tasks.Task`1<Ollama.GenerateEmbeddingResponse> Ollama.OllamaApiClient.GenerateEmbeddingAsync( #338
Comments
Possibly related to recent changes in the Ollama client, I'll let you know when it's fixed |
Alright, Thank you. Which versions of libraries/Ollama client can I use in the meantime? |
I updated Ollama SDK dependency to latest, new version of LangChain should be available in 5-10 minutes. |
I think it's because default url was changed. You can set custom url in OllamaProvider ctor("http://localhost:11434/api") or just wait for new NuGet |
Awesome!!... Thanks a lot. The embeddings are created successfully. |
Describe the bug
I get the below error:
Method not found: 'System.Threading.Tasks.Task`1<Ollama.GenerateEmbeddingResponse> Ollama.OllamaApiClient.GenerateEmbeddingAsync(Ollama.GenerateEmbeddingRequest, System.Threading.CancellationToken)'.
When executing the following lines:
var vectorCollection = await vectorDatabase.AddDocumentsFromAsync(
embeddingModel, // Used to convert text to embeddings
dimensions: 384, // Should be 1536 for TextEmbeddingV3SmallModel
//dimensions: 384, //for all-MiniLM- 384 dimensions
dataSource: DataSource.FromUrl("https://canonburyprimaryschool.co.uk/wp-content/uploads/2016/01/Joanne-K.-Rowling-Harry-Potter-Book-1-Harry-Potter-and-the-Philosophers-Stone-EnglishOnlineClub.com_.pdf"),
collectionName: "harrypotter", // Can be omitted, use if you want to have multiple collections
textSplitter: null,
behavior: AddDocumentsToDatabaseBehavior.JustReturnCollectionIfCollectionIsAlreadyExists);
OR
var similarDocuments = await vectorCollection.GetSimilarDocuments(embeddingModel, question, amount: 5);
I am using version 0.14.1-dev60 in all the nuget packages.
I installed Ollama on my PC and running on the default port: 11434
Below is the entire code:
Steps to reproduce the bug
Expected behavior
No response
Screenshots
No response
NuGet package version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: