目录
II.下载
II.验证ollama安装
II.安装llama3 和启动
II.命令行调用
II.api调用
II.参考文献
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