Zack Saadioui
8/27/2024
1
2
bash
curl -fsSL https://ollama.com/install.sh | sh
1
2
bash
ollama --version
1
2
bash
ollama pull model_name
1
2
bash
ollama pull llama3
1
restmap.conf
1
2
3
4
5
ini
[script:my_ollama_script]
match = /ollama
handler = MyFileName.MyClassName
requireAuthentication = true
1
splunk.rest.BaseRestHandler
1 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 2024