diff options
| -rwxr-xr-x | ollama/ollama.py | 17 | ||||
| -rw-r--r-- | ollama/requirements.txt | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/ollama/ollama.py b/ollama/ollama.py new file mode 100755 index 000000000..ea183b398 --- /dev/null +++ b/ollama/ollama.py @@ -0,0 +1,17 @@ +from ollama import chat, ChatResponse + +model = "deepseek-r1:70b" + +response: ChatResponse = chat( + model=model, messages=[ + { + 'role': 'user', + 'content': 'Hello, how are you?', + } + ], + stream=True +) + +for chunk in response: + print(chunk['message']['content'], end='', flush=True) +print("\n") diff --git a/ollama/requirements.txt b/ollama/requirements.txt new file mode 100644 index 000000000..403abba66 --- /dev/null +++ b/ollama/requirements.txt @@ -0,0 +1 @@ +ollama |