Spaces:
Sleeping
Sleeping
File size: 432 Bytes
976b948 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
"""Base class for LLM providers"""
from abc import abstractmethod
from typing import Dict, Optional
class BaseLLMProvider:
@abstractmethod
def __init__(self):
"""LLM provider initialization"""
raise NotImplementedError
@abstractmethod
def complete(self, prompt: str = "") -> str:
"""LLM chat completion implementation by each provider"""
raise NotImplementedError
|