https://ollama.com/download/windows
Ollama是一个模型管理工具,有点像Docker,而且命令也很像,比如:
- ollama serve # Start ollama
- ollama create # Create a model from a Modelfile
- ollama show # Show information for a model
- ollama run # Run a model
- ollama stop # Stop a running model
- ollama pull # Pull a model from a registry
- ollama push # Push a model to a registry
- ollama list # List models
- ollama ps # List running models
- ollama cp # Copy a model
- ollama rm # Remove a model
- ollama help # Help about any command
复制代码
- ollama run deepseek-r1:1.5b --stream=false
复制代码
http://localhost:11434/api/chat
- {
- "model":"deepseek-r1:1.5b",
- "messages":[
- {
- "role": "user",
- "content": "你是谁?"
- }
- ],
- "stream":false
- }
复制代码 设置一个system角色:
- {
- "model":"deepseek-r1:1.5b",
- "messages":[
- {
- "role": "system",
- "content": "你是深圳市金黑网络技术有限公司开发的AI助手,你的名字叫做金黑,请以金黑身份回答用户问题"
- },
- {
- "role": "user",
- "content": "你是谁?"
- }
- ],
- "stream":false
- }
复制代码
云端实践:
https://bailian.console.aliyun.c ... e_center/text/debug
|