mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 21:29:12 +00:00
Encourage Gemini to output more verbose responses
This commit is contained in:
@@ -156,6 +156,7 @@ def converse_gemini(
|
|||||||
day_of_week=current_date.strftime("%A"),
|
day_of_week=current_date.strftime("%A"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
system_prompt += f"{system_prompt}\n\n{prompts.gemini_verbose_language_personality}"
|
||||||
if location_data:
|
if location_data:
|
||||||
location_prompt = prompts.user_location.format(location=f"{location_data}")
|
location_prompt = prompts.user_location.format(location=f"{location_data}")
|
||||||
system_prompt = f"{system_prompt}\n{location_prompt}"
|
system_prompt = f"{system_prompt}\n{location_prompt}"
|
||||||
|
|||||||
@@ -45,6 +45,13 @@ Instructions:\n{bio}
|
|||||||
""".strip()
|
""".strip()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# To make Gemini be more verbose and match language of user's query.
|
||||||
|
# Prompt forked from https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models
|
||||||
|
gemini_verbose_language_personality = """
|
||||||
|
All questions should be answered comprehensively with details, unless the user requests a concise response specifically.
|
||||||
|
Respond in the same language as the query.
|
||||||
|
""".strip()
|
||||||
|
|
||||||
## General Conversation
|
## General Conversation
|
||||||
## --
|
## --
|
||||||
general_conversation = PromptTemplate.from_template(
|
general_conversation = PromptTemplate.from_template(
|
||||||
|
|||||||
Reference in New Issue
Block a user