File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -100,13 +100,17 @@ def create(args: CLIChatCompletionCreateArgs) -> None:
100
100
"messages" : [
101
101
{"role" : cast (Literal ["user" ], message .role ), "content" : message .content } for message in args .message
102
102
],
103
- "n" : args .n ,
104
- "temperature" : args .temperature ,
105
- "top_p" : args .top_p ,
106
- "stop" : args .stop ,
107
103
# type checkers are not good at inferring union types so we have to set stream afterwards
108
104
"stream" : False ,
109
105
}
106
+ if args .temperature is not None :
107
+ params ['temperature' ] = args .temperature
108
+ if args .stop is not None :
109
+ params ['stop' ] = args .stop
110
+ if args .top_p is not None :
111
+ params ['top_p' ] = args .top_p
112
+ if args .n is not None :
113
+ params ['n' ] = args .n
110
114
if args .stream :
111
115
params ["stream" ] = args .stream # type: ignore
112
116
if args .max_tokens is not None :
You can’t perform that action at this time.
0 commit comments