Skip to content

Commit 6529326

Browse files
committed
allow temperatures up to 1.0 when function calling
1 parent d99f362 commit 6529326

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

koboldcpp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,8 +2269,8 @@ def transform_genparams(genparams, api_format):
22692269
if used_tool_json:
22702270
toolparamjson = None
22712271
toolname = None
2272-
# Set temperature low automatically if function calling
2273-
genparams["temperature"] = 0.1
2272+
# Set temperature lower automatically if function calling, cannot exceed 0.5
2273+
genparams["temperature"] = (1.0 if genparams.get("temperature", 0.5) > 1.0 else genparams.get("temperature", 0.5))
22742274
genparams["using_openai_tools"] = True
22752275
# Set grammar to llamacpp example grammar to force json response (see https://github.com/ggerganov/llama.cpp/blob/master/grammars/json_arr.gbnf)
22762276
genparams["grammar"] = jsongrammar

0 commit comments

Comments
 (0)