How to set max tokens for OllamaEmbeddings
from langchain_ollama.embeddings
#29113
Unanswered
Marsman1996
asked this question in
Q&A
Replies: 2 comments 2 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.
2 replies
-
I have the same question too. Can anyone offer a help? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
?Beta Was this translation helpful? Give feedback.
All reactions