I am taking this course on Coursera and at Lesson 10 of Mudule 1, each time while creating a poem with a given number of lines, the returned result doesn’t have the # of lines i have specified to llm. ANyone else faced this?
Example
Use print_llm_response() to print a poem with the specified number of lines. Use the
number_of_lines = 10
prompt = f"““Write a poem with {number_of_lines} lines””"
print_llm_response(prompt)
In the still of night, the stars shine bright,
Whispers of the wind, a gentle delight.
Moonlight dances on the silent sea,
A symphony of nature’s harmony.
The world sleeps, wrapped in dreams,
Silent shadows, not all as they seem.
Nature’s lullaby, a soothing song,
In the darkness, we all belong.
Another example:
number_of_lines = 13
prompt = f"““Write a poem with {number_of_lines} lines””"
print_llm_response(prompt)
In the still of night, the stars softly gleam,
Whispers of dreams in the moon’s gentle beam.
Silent shadows dance in the pale moonlight,
Echoes of memories, lost in the night.
A symphony of silence fills the air,
As the world sleeps without a care.
Nature’s lullaby soothes the weary soul,
Embracing darkness, making us whole.
In the quietude, we find our peace,
A moment of solace, a sweet release.