gemma Data List

/ 목차 /
- ollama 설치 방법
- ollama 서비스 실행
- ollama 모델 다운로드
- ollama 모델 리스트 조회
- API 사용방법 : POST /api/generate
- API 사용방법 : POST /api/chat
ollama 설치 방법
command curl -fsSL https://ollama.com/install.sh | sh
ollama 서비스 실행
command ollama serve
ollama 모델 다운로드
command ollama pull gemma2
ollama 모델 리스트 조회
command ollama list
API 사용방법 : POST /api/generate
요청command curl http://localhost:11434/api/generate -d '{ "model": "gemma2", "prompt": "Why is the sky blue?" }'
응답{ "model": "gemma2", "created_at": "2023-08-04T08:52:19.385406455-07:00", "response": "The", "done": false }
API 사용방법 : POST /api/chat
요청command curl http://localhost:11434/api/chat -d '{ "model": "gemma2", "messages": [ { "role": "user", "content": "why is the sky blue?" } ] }'
응답{ "model": "gemma2", "created_at": "2023-08-04T08:52:19.385406455-07:00", "message": { "role": "assistant", "content": "The", "images": null }, "done": false }
Comment