)
                if stop:
                    # Enforce stop tokens
                    text = enforce_stop_tokens(text, stop)
                # Append the processed text to results
                text_generations.append(text)
        return LLMResult(
            generations=[[Generation(text=text)] for text in text_generations]
        )