def_generate(self,prompts:list[str],stop:Optional[list[str]]=None)->list[str]:final_results:list[str]=[]iflen(prompts)==0:returnfinal_resultsparams=to_model_instance(self.parameters,TextGenerationParameters)params.stop_sequences=stoporparams.stop_sequencesforresponseinself.client.text.generation.create(model_id=self.model,inputs=prompts,parameters=params):forresultinresponse.results:generated_text=result.generated_textor""logger.info("Output of GENAI call: {}".format(generated_text))final_results.append(generated_text)returnfinal_results