Spaces:
Running
Running
class Chain: | |
def __init__(self, prompt, model): | |
self.prompt = prompt | |
self.model = model | |
def create_prompt_model_chain(self): | |
return self.prompt | self.model | |
def invoke_prompt_model_chain(self, invoke_params): | |
chain = self.create_prompt_model_chain() | |
return chain.invoke(invoke_params) | |