Missing options in OllamaEmbeddings
of langchain_ollama.embeddings
after migration from langchain_community.embeddings
#29294
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Checked other resources
Example Code
There are no options to set parameters such as max tokens in OllamaEmbeddings imported from langchain_ollama.
Running the following code yields errors:
Previously, these were available:
Error Message and Stack Trace (if applicable)
If the user tries to set the configurations like before, the following trace occurs:
Note: This error occurs because this functionality was removed but it is much needed.
Description
I am trying to use
OllamaEmbeddings
imported fromlangchain_ollama
. The issue arises that options that were previously available are (such asnum_ctx
) not available now.Discussed in #29113
Originally posted by Marsman1996 January 9, 2025
For
OllamaEmbeddings
fromlangchain_community.embeddings
, I can use the following code to set max tokens:But how to set max tokens for
OllamaEmbeddings
fromlangchain_ollama.embeddings
?System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: