add new LLM provider io.net gemini g4f

This commit is contained in:
Freestyle-Play
2025-09-25 04:27:17 +03:00
parent f2c7dcbeb6
commit e391a86cb5
17 changed files with 1411 additions and 1223 deletions

View File

@@ -0,0 +1,18 @@
from abc import ABC, abstractmethod
class BaseLLMProvider(ABC):
"""
Абстрактный базовый класс для всех провайдеров LLM.
Каждый провайдер должен реализовать метод generate.
"""
def __init__(self, api_key: str | None = None):
self.api_key = api_key
@abstractmethod
def generate(self, model: str, system_prompt: str, user_prompt: str, temp: float):
"""
Основной метод для генерации текста.
Должен возвращать кортеж из двух строк: (чистый_текст, markdown_текст)
"""
pass