java.lang.Object
com.example.cab302project.OllamaService
Small helper for requesting crime summaries from a local Ollama model.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateSummary(String prompt) Sends a prompt to Ollama and returns the generated response text.
-
Constructor Details
-
OllamaService
public OllamaService()
-
-
Method Details
-
generateSummary
Sends a prompt to Ollama and returns the generated response text.- Parameters:
prompt- the complete prompt to send to the local model- Returns:
- the model response text
- Throws:
IOException- if Ollama is not running or the response cannot be readInterruptedException- if the request is interrupted
-