Initial commit: BLIGHT: CUE
Webhook listener that monitors Gitea repos for BLIGHT: triggers in markdown files, processes them via Gemini 2.5 Flash-Lite, and writes results back in-place. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
21
ai/base.py
Normal file
21
ai/base.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class AIProvider(ABC):
|
||||
"""Base class for all AI provider implementations.
|
||||
|
||||
To add a new provider, subclass this and implement `complete`, then
|
||||
instantiate your provider in `processor.py` instead of GeminiProvider.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def complete(self, document: str, instruction: str) -> str:
|
||||
"""Process an instruction in the context of a full document.
|
||||
|
||||
Args:
|
||||
document: The full markdown document text (for context).
|
||||
instruction: The BLIGHT instruction extracted from the trigger line.
|
||||
|
||||
Returns:
|
||||
The text to insert in place of the trigger line.
|
||||
"""
|
||||
Reference in New Issue
Block a user