目录
II.下载
https://ollama.com/download/windows
OllamaSetup.exe
https://github.com/meta-llama/llama3

II.验证ollama安装
cmd ollama

II.安装llama3 和启动
ollama run llama3
ollama run llama3

II.命令行调用

II.api调用
https://github.com/ollama/ollama/blob/main/docs/api.md
curl http://localhost:11434/api/generate -d '{
"model": "llama3",
"prompt": "Why is the sky blue?",
"stream": false
}'
windows api调用
cmd powershell
Invoke-RestMethod -Uri http://localhost:11434/api/generate -Method Post -ContentType "application/json" -Body '{"model": "llama3", "prompt": "Why is the sky blue?", "stream": false}'
C:\Users\Administrator>powershell
Windows PowerShell
版权所有(C) Microsoft Corporation。保留所有权利。
安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows
PS C:\Users\Administrator> Invoke-RestMethod -Uri http://localhost:11434/api/generate -Method Post -ContentType "application/json" -Body '{"model": "llama3", "prompt": "Why is the sky blue?", "stream": false}'

II.参考文献
https://ollama.com/download/windows
https://github.com/meta-llama/llama3
https://github.com/ollama/ollama/blob/main/docs/api.md
本文详细介绍了OLLAMA3的下载、安装过程,包括通过命令行验证安装、使用API在WindowsPowerShell中生成内容。重点展示了如何通过curl和WindowsAPI调用OLLAMAAPI接口。

2万+

被折叠的 条评论
为什么被折叠?



