Skip to content

Commit ccd6b1b

Browse files
committed
Set temp value to 0 to redcue the randomness of the output
Signed-off-by: Tarun Kumar <takumar@redhat.com>
1 parent bfcf992 commit ccd6b1b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

utilities/plugins/openai_plugin.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,15 @@ def _construct_request_data(
159159
"""
160160
data = {}
161161
if OpenAIEnpoints.CHAT_COMPLETIONS in endpoint:
162-
data = {"messages": query, "temperature": 0.1, "seed": 1037, "stream": streaming}
162+
data = {"messages": query, "temperature": 0, "seed": 1037, "stream": streaming}
163163
elif OpenAIEnpoints.EMBEDDINGS in endpoint:
164164
data = {
165165
"input": query["text"],
166166
"encoding_format": 0.1,
167+
"temperature": 0,
167168
}
168169
else:
169-
data = {"prompt": query["text"], "temperature": 1.0, "top_p": 0.9, "seed": 1037, "stream": streaming}
170+
data = {"prompt": query["text"], "temperature": 0, "top_p": 0.9, "seed": 1037, "stream": streaming}
170171

171172
if self.model_name:
172173
data["model"] = self.model_name

0 commit comments

Comments
 (0)