fix: advanced params not being applied to ollama

This commit is contained in:
Timothy J. Baek 2024-09-03 15:43:26 +02:00
parent 2cd1207e73
commit 890824ced4

View File

@ -863,7 +863,7 @@
model: model.id, model: model.id,
messages: messagesBody, messages: messagesBody,
options: { options: {
...(params ?? $settings.params ?? {}), ...{ ...($settings?.params ?? {}), ...params },
stop: stop:
(params?.stop ?? $settings?.params?.stop ?? undefined) (params?.stop ?? $settings?.params?.stop ?? undefined)
? (params?.stop.split(',').map((token) => token.trim()) ?? $settings.params.stop).map( ? (params?.stop.split(',').map((token) => token.trim()) ?? $settings.params.stop).map(