mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 15:00:57 +03:00
Bugfix/Update ollama embedding to use mmap true by default (#2862)
update ollama embedding to use mmap true by default
This commit is contained in:
@@ -61,6 +61,7 @@ class OllamaEmbedding_Embeddings implements INode {
|
||||
label: 'Use MMap',
|
||||
name: 'useMMap',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
}
|
||||
@@ -83,7 +84,9 @@ class OllamaEmbedding_Embeddings implements INode {
|
||||
const requestOptions: OllamaInput = {}
|
||||
if (numThread) requestOptions.numThread = parseFloat(numThread)
|
||||
if (numGpu) requestOptions.numGpu = parseFloat(numGpu)
|
||||
if (useMMap !== undefined) requestOptions.useMMap = useMMap
|
||||
|
||||
// default useMMap to true
|
||||
requestOptions.useMMap = useMMap === undefined ? true : useMMap
|
||||
|
||||
if (Object.keys(requestOptions).length) obj.requestOptions = requestOptions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user