Skip to content

Commit

Permalink
Moved docstring, removed pipeline parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
NotBioWaste905 committed Nov 13, 2024
1 parent fb3142b commit ff81267
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions chatsky/conditions/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@


class LLMCondition(BaseCondition):
"""
Basic function for using LLM in condition cases.
:param model_name: Key of the model from the `Pipeline.models` dictionary.
:param prompt: Prompt for the model to use on users input.
:param method: Method that takes models output and returns boolean.
"""
model_name: str
prompt: str
method: BaseMethod
pipeline: Pipeline

async def call(self, ctx: Context) -> bool:
"""
Basic function for using LLM in condition cases.
:param model_name: Key of the model from the `Pipeline.models` dictionary.
:param prompt: Prompt for the model to use on users input.
:param method: Method that takes models output and returns boolean.
"""
model = self.pipeline.models[self.model_name]
model = ctx.pipeline.models[self.model_name]
return await model.condition(self.prompt, self.method)

0 comments on commit ff81267

Please sign in to comment.