mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Default temperature of Gemini models to 1.0 to try avoid repetition
This is the default temperature for non-thinking gemini models on ai studio. See if using this alleviates the problem.
This commit is contained in:
@@ -166,7 +166,7 @@ def converse_gemini(
|
||||
model: Optional[str] = "gemini-2.0-flash",
|
||||
api_key: Optional[str] = None,
|
||||
api_base_url: Optional[str] = None,
|
||||
temperature: float = 0.4,
|
||||
temperature: float = 1.0,
|
||||
completion_func=None,
|
||||
conversation_commands=[ConversationCommand.Default],
|
||||
max_prompt_size=None,
|
||||
|
||||
@@ -78,7 +78,7 @@ def get_gemini_client(api_key, api_base_url=None) -> genai.Client:
|
||||
reraise=True,
|
||||
)
|
||||
def gemini_completion_with_backoff(
|
||||
messages, system_prompt, model_name, temperature=0.8, api_key=None, api_base_url=None, model_kwargs=None, tracer={}
|
||||
messages, system_prompt, model_name, temperature=1.0, api_key=None, api_base_url=None, model_kwargs=None, tracer={}
|
||||
) -> str:
|
||||
client = gemini_clients.get(api_key)
|
||||
if not client:
|
||||
|
||||
Reference in New Issue
Block a user