Improve extract_questions func. Set message role to user, not assistant

Previous behavior of passing message with role = "assistant was
reducing instruction following quality of the model
This commit is contained in:
Debanjum Singh Solanky
2024-04-26 11:38:46 +05:30
parent 346499f12c
commit 4395ed8065

View File

@@ -59,7 +59,7 @@ def extract_questions(
yesterday_date=(today - timedelta(days=1)).strftime("%Y-%m-%d"),
location=location,
)
messages = [ChatMessage(content=prompt, role="assistant")]
messages = [ChatMessage(content=prompt, role="user")]
# Get Response from GPT
response = completion_with_backoff(