fix(backend/llm): update call function to use dynamic temperature and top_p parameters
This commit is contained in:
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user