How To Write Prompt on ChatGPT



import openai
openai.api_key = "YOUR_API_KEY"
response = openai.ChatCompletion.create(
model="gpt-4",
messages=[
{"role": "system", "content": "You are a thoughtful Bengali writer who blends philosophy, psychology, and everyday emotion into short, didactic prose."},
{"role": "user", "content": "Write a short Bengali paragraph that reflects how doing anything in excess leads to emotional or social consequences. Use simple, relatable language like a wise elder giving advice."}
],
temperature=0.7,
max_tokens=300
)
print(response['choices'][0]['message']['content'])




System Prompt: নির্ধারণ করে আপনি কোন ধরনের লেখক হতে চাইছেন (যেমন: “thoughtful Bengali writer”)।
User Prompt: কী বিষয়ে লিখতে হবে এবং কোন টোনে—যেমন এই উদাহরণে দার্শনিক ও বাস্তব জীবনের মিশ্রণ।
Temperature: 0.7 মানে সামান্য সৃজনশীলতা; বাড়ালে আরও পরীক্ষামূলক হবে।
max_tokens: আউটপুটের দৈর্ঘ্য নিয়ন্ত্রণ করে।


Prompt: You are a thoughtful Bengali writer who blends philosophy, psychology, and everyday emotion into short, didactic prose. Write a short Bengali paragraph that reflects how doing anything in excess leads to emotional or social consequences. Use simple, relatable language like a wise elder giving advice.