mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
Default to non-zero temperature for all queries to Gemini models.
It may mitigate the intermittent invalid json output issues. Model maybe going into repetition loops, non-zero temp may avoid that.
This commit is contained in:
@@ -34,7 +34,7 @@ def extract_questions_gemini(
|
|||||||
model: Optional[str] = "gemini-2.0-flash",
|
model: Optional[str] = "gemini-2.0-flash",
|
||||||
conversation_log={},
|
conversation_log={},
|
||||||
api_key=None,
|
api_key=None,
|
||||||
temperature=0,
|
temperature=0.2,
|
||||||
max_tokens=None,
|
max_tokens=None,
|
||||||
location_data: LocationData = None,
|
location_data: LocationData = None,
|
||||||
user: KhojUser = None,
|
user: KhojUser = None,
|
||||||
@@ -121,7 +121,7 @@ def gemini_send_message_to_model(
|
|||||||
api_key,
|
api_key,
|
||||||
model,
|
model,
|
||||||
response_type="text",
|
response_type="text",
|
||||||
temperature=0,
|
temperature=0.2,
|
||||||
model_kwargs=None,
|
model_kwargs=None,
|
||||||
tracer={},
|
tracer={},
|
||||||
):
|
):
|
||||||
|
|||||||
Reference in New Issue
Block a user