Skip to content

Commit

Permalink
Run black formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
kaancayli committed Feb 15, 2024
1 parent b18b16e commit 46c09a5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@


class BasePipeline(metaclass=ABCMeta):
""" Abstract class for all pipelines """
"""Abstract class for all pipelines"""

def __init__(self, name=None):
self.name = name

def __repr__(self):
return f'{self.__class__.__name__} {self.name if self.name is not None else id(self)}'
return f"{self.__class__.__name__} {self.name if self.name is not None else id(self)}"

def __str__(self):
return f'{self.__class__.__name__} {self.name if self.name is not None else id(self)}'
return f"{self.__class__.__name__} {self.name if self.name is not None else id(self)}"

@abstractmethod
def run(self, *args, **kwargs) -> IrisMessage:
""" Run the pipeline """
"""Run the pipeline"""
raise NotImplementedError


Expand All @@ -29,7 +30,7 @@ def __init__(self, llm, name=None):
self.pipeline = {"query": itemgetter("query")} | llm | StrOutputParser()

def run(self, *args, query: IrisMessage, **kwargs) -> IrisMessage:
""" A simple pipeline that does not have any memory etc."""
"""A simple pipeline that does not have any memory etc."""
if query is None:
raise ValueError("IrisMessage must not be None")
message = query.text
Expand Down

0 comments on commit 46c09a5

Please sign in to comment.