[Request] ollama options add num_ctx if custom model maxToken is set. #2865
Labels
🌠 Feature Request
New feature or request | 特性与建议
Inactive
No response in 30 days | 超过 30 天未活跃
ollama
Relative to Ollama Provider and ollama models
🥰 Feature Description
Need a way to set
n_ctx
by custom.num_ctx
is2048
length in default.As #1244 define the
CUSTOM_MODELS
type. Infact the describtion ofmaxToken
is close to usage ofnum_ctx
.Or Maybe use another variable?
🧐 Proposed Solution
lobe-chat/src/libs/agent-runtime/ollama/index.ts
Line 42 in fef62d6
maybe if
model.tokens
exist ,then options add itemn_ctx: model.tokens
📝 Additional Information
https://github.com/ollama/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values
https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-specify-the-context-window-size
The text was updated successfully, but these errors were encountered: