From d779a6b37d1629f8ffff0afc46aa494dc86cb1b8 Mon Sep 17 00:00:00 2001 From: Till Immer Date: Sun, 5 Jul 2026 09:13:53 +0000 Subject: [PATCH] =?UTF-8?q?llm/base.py=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- llm/base.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 llm/base.py diff --git a/llm/base.py b/llm/base.py new file mode 100644 index 0000000..d27f83a --- /dev/null +++ b/llm/base.py @@ -0,0 +1,24 @@ +from typing import List, Dict, Any, Optional + + +class LLMBase: + """ + Abstrakte Basisklasse für alle LLM-Backends (Bedrock, später evtl. lokal, etc.) + """ + + async def chat( + self, + messages: List[Dict[str, str]], + tools: Optional[List[Dict[str, Any]]] = None + ) -> Dict[str, Any]: + """ + Führt einen Chat-Request aus. + + Args: + messages: Chat History im OpenAI/Bedrock Format + tools: Optional Tool Definitionen (MCP → Bedrock konvertiert) + + Returns: + Roh-Response vom Modell (provider-spezifisch) + """ + raise NotImplementedError("chat() muss vom konkreten LLM implementiert werden") \ No newline at end of file