trading_agent.doctor.checks.ollama_backend_check
¶
Checks that an Ollama backend's server answers and has the model.
Typical usage example:
result = OllamaBackendCheck('gemma', backend_configuration).run()
OllamaBackendCheck
¶
Bases: DoctorCheck
Checks one backend of kind "ollama".
Creates the check.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backend_name
|
str
|
The backend's name in trading_agent.toml. |
required |
backend_configuration
|
BackendConfiguration
|
Its settings. |
required |
Source code in src/trading_agent/doctor/checks/ollama_backend_check.py
run
¶
Lists Ollama's installed models and looks for the configured one.
Returns:
| Type | Description |
|---|---|
CheckResult
|
OK when the model is installed, failed when Ollama is unreachable or lacks the model. |