mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 21:29:11 +00:00
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:
@@ -59,7 +59,7 @@ def extract_questions(
|
|||||||
yesterday_date=(today - timedelta(days=1)).strftime("%Y-%m-%d"),
|
yesterday_date=(today - timedelta(days=1)).strftime("%Y-%m-%d"),
|
||||||
location=location,
|
location=location,
|
||||||
)
|
)
|
||||||
messages = [ChatMessage(content=prompt, role="assistant")]
|
messages = [ChatMessage(content=prompt, role="user")]
|
||||||
|
|
||||||
# Get Response from GPT
|
# Get Response from GPT
|
||||||
response = completion_with_backoff(
|
response = completion_with_backoff(
|
||||||
|
|||||||
Reference in New Issue
Block a user