feat(devgen): add Ollama provider and host configuration

Add support for the Ollama provider in the AI generation pipeline and expose a configurable host address.

New Features:
- Introduce `ollama` as a selectable provider.
- Add `ollama_host` configuration option with default `http://localhost:11434`.

Enhancements:
- Extend provider list in error message to include Ollama.
This commit is contained in:
sankalp committed 2026-06-06 16:30:52 +05:45
1 parent 55ebbaef15
commit 7016cff3a7
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -24,7 +24,8 @@ def generate_with_ai(
except ModuleNotFoundError as e:
raise ImportError(
f"Provider `{provider}` is not a built-in module: {e}. "
f"Available providers: gemini, openai, anthropic, huggingface, openrouter."
f"Available providers: gemini, openai, anthropic, huggingface, "
f"openrouter, ollama."
) from e
except AttributeError as e:
raise ImportError(
+1
View File
@@ -229,6 +229,7 @@ def load_config() -> Dict[str, Any]:
"api_key": "",
"emoji": True,
"max_groups": 5,
"ollama_host": "http://localhost:11434",
}
try:
with config_path.open("w", encoding="utf-8") as f: