Zack Saadioui
8/27/2024
1
2
bash
curl -fsSL https://ollama.com/install.sh | sh1
2
bash
ollama --version1
2
bash
ollama pull model_name1
2
bash
ollama pull llama31
restmap.conf1
2
3
4
5
ini
 [script:my_ollama_script]
 match = /ollama
 handler = MyFileName.MyClassName
 requireAuthentication = true1
splunk.rest.BaseRestHandler1 2 3 4 5 6 7 8 9# Custom logic here to process requests and interact with Ollama response = requests.post('http://localhost:11434/api/chat', json={ 'model': 'llama3', 'messages': [{ 'role': 'user', 'content': 'How is the weather today?' }] }) return response.json()
Copyright © Arsturn 2025