mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Does chat take options? #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tmceld on GitHub (Jan 31, 2024).
Hi,
I'm trying to keep hallucinations down, so was playing around with
temperaturetop_pandtop_k:foo = ollama.chat(model='llama2', options={"temperature": 0.1, "top_p": 0.10, "top_k": 1}, messages=[{'role': 'system', 'content': systemStr},but finding no discernable difference, when it struck me that maybe chat, unlike generate, doesn't take options?
is this the case? I am using chat as i want to send
messages@mxyng commented on GitHub (Jan 31, 2024):
It does. You can verify this by setting something like
temperature=0which will produce the same output each time@tmceld commented on GitHub (Feb 1, 2024):
Firstly, thank you for your reply, but I am still not any wiser - i was setting something like
temperature=0i was passing it as a dictionaryoptions={"temperature": 0.1}I wonder, in terms of a chat call, where i set it?@joelewing commented on GitHub (Feb 21, 2024):
@tmceld I found an example here: https://github.com/ollama/ollama-python/blob/main/examples/fill-in-middle/main.py#L16
@tmceld commented on GitHub (Feb 23, 2024):
thanks @joelewing i had found examples on the generate endpoint, but i was wondering about the chat endpoint