You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
swarms/swarms/models/base.py

19 lines
344 B

from abc import ABC, abstractmethod
class AbstractModel(ABC):
# abstract base class for language models
def __init__():
pass
@abstractmethod
def run(self, prompt):
# generate text using language model
pass
def chat(self, prompt, history):
pass
def __call__(self, task):
pass