based on the keynote
The past, present, and future of AI for application developers
by Steve Sanderson
at NDC London 2025
https://youtu.be/awztkr8n0AA?si=_fmkumuKlAGU_14M&t=1357
- https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-completion
- https://github.com/ollama/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values
brew install ollama
ollama serve &
ollama run deepseek-r1:8b
/bye
the web server is still working, serving at http://localhost:11434/
curl --request POST \
--url http://localhost:11434/api/generate \
--header 'content-type: application/json' \
--data '{
"model": "deepseek-r1",
"prompt": "the weather in London is",
"raw": true,
"stream": false,
"options": {
"temperature": 0.1,
"num_predict": 40
}
}'
curl --request POST \
--url http://localhost:11434/api/generate \
--header 'content-type: application/json' \
--data '{
"model": "deepseek-r1",
"prompt": "A: Albert; B: Bryan; C: Carl; D:",
"raw": true,
"stream": false,
"options": {
"temperature": 0.1,
"num_predict": 40
}
}'
curl --request POST \
--url http://localhost:11434/api/generate \
--header 'content-type: application/json' \
--data '{
"model": "deepseek-r1",
"prompt": "This is the transcript of a conversation between a human user and a super-intelligent AI.\nIt answers in exactly 3 words.\n[USER]What can you do?[/USER]\n[AI]Answer any question[/AI]\n[USER]What is 1+1?[/USER]\n[AI]It is 2[/AI]\n[USER]What'\''s the capital of Sweden?[/USER]\n[AI]It is Stockholm[/AI]\n[USER]What is plastic made from?[/USER]\n[AI]",
"raw": true,
"stream": false,
"options": {
"temperature": 0.1,
"num_predict": 40,
"stop": ["[/AI]"]
}
}'
curl --request POST \
--url http://localhost:11434/api/generate \
--header 'content-type: application/json' \
--data '{
"model": "deepseek-r1",
"prompt": "This is the transcript of a conversation between a human user and a super-intelligent AI.\nIf the AI needs to look up weather information, it emits the syntax [WEATHER]location[/WEATHER]\n[USER]What can you do?[/USER]\n[AI]Answer any question and look up weather information[/AI]\n[USER]What is 1+1?[/USER]\n[AI]It is 2[/AI]\n[USER]What'\''s the weather in Lisbon?[/USER]\n[WEATHER]Lisbon[/WEATHER]\n[ANSWER]Rainy[/ANSWER]\n[AI]It'\''s rainy in Lisbon[/AI]\n[USER]What'\''s the weather in Seattle?[/USER]\n",
"raw": true,
"stream": false,
"options": {
"temperature": 0.1,
"num_predict": 40,
"stop": ["[/AI]", "[ANSWER]"]
}
}'
curl --request POST \
--url http://localhost:11434/api/generate \
--header 'content-type: application/json' \
--data '{
"model": "deepseek-r1",
"prompt": "This is the transcript of a conversation between a human user and a super-intelligent AI.\nIf the AI needs to look up weather information, it emits the syntax [WEATHER]location[/WEATHER]\n[USER]What can you do?[/USER]\n[AI]Answer any question and look up weather information[/AI]\n[USER]What is 1+1?[/USER]\n[AI]It is 2[/AI]\n[USER]What'\''s the weather in Lisbon?[/USER]\n[WEATHER]Lisbon[/WEATHER]\n[ANSWER]Rainy[/ANSWER]\n[AI]It'\''s rainy in Lisbon[/AI]\n[USER]What'\''s the weather in Seattle?[/USER]\n[ANSWER]Sunny[/ANSWER]\n[AI]",
"raw": true,
"stream": false,
"options": {
"temperature": 0.1,
"num_predict": 40,
"stop": ["[/AI]", "[ANSWER]"]
}
}'
You can also import this collection of requests file into Bruno if you find that more convenient.