Skip to content

Commit 41f74bd

Browse files
committed
fix: reducing Temprature of precise output
1 parent f1a0bc0 commit 41f74bd

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,4 @@ vector_store/results/*
9090
mlflow.db
9191
*.db
9292
mlruns/
93+
.devcontainer/

analysis/analyzer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def _call_groq(prompt: str, max_tokens: int) -> str:
255255
json={
256256
"model": GROQ_MODEL,
257257
"messages": [{"role": "user", "content": prompt}],
258-
"temperature": 0.2,
258+
"temperature": 0.1,
259259
"max_tokens": max_tokens,
260260
"response_format": {"type": "json_object"},
261261
},
@@ -299,7 +299,7 @@ def stream_transcript_groq(text: str, language: str = "en"):
299299
json={
300300
"model": GROQ_MODEL,
301301
"messages": [{"role": "user", "content": stream_prompt}],
302-
"temperature": 0.3,
302+
"temperature": 0.2,
303303
"max_tokens": 1000,
304304
"stream": True,
305305
},
@@ -330,7 +330,7 @@ def _call_ollama(prompt: str, max_tokens: int) -> str:
330330
"prompt": prompt,
331331
"stream": False,
332332
"format": "json",
333-
"options": {"temperature": 0.2, "num_predict": max_tokens},
333+
"options": {"temperature": 0.1, "num_predict": max_tokens},
334334
"think": False
335335
},
336336
timeout=90
@@ -349,7 +349,7 @@ def _call_groq_langchain(prompt: str, max_tokens: int) -> str:
349349
llm = ChatGroq(
350350
api_key=api_key,
351351
model=GROQ_MODEL,
352-
temperature=0.2,
352+
temperature=0.1,
353353
max_tokens=max_tokens,
354354
timeout=25,
355355
model_kwargs={"response_format": {"type": "json_object"}},
@@ -366,7 +366,7 @@ def _call_ollama_langchain(prompt: str, max_tokens: int) -> str:
366366
llm = LangChainOllama(
367367
base_url=OLLAMA_URL.replace("/api/generate", ""),
368368
model=OLLAMA_MODEL,
369-
temperature=0.2,
369+
temperature=0.1,
370370
num_predict=max_tokens,
371371
format="json",
372372
)
@@ -505,7 +505,7 @@ def _groq_demo_summary(text: str) -> str:
505505
f"{text[:1200]}"
506506
)
507507
}],
508-
"temperature": 0.2,
508+
"temperature": 0.1,
509509
"max_tokens": 120,
510510
},
511511
timeout=12

0 commit comments

Comments
 (0)