Index
LLM backend abstraction layer.
| MODULE | DESCRIPTION |
|---|---|
anthropic |
Anthropic LLM backend via LiteLLM. |
base |
Abstract LLMBackend base class and factory. |
ollama |
Ollama LLM backend via LiteLLM. |
| CLASS | DESCRIPTION |
|---|---|
AnthropicBackend |
LLM backend that calls Anthropic models through LiteLLM. |
LLMBackend |
Abstract base class for LLM provider backends. |
OllamaBackend |
LLM backend that calls Ollama models through LiteLLM. |
| FUNCTION | DESCRIPTION |
|---|---|
from_config |
Instantiate the correct [ |
Classes¶
AnthropicBackend
¶
AnthropicBackend(config: LLMConfig)
Bases: LLMBackend
LLM backend that calls Anthropic models through LiteLLM.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
The LLM configuration section from the Foreman runtime config.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
complete |
Send a prompt to an Anthropic model and return the text response. |
LLMBackend
¶
OllamaBackend
¶
OllamaBackend(config: LLMConfig)
Bases: LLMBackend
LLM backend that calls Ollama models through LiteLLM.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
The LLM configuration section from the Foreman runtime config.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
complete |
Send a prompt to an Ollama model and return the text response. |
Functions¶
from_config
¶
from_config(config: LLMConfig) -> LLMBackend
Instantiate the correct LLMBackend from an LLMConfig.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
The LLM section of the Foreman runtime config.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
LLMBackend
|
A concrete |
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If |