From 1e000319d576cd2a8a5fbb082641a4c5cbce8a3f Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Thu, 4 Jun 2026 20:19:16 +0200 Subject: [PATCH] fix(backend/llm): update call function to use dynamic temperature and top_p parameters --- service/src/main/inse/integrations/llm.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/service/src/main/inse/integrations/llm.py b/service/src/main/inse/integrations/llm.py index 098c1e12..01eed1c5 100644 --- a/service/src/main/inse/integrations/llm.py +++ b/service/src/main/inse/integrations/llm.py @@ -6,7 +6,9 @@ def call( system_prompt: str, user_prompt: str, model: str = None, - timeout: int = 30 + timeout: int = 30, + temperature: float = 1.0, + top_p: float = 0.95, ) -> str: if model is None: @@ -25,8 +27,8 @@ def call( {"role": "user", "content": user_prompt}, ], - temperature=1.0, - top_p=0.95, + temperature=temperature, + top_p=top_p, extra_body={"top_k": 64}, ) return response.choices[0].message.content or ""