From 747617ebfbcd4b708ba52984024fa9caacf20832 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Thu, 5 Feb 2026 20:56:06 +0000 Subject: [PATCH] Initial upload: Local LLM Prompt Manager CLI tool --- src/llm/base.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/llm/base.py diff --git a/src/llm/base.py b/src/llm/base.py new file mode 100644 index 0000000..1ab5910 --- /dev/null +++ b/src/llm/base.py @@ -0,0 +1,28 @@ +"""Base LLM client interface.""" + +from abc import ABC, abstractmethod +from collections.abc import Iterator + + +class LLMClient(ABC): + """Abstract base class for LLM clients.""" + + @abstractmethod + def generate(self, prompt: str, **kwargs) -> str: + """Generate a response from the LLM.""" + pass + + @abstractmethod + def stream_generate(self, prompt: str, **kwargs) -> Iterator[str]: + """Stream a response from the LLM.""" + pass + + @abstractmethod + def test_connection(self) -> bool: + """Test if the LLM service is available.""" + pass + + @abstractmethod + def get_available_models(self) -> list[str]: + """Get list of available models.""" + pass