How to set max tokens for OllamaEmbeddings
from langchain_ollama.embeddings
#29113
-
For embedding_client = OllamaEmbeddings(
base_url=f"http://localhost:11434",
model="nomic-embed-text",
num_ctx=6144,
) But how to set max tokens for |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
To set the maximum number of tokens for from langchain_ollama import OllamaEmbeddings
embedding_client = OllamaEmbeddings(
base_url="http://localhost:11434",
model="nomic-embed-text",
num_ctx=6144,
) The To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
I have the same question too. Can anyone offer a help? |
Beta Was this translation helpful? Give feedback.
-
Hello @Marsman1996 and @pvz122, |
Beta Was this translation helpful? Give feedback.
Hello @Marsman1996 and @pvz122,
I noticed that this functionality was missed in the package
langchain_ollama
. I have created a PR to #29296 solve your issue.