Conversation
To support ollama/ollama#10584
aada745 to
eaad6df
Compare
|
|
||
| response = chat('deepseek-r1', messages=messages, think=True) | ||
|
|
||
| print('Thinking:\n========\n\n' + response.message.thinking) |
There was a problem hiding this comment.
| print('Thinking:\n========\n\n' + response.message.thinking) | |
| print('Thinking:') | |
| print(response.message.thinking) |
There was a problem hiding this comment.
ha turns out I did have a version like that before, but I really wanted to highlight that there are two fields now, so having two print lines total feels like it slightly helps with that
There was a problem hiding this comment.
Cool yeah that makes sense - could we just get rid of the === portion then and just do newline?
There was a problem hiding this comment.
the ===== is very intentional to do a markdown style header that's much more noticeable in its plaintext form, like
Thinking:
========
<Here is the thinking content>
Response:
========
<Here is the response>
| @@ -0,0 +1,13 @@ | |||
| from ollama import chat | |||
There was a problem hiding this comment.
Could we add this example to the examples/README.md
There was a problem hiding this comment.
oh thank you! I totally didn't see that file
|
What's with ollama.generate? That should get the think parameter too. |
apologies, should be fixed in #524, will try to get that published soon |
|
In the meantime I switched to .chat and I wonder what may be the purpose of .generate when there is .chat with stream=True. |
To support ollama/ollama#10584