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 ""